Request:
1. If "Resolution" value is Lost - need to choose a value for the Cause field.
2. If "Resolution" value is not Lost - the Cause field can be left as "None".
I know how to set a specific value for a field in the post function, but here they ask for the ability to select a value from a list type field after transferring to the Lost status.
You will need an addon for automation or scripting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Volodymr,
You can jira automation instead. Take a look at this video on how to do it: https://www.youtube.com/watch?v=S2ary5YG-7w&t=7s
In your case:
- Trigger: Value Field Change on Resolution field.
- Condition: A condition that checks the resolution field
- Action: Edit Cause field
Regards,
Fabian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Again,
I misunderstood your original request. If you actually want the user to select based on another field, there is a way.
1. Create a transition screen with the Cause Field and add it to the transition
2. Using Cprime Power Scripts with a SIL script validator do the following: (You could also use a groovy script as well with any other plugin that provides a validator scripting )
---------------------
if (resolution == "Lost"){
if (isNull(customfield_rootcause)){ // case when rootcuase is left empty
return false,
"Error, root cause cannot be empty"
;
}
else {
return true;
}
}
else {
return true; // they can choose any option
}
Conclusion:
- When a user clicks on the transition, the pop up will show up and the validator will show an error message only if the resolution was set to "Lost" and left root cauase is empty. Note: in this example I'm assuming that the resolution was prior to the transition.
Sil validators details : https://confluence.cprime.io/display/JJUPIN/Customizing+workflows#Customizingworkflows-Forvalidators
- If you want it to be live where users select on the resolution on the fly, you may want to consider using Live Scripts from Power Scripts: https://confluence.cprime.io/display/JJUPIN/How+Live+Fields+work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Fabian Lim Thank you for the detailed instructions. I've done it almost as you described.
I totally forgot that we have JMWE app and your explanation was helpful to do a custom screen and if condition for the required transition.
The result is as easy as this - Fields Required Validator (JMWE app) and condition - issue.get("resolution")?.name == "Lost"
At the end I have this = If "Resolution" field is set to 'Lost', custom field 'Cause' becomes mandatory.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad to know that it worked. JMWE, JSU and Power Scripts are all very powerful Add-ons for customized workflows.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.