Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Hide Transition based on the presence of Linked Issues

Sriharsha
Contributor
July 28, 2022 edited

Hello Team,

I have a transition (Create a Defect) at two Statuses called 'Step 1' and 'Step 2' in the workflow.

At Step 1, When I click on Create a Defect, a linked issue gets created. 

When I reach the Step 2 status, I should not see "Create a Defect" transition as I already have a linked issue present in the ticket.

I wanted to hide/unhide the transition based on the presence of linked issue in the current issue.

 

We use JWT, ScriptRunner plug-ins.

 

Please help me in this regard.

 

Regards,

Sriharsha

1 answer

1 accepted

0 votes
Answer accepted
Tansu Akdeniz
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 28, 2022

Hi @Sriharsha 

Welcome to the community.

You can add a simple script condition via Script Runner. There are sample scripts in that page. For ex; linked issue condition: 

!issueLinkManager.getOutwardLinks(issue.getId())*.issueLinkType.name.contains('Relates')

Or you can add JQL condition by using issueFunction not in hasLinks() query.

Best

Sriharsha
Contributor
July 28, 2022

Thank you, @Tansu Akdeniz !

Tansu Akdeniz
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 28, 2022 edited

You're welcome!! 

Sriharsha
Contributor
August 16, 2022 edited

Hello @Tansu Akdeniz , 

hope you are doing well!

It is working as expected.

But I have another scenario in the same workflow, where at a later status, when I click a transition button in the ticket, it goes back to the previous status and again I can see "Create A Defect" button.

Once a linked issue is created, I should not see no matter how many times I come back to the previous status.

Can you pls suggest?

 

Thank you!

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, team '25, conference, certifications, bootcamps, training experience, anaheim ca,

Want to make the most of Team ‘25?

Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.

Learn more
AUG Leaders

Upcoming Apps & Integrations Events