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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Linked issue validator based on issuetype

Thony
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Oct 11, 2023

Hello,

I need a ScriptRunner (Cloud) script that uses the linked issues condition to control whether or not a user can transition an issue based on the issuetype, Ex: This scenario is for Changes, however, if the source of the change for Incident, Problem or Request, a message should appear that is mandatory to link to issue.

Can someone help me?

1 answer

1 vote
Joseph Chung Yin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 11, 2023 • edited

@Thony -

Welcome to the community.  Please take a look at this reference example page for how to create a ScriptRunner validator for WF transition - https://docs.adaptavist.com/sr4jc/latest/features/workflow-extensions/jira-expression-examples

https://docs.adaptavist.com/sr4jc/latest/features/workflow-extensions/validators 

As the Cloud version uses Jira expression framework syntax to support ScriptRunner validator configuration - https://developer.atlassian.com/cloud/jira/platform/jira-expressions/?_ga=2.180053924.1089527298.1697076386-1944562691.1685750835

In the first reference link mentioned above, there is already an example for making linked issue required as documented in ScriptRunner documentation -

2023-10-11_19-28-51.png

Lastly from the same example documentation - here is the code checking for issuetype (where you should combine it with the linked issue setup at a high-level)

2023-10-11_19-31-43.png

On the WF front, I would recommend that each issue type has a different custom WF setup for your project, so it will make your WF customization simpler.  This means that the WF currently being used for Incident issue type is its own WF and it is not shared with Problem issue type or Request issue type.

Hope this gives you a good starting point to generate your solution.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Technology Applications Team

Viasat Inc.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events