[v1.06] required version field

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
covao
Posts: 2
Joined: 02 Mar 2007, 10:00

[v1.06] required version field

Post 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.
vboctor
Site Admin
Posts: 1293
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Post 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.
Migrate your MantisBT to the MantisHub Cloud
Meow the Catz
Posts: 13
Joined: 06 Mar 2007, 14:04

Post 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?
vboctor
Site Admin
Posts: 1293
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Post 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.
Migrate your MantisBT to the MantisHub Cloud
Meow the Catz
Posts: 13
Joined: 06 Mar 2007, 14:04

Post 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...
dingfelder
Posts: 100
Joined: 14 Aug 2005, 22:47
Location: new zealand
Contact:

yes

Post by dingfelder »

I agree. this should be configurable from the admin pages
Post Reply