Forums

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

Custom field applicable context

Tomek March 27, 2019

Hello,

I have several screens that are used globally in all projects.

I have about 300 projects that use this window. Sometimes I have to add some field only for few projects. The only way out is to manually select the projects available in the Choose context context window.

Does anyone know a way to automate this process. Is this feasible using Script Runner? Or REST API? Thank you in advance for your answer.

1 answer

0 votes
Jean-Théo [Adaptavist]
Community Champion
March 27, 2019

Hello @Tomek and welcome to the community!

I believe this could be achieved by using a Scriptrunner Behaviour.

https://scriptrunner.adaptavist.com/5.4.47/jira/behaviours-overview.html

 

A Behavior allows you to hide a specific field (or multiple fields) according to a condition.

Screen Shot 2019-03-27 at 10.54.17 AM.png

I hope this helps,

JT

Tomek March 27, 2019

Hi @Jean-Théo [Adaptavist] , what with View issue screen. It seemed to me that Behaviors can only hide fields on the transition screens and the creation screen.

Jean-Théo [Adaptavist]
Community Champion
March 27, 2019

The behaviours can also hide fields from the edit screen. Since the users do not have access to fill the field anywhere (since it is hidden in create, edit, transition screen), it won't show in the view screen either!

Tomek March 27, 2019

Ok but what if I have set default value for customfield? It will be display on view screen?

Jean-Théo [Adaptavist]
Community Champion
March 27, 2019

If the fields are the same in every situation, this can be solved by adding a script listener as well.

The script would set the fields back to empty either on issue creation or update, depending on your need. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events