Page 1 of 1

Custom Resolution per project

Posted: 25 Mar 2023, 18:55
by sintaq
Anyway to custom resolution per project?

Project 1
  • Resolution = Fixed, No change Required
Project 2
  • Resolution = Completed, Drop

Re: Custom Resolution per project

Posted: 28 Mar 2023, 08:50
by amphetamine

Re: Custom Resolution per project

Posted: 28 Mar 2023, 20:26
by atrol
Config options can be set per project in database https://www.mantisbt.org/docs/master/en ... nfig.intro

Re: Custom Resolution per project

Posted: 30 Mar 2023, 15:52
by sintaq
@amphetamine @atrol
Thanks but I'm not quite understand the Guide. Is it that I need to set it via Manage Configuration > Create new option with below details?

username = All Users
Project name = Project 2 (assuming Project 1 will be using standard Resolution)
Configuration option = resolution_enum_string
Type = string
Value = '10:open,20:Completed,30:reopened,90:drop'

Re: Custom Resolution per project

Posted: 30 Mar 2023, 19:10
by atrol
Right, that's how to do it.
When entering the string value, keep in mind that you have to remove the quotes

Code: Select all

10:open,20:Completed,30:reopened,90:drop

Re: Custom Resolution per project

Posted: 03 Apr 2023, 01:21
by sintaq
@atrol

Having tried, the description of the customized Resolution per project doesnt display as expected. It seems to just following standard Mantis's resolution description

What have been configured
10:open,20:Completed,30:reopened,90:drop

What appeared
10:open,20:fixed,30:reopened,40:unable to duplicate

Re: Custom Resolution per project

Posted: 04 Apr 2023, 16:56
by sintaq
getLocalizedLabel

something wrong here?

Re: Custom Resolution per project

Posted: 06 Apr 2023, 18:01
by sintaq
@atrol

Am able to get it to work. yeayy~~~

For the others reference, this the steps needed

1) Configure new configuration Configuration Report for the selected project
2) Define the value accordingly. Its important to use different number than existing resolution. (this was my earlier mistake)

Mantis ships with below default reso
'10:open,20:fixed,30:reopened,40:unable to duplicate,50:not fixable,60:duplicate,70:not a bug,80:suspended,90:wont fix'

So for custom reso for my specific project, i should define as below. Then save the configuration
101:In Progress,102:Completed,103:Cancelled
3) Create new entry in custom_constant_inc as below:
define( 'IN_PROGRESS', 100 );
define( 'COMPLETED', 101 );
define( 'CANCELLED', 102 );
4) Thats it. It should work

Re: Custom Resolution per project

Posted: 06 Apr 2023, 22:01
by sintaq
to add, i also need to create additional configuration report as below to complement the above steps

bug_reopen_resolution integer 100
default_bug_resolution integer 100

Re: Custom Resolution per project

Posted: 09 Apr 2023, 15:20
by atrol
Thanks @sintaq for providing your solution.

If you want to use the same numbers for the enums, but want to use differnt strings in differnt projects, you would have to set the strings based on the project id in custom_strings_inc.php.

Re: Custom Resolution per project

Posted: 10 Apr 2023, 15:12
by sintaq
@atrol

how am I supposed to do that? please guide. thanks

Re: Custom Resolution per project

Posted: 10 Apr 2023, 19:06
by atrol
While more thinking about it, I found that my proposal would not work for all cases, e. g. if "All Projects" is selected in project selection box.