Forums

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

Display a CustomField when a specific resolution is selected

Olivier MAZEN
Contributor
March 28, 2018

Hello there,

I need to do (if possible) a specific requirement in my JIRA application.

 

When i close an issue i get a specific screen to set a Resolution value. The screen is displayed threw a transition in my workflow.

I would like to display CustomField only when i pick a specific resolution value.

 

I do it pretty well with the AddOn Dynamic Form for other CustomField.

When i pick a value in a selectlist a specific custom is displayed. process discib below:

 

Step 1:

step 1.JPG

Step 2:

step 2.JPG

 

 

My question, is it possible to reach my needs with the JIRA standard field Resolution?

- when i select "rejected" the CustomField "Comment your choice" is show up.

- When i select "closed" the CustomField "Comment your choice" is not even displayed in my transition screen.

 

 

I hope i am understandable :)

Regards,

Olivier

1 answer

1 accepted

1 vote
Answer accepted
Fabio Racobaldo _Herzum_
Community Champion
March 28, 2018

Hi Olivier,

in order to do that you need to use a custom script. A good solution is Script Runner for JIRA (https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner/cloud/overview), in particular you could define a behaviour that, based on resolution selected, hide or not a specific field within your screen.

I used this approach to implement similar request for many customers and it worked like a charm.

As alternative, you should embed javascript custom code on a field description / banner https://confluence.atlassian.com/jira/fields-allowing-custom-html-or-javascript-224401453.html?_ga=2.27323582.388927580.1522049453-868929400.1503321899 .

Hope this helps,

Fabio

Olivier MAZEN
Contributor
March 29, 2018

Hello Fabio,

Thanks for your answer !

I actually used ScriptRunner in my JIRA project (i.e it shouldn't be a probleme to use it)

But i am affraid that i miss something with my JIRA knowledge.

When you said " [...] you could define a behaviour [...]", where excactly i will put the script ? In every event in my Workflow transition step, no one match with my needs.

 

Can you please highlight a little your words?

Olivier

Fabio Racobaldo _Herzum_
Community Champion
March 29, 2018

Hi Olivier,

using script runner for JIRA, on add-on section you will find Behaviour Immagine.png

Enter a new behaviour and map it with your project/issue type. Afetr doing that you can add a specific behaviour to your fields using the following documentation https://scriptrunner.adaptavist.com/latest/jira/behaviours-overview.html

 

Ciao,

Fabio

Olivier MAZEN
Contributor
March 29, 2018

Thank you so mutch !!!!

Suggest an answer

Log in or Sign up to answer