Show custom field based on the value of another field

Zaldy Parian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 13, 2023

Hi all,

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.

 

Regards,

 

1 answer

0 votes
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 14, 2023

Hi Zaldy,

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.

Atlassian has a ticket for this located here, and I would advise you to add your use case for this requirement to the Atlassian ticket and to our own internal feature request listed here.

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.

We have examples in our docs of how to check if a field has a certain value here and how to add a comment here, which could help you to achieve this requirement.

I hope this information helps.

Regards,

Kristian

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events