Forums

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

Need to cascade between two custom fields

Nandeesh M S December 2, 2015

Hi,

Here is my detailed requirement,

I have two custom field namely

1."RYG" with dropdown values Red, Yellow, Green.

2. "Overall Status"

Now if i select Red in "RYG" custom field Action Required value should appear in "Overall Status" custom field.

Same way if i select Yellow -> Monitor and if i select Green -> On Track values should appear.

Is there any way way/scripts to achieve this. If you any scripts please share.

JIRA version 6.3.15

 

Thanks in Advance,

Nandeesh

1 answer

1 accepted

0 votes
Answer accepted
Fabio Racobaldo _Herzum_
Community Champion
December 2, 2015

Hi Nandeesh,

you can use a behaviour for this purpose.Please install ScriptRunner for JIRA (https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner/server/overview) and setup the following behaviour  on RYG custom field :

FormField ryg = getFieldByName("RYG")
FormField overallStatus = getFieldByName("Overall Status")
def rygValue = ryg.getValue()
if(rygValue!=null){
	if(rygValue.equals("Red")){
   		overallStatus.setFormValue("Action Required")
	} else if(rygValue.equals("Yellow")) {
   		overallStatus.setFormValue("Monitor")
	} else if(rygValue.equals("Green")) {
   		overallStatus.setFormValue("On Track")
	}
}

Hope this helps,

Fabio

Nandeesh M S December 2, 2015

Hi Fabio, Kudos to you. it worked perfectly. Many thanks for your kindly help :) Thanks, Nandeesh

Fabio Racobaldo _Herzum_
Community Champion
December 2, 2015

You're welcome :)

Yogesh Mude
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.
December 15, 2018

HI @Fabio Racobaldo _Herzum_

We are looking for below requirement and i started searching around but this will not be possible with inbuilt Jira functionalities like cascading and all..

I am thinking of using the script we can do this but for maintaining the script and adding a new option into it will be like hell...

And each field contains more than 100+ options...any suggestions will be helpful for us.

  • Organization is associated with Component i.e. based on organization the options for Component are loaded.
  • Component is associated with Category i.e. based on Component the options for Category are loaded.
  • Category is associated with the ticket type i.e. based on Category the options for Ticket type are loaded.

Suggest an answer

Log in or Sign up to answer