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
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
Knowing that ScriptRunner Behaviour is still not available to JSM Cloud, I wanted to utilise Script Listener for my business requirement.
I got a custom field: Resolved during initial call (customfield_10219); which is a radio button defaulted to 'No'.
The requirement is, if the value of Resolved during initial call field is set to 'Yes', then show the fields:
- custom field: Resolution comment (customfield_10215), and
- system field: Resolution
How can I achieve this using REST API script?
Most of the previous postings here were using Behaviours or Server instance.
Unfortunately, as Behaviours in Jira Cloud does not yet support Jira Service management, your requirement will not be possible as no other ScriptRunner features can show or hide fields.
The reason we cannot JSM currently is that Atlassian does not support it in the UI Modifications API, which behaviours runs on.
As a workaround, the best you could do is to use a script listener to add a comment if the field was set to Yes and if the fields were not populated, ask users to fill these in.
I hope this information helps.