Hide a custom field for particular issue status

Hi,

I need to hide a custom field from the issue view page if issue status is "Open".

The field is having default value and later it will get automatically updated during workflow. So i expect it not to appear in the issue view during open status.

I have a field counter which by default is 1 and by workflow it adds up to 1 when each time a transition is performed. So i cannot remove the default value for it.

If the issue is in OPEN status i want this field counter to be invisible.

Please suggest solutions.

Thanks,

Krithica

2 answers

0 vote
Christoph Thomas Community Champion Aug 04, 2017

Hey what are you using to increment the counter? Isn't it possible to include something like if (counter == "") counter = 1; in the script?

I am not aware of any possibilities in JIRA standard to hide a custom field only in a certain status. One thing you could do is exclude it from the view screen and use a global transition or Blitz action button (add-on for JIRA server) to display the value each time the button is clicked. If you use a global transition I am afraid the field will be editable...

Cheers

Christoph

An alternative approach is to use the behaviours of ScriptRunner for JIRA to hide/show the field as required. More documentation is available at https://scriptrunner.adaptavist.com/latest/jira/behaviours-overview.html

As suggested by Christoph you could start the count on your custom field when you make the transition to the appropriate status if the value is undefined at that point.  In certain circumstances this would mean your custom field would not be shown when it is undefined.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

140 views 1 17
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you