You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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?
@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 -
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)
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.