Page 1 of 1

[v1.06] required version field

Posted: 02 Mar 2007, 10:22
by covao
I'm installing Mantis and I whish the version field is required on the new report page.

I've not found any solution in the php and configuration files, in the manage pages yet.

Posted: 03 Mar 2007, 08:55
by vboctor
You can achieve that buy overriding the following custom functions:
- issue_create_validate
- issue_update_validate

Check the manual at http://www.mantisbt.org/manual for details about custom functions and how you can override them.

What you need is to add code in these functions to check the version. The other option is to modify bug_update.php and bug_report.php directly, but in this case your changes will be overridden when you upgrade to the next Mantis version.

Posted: 07 Mar 2007, 16:05
by Meow the Catz
And is this also possible to put a default value in the "version" field, for instance the latest version in the version list?

Posted: 08 Mar 2007, 05:45
by vboctor
At the moment it is not possible to mark a version as the default version. I am also not sure it is a good idea, since it is likely that people will forget to change it for older versions and developers may be mislead. However, feel free to report it as a feature request in the bug tracker.

Posted: 08 Mar 2007, 11:06
by Meow the Catz
Btw if we modify those functions to change version field as a required one, will it put the red mark beside the field to show us it is a required one?

I think you should improve the customization of mantis to allow the admin to tell for existing fields if :
- they should be required or not
- they should be visible or not on the bug report page

Because for instance if for a project we do not care about the version, why should we have the field?

Having a default version in the field is useful in some case. For instance, I use mantis as a hotline support between us, the customer, and our software provider. We always have the latest version of the software that is displayed in version field, so we will never have to submit a bug report for an oldest one...

But then, could you say, why we do care about the version? Just as a reminder for old bugs, to see in what version they were...

yes

Posted: 08 May 2007, 23:03
by dingfelder
I agree. this should be configurable from the admin pages