Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to display the custom field whenever the issue is set to be high priority otherwise hide it

Sunilkumar k
Contributor
July 21, 2022

Hi,

 

Whenever the issue priority is high i need the custom field to be displayed, if the priority is is low or medium i need to hide the custom field how can i achieve it ?

 

2 answers

0 votes
padraik
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.
July 21, 2022

Do you have Scriptrunner?  You may be able to do this with a Behavior

Sunilkumar k
Contributor
July 22, 2022

Hi @padraik ,

 

Can you please explain how we can achieve with a behaviour ?

padraik
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.
July 22, 2022
def priority = issue.getPriority().getName()
def myCustomField = getFieldById("customfield_55555") // This will be the id of the custom field you want to show/hide

log.debug("priority: " + priority)

if (priority == "low" || priority == "medium") // whatever your priority names are
{
myCustomField.setHidden(false);
}
else
{
myCustomField.setHidden(true);
}
Kian Stack Mumo Systems
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 22, 2022

@padraik, I don't believe ScriptRunner Cloud has behaviors as an available feature. Am I wrong?

padraik
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.
July 22, 2022

ohh, I didn't catch that this was cloud - my apologies, @Sunilkumar k  - @Kian Stack Mumo Systems is correct, you aren't going to be able to make this happen if you're in cloud.

0 votes
Kian Stack Mumo Systems
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 21, 2022

@Sunilkumar k, this is not possible in Atlassian Cloud.

Suggest an answer

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

Atlassian Community Events