Forums

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

I want to edit the value of a dropdown selection based on the value of another dropdown selection

Makai Baker
Contributor
May 30, 2023

More specifically and generally, I have:

Dropdown_Field_1 -> Dropdown_Selection
with name =
X -> Y-Z

and want to update

Dropdown_Field_2 with name = Y-X
to be equal to
Dropdown_Selection with name = Z

 

For example, I have a dropdown field of "Subsystem" that has option "SEQ - Barcode Scanner". I want to update a new dropdown field "SEQ - Subsystem" to have the option "Barcode Scanner" filled out. I also have "OT - Pipettor", etc. that need to be transferred to "OT - Subsystem" under "Pipettor", etc.

I would like an automated way of transferring options between these dropdown field, without having to manually make a rule for each option (50+ of them).

1 answer

0 votes
Bill Sheboy
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.
May 30, 2023

Hi @Makai Baker -- Welcome to the Atlassian Community!

First, a disclaimer: Although this is possible, the reliability depends on the alignment between your rule and the select-value fields contents.

Basically the rule would parse the target field name and value from the source issue data, and then use created variables and advanced edit with JSON to dynamically update the field.  Here is the key part: because many of the field expressions with JSON use quotation marks, you will need to build up the JSON using created variables.

As you develop a rule like this, I recommend writing everything to the audit log to ensure it works as you expect during testing.  You can remove the audit log writes later.

An outline of such a rule is below for an example for a text field.  See the advanced edit with JSON documentation to do this for your field type, and its associated JSON.

  • trigger: your field changes
  • condition: I do not know what you need, but I expect you need to test the field changes before proceeding
  • action: create variable
    • variable name: varFieldName
    • smart value: parse the field name out from the issue fields
  • action: create variable
    • variable name: varFieldValue
    • smart value: parse the field value out from the issue fields
  • action: create variable  Please note: Below is an example for a text field, not your exact scenario.
    • variable name: varJson
    • smart value: { "fields": { "{{varField}}": "{{varValue}}" } }
  • action: edit issue, using the Additional field option, and the value would only be...
    • {{varJson}}

 

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events