Customize RESOLUTION for Resolved and Closed status

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
MBT_novaa
Posts: 31
Joined: 05 Mar 2015, 06:39

Customize RESOLUTION for Resolved and Closed status

Post by MBT_novaa »

Hi Mantis Team,

I am currently looking into the possibility of having Resolution field customized based on the value of status. That is, if status is either Resolved or Closed then resolution should neither be Open nor Reopened.

I tried to add the following code in bug_api.php:
if( (( $this->status == RESOLVED ) || ( $this->status == CLOSED )) && (( $this->resolution == OPEN ) || ( $this->resolution == REOPENED )) ) {
error_parameters( lang_get( resolution) );
trigger_error( ERROR_EMPTY_FIELD, ERROR );
}

Two issues: 1. It triggers incorrect message. 2. Error message displays but still saves the change performed.

Question:
1. Which file should I modify?
2. What error/warning message function should be called that fits the above action?
3. What have I missed that stills allows the action to be saved?

Thanks in advance for all the help!!!
Post Reply