Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Hide one transition and show another transition based on custom field value entered

Hello Community, 

 

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. 

Problem : 

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. 

Regards,

Anupam

 

  

3 answers

2 accepted

0 votes
Answer accepted

Hi @Anupam Sinha 

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.

Thank You David for quick help. It is helpful. 

0 votes
Answer accepted
Ravi Sagar Community Leader May 13, 2021

Hi @Anupam Sinha 

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.

Ravi

Thank You @Ravi Sagar for helping me. It is nice and detail video. 

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.


Thanks

Thanks @Vikrant Yadav  for help and a very good suggestion on the field type. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS

Community Events

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

Events near you