Please advise or help me. Its server instance of jira. I have scriptrunner and JMWE plugins. I am working on a workflow of a story. Workflow has Start, Status B, Status C, Status D, Status E and Completed.
My story has a customfield : Test Analyst ( Single Line Text Field) and its in Status B in workflow transition. If Test Analyst field has been populated with analyst's name then story's view screen should shows Status E transition button, mean to story will transition to Status E from Status B.
If Test Analyst field has not been populated with analyst name then story view should show Status C transition button. mean to story will transition to Status C from Status B.
Please advise me how to accomplish this task.
Thank you so much.
with JMWE, you can use a Build-your-own Condition on both transitions (B to E and B to C). For transition to E, use this script:
issue.customfield_12345 != null
and for transition to C, use this script:
issue.customfield_12345 == null
Note that customfield_12345 needs to be replaced with the field ID of your "Test Analyst" custom field, which you can find on the "Issue Fields" help tab of the editor.
Are you on server or cloud. You can use Script Conditions to check for a specific field value. It can also be done with JMWE. I explained how to achieve this here, the example I used was to build an approval system and show transitions only when a condition is met.
You can do something similar on cloud as well but the main idea is to use Conditions.
I hope it helps.
Hi @Anupam Sinha You can do it easily with the help of Simple Scripted Condition which is a part of Script Runner and put this condition :- cfValues['Some Custom Field'] == 'Some Value'
As you have mentioned it's a single line text field, value is not constant in this case. Condition might fail sometime if Agent name is not correct or some spelling mistake while typing agent name in a field.
It's better to use User Picker if this field is for Analyst name or use Select List instead of Single line text field for Analyst name.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events