I am trying to write a code

Niranjan Teegala January 27, 2016

Hi guys... I am need help in getting a resulted oriented field (Custom Field)... the result should be based on a combination of two other fields in Jira... for example I am creating a New Issue in Jira... and I have A, B and C fields in the page... C is custom field and it should value based on the selections made in A and B. Any inputs are greatly appreciated.

 

Thanks,

Niranjan Teegala

2 answers

0 votes
GabrielleJ
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.
January 27, 2016

So it's like a 3 level Cascading Select custom field (basically like this add-on https://marketplace.atlassian.com/plugins/com.sourcesense.jira.plugin.cascadingselect/server/overview)?

What code do you have so far? Are you experiencing any issue with your code?

Do you plan on using this with JIRA Cloud?

Can you just not use a Cascading Select then just create a post-function to update your 3rd Custom field?

John Pfotzer January 27, 2016

I have this exact need. what is the concept of the post-function? It sounds like this doesn't need coding.

Thanks

John

GabrielleJ
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.
January 27, 2016

Requires minimal coding. Put a "Set Field Value to constant or Groovy expression" post function in the "Create" event. Then in the "Groovy" script part, get the "parent" and "child" value of the cascading select to determine what value you want for the 3rd field.

Sample for PF: https://answers.atlassian.com/questions/285260

Sample for Cascading Select: https://answers.atlassian.com/questions/13407075

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 27, 2016

I'm afraid there's not a lot you can do on Cloud with this.

If you were on Server, I'd be asking if you want this on the front end (changes in field A or B in the create screen determine the options a user has for field C, but still let them enter something) or checking that they have not entered bad data, or if there's a fixed set of rules for the values of A and B that will always set C to something (you'd do that in a post-function mostly)

 

Suggest an answer

Log in or Sign up to answer