Forcing "Update Fixed in Version" when issue is "Resolved"

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
modest
Posts: 46
Joined: 11 Apr 2011, 18:27

Forcing "Update Fixed in Version" when issue is "Resolved"

Post by modest »

I am using Mantis 1.1.6 on a LAMP platform. Is there a way to make force the user (for example a developer ) to set the field "Update Fixed in Version" when the issue's status is set to "Resolved"? In short can we make the field "Update Fixed in Version" mandatory while closing/resolving the issue?
atrol
Site Admin
Posts: 8375
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Forcing "Update Fixed in Version" when issue is "Resolve

Post by atrol »

You have to write a custom validation function for this
http://www.mantisbt.org/manual/manual.c ... nction.php
Please use Search before posting and read the Manual
modest
Posts: 46
Joined: 11 Apr 2011, 18:27

Re: Forcing "Update Fixed in Version" when issue is "Resolve

Post by modest »

atrol wrote:You have to write a custom validation function for this
http://www.mantisbt.org/manual/manual.c ... nction.php
And where should I put the custom validation function in the Mantis Code base?

Thanks!
atrol
Site Admin
Posts: 8375
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Forcing "Update Fixed in Version" when issue is "Resolve

Post by atrol »

Please use Search before posting and read the Manual
Reinder
Posts: 119
Joined: 26 Apr 2005, 11:08

Re: Forcing "Update Fixed in Version" when issue is "Resolve

Post by Reinder »

I tried the example as stated in http://www.mantisbt.org/manual/manual.c ... nction.php.

However, when I trigger an error, I get:

"APPLICATION ERROR #ERROR_BUG_VALIDATE_FAILURE"

And not as expected:

"fixed in version must be set to resolve the issue"
atrol
Site Admin
Posts: 8375
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Forcing "Update Fixed in Version" when issue is "Resolve

Post by atrol »

Seems there is a bug in documentation.
Try

Code: Select all

trigger_error( ERROR_VALIDATE_FAILURE, ERROR );
instead of

Code: Select all

trigger_error( ERROR_BUG_VALIDATE_FAILURE, ERROR );
Please use Search before posting and read the Manual
atrol
Site Admin
Posts: 8375
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Forcing "Update Fixed in Version" when issue is "Resolve

Post by atrol »

I fixed it in documentation of MantisBT 1.2.x http://www.mantisbt.org/bugs/view.php?id=15812

http://www.mantisbt.org/manual/ is the documentation for versions 1.0 and 1.1
http://www.mantisbt.org/docs/master-1.2 ... guide.html is the one for current latest stable version
Please use Search before posting and read the Manual
Post Reply