Make Root Cause required for Bug Issue Type - only. Where env == PROD and at a terminal state (resolved or closed or done).

Mary Wilson May 28, 2015

My users want to implement the following:

Make Root Cause required for Bug Issue Type - only. Where env == PROD and at a terminal state (resolved or closed or done).

How the heck do I accomplish that?

2 answers

0 votes
Mary Wilson June 4, 2015

I'm trying this in script runner but it's not working and I don't know why:

if (cfValues['Environment']?.value == 'PROD' && cfValues['Root Cause']?.value == NULL){
}
} else {
true;
}

 

I can evaluate the (cfValues['Environment']?.value == 'PROD' part successfully, but cannot get the cfValues['Root Cause']?.value == NULL part to evaluate successfully.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 28, 2015

You'll need a bit of code - specifically, a "validator" that you can add to the workflow for bugs (you can use "workflow schemes" to have different workflows for different issue types) on the transitions into resolved, closed and done.  The validator can be written to check for "if env == prod and root cause is empty, then fail validation".

I'd use the script runner to do this.

Suggest an answer

Log in or Sign up to answer