Custom Resolution per project

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
sintaq
Posts: 74
Joined: 12 Oct 2017, 11:38

Custom Resolution per project

Post by sintaq »

Anyway to custom resolution per project?

Project 1
  • Resolution = Fixed, No change Required
Project 2
  • Resolution = Completed, Drop
atrol
Site Admin
Posts: 8418
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Custom Resolution per project

Post by atrol »

Config options can be set per project in database https://www.mantisbt.org/docs/master/en ... nfig.intro
Please use Search before posting and read the Manual
sintaq
Posts: 74
Joined: 12 Oct 2017, 11:38

Re: Custom Resolution per project

Post 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'
atrol
Site Admin
Posts: 8418
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Custom Resolution per project

Post 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
Please use Search before posting and read the Manual
sintaq
Posts: 74
Joined: 12 Oct 2017, 11:38

Re: Custom Resolution per project

Post 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
sintaq
Posts: 74
Joined: 12 Oct 2017, 11:38

Re: Custom Resolution per project

Post by sintaq »

getLocalizedLabel

something wrong here?
sintaq
Posts: 74
Joined: 12 Oct 2017, 11:38

Re: Custom Resolution per project

Post 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
sintaq
Posts: 74
Joined: 12 Oct 2017, 11:38

Re: Custom Resolution per project

Post 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
atrol
Site Admin
Posts: 8418
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Custom Resolution per project

Post 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.
Please use Search before posting and read the Manual
sintaq
Posts: 74
Joined: 12 Oct 2017, 11:38

Re: Custom Resolution per project

Post by sintaq »

@atrol

how am I supposed to do that? please guide. thanks
atrol
Site Admin
Posts: 8418
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Custom Resolution per project

Post 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.
Please use Search before posting and read the Manual
Post Reply