Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automation on Automation- with color coding

kitty.miranda November 23, 2023

Hi -  

I created a BRAG colour field - RAID Level (custom field that has the colour coding added based on the hack mentioned in this Atlassian thread, see my screenshot below).... I added an automation to this field based on the various value ranges in another numeric custom field RAID Severity. 

Screenshot 2023-11-23 at 2.16.45 PM.png

 

For example:
Screenshot 2023-11-23 at 2.33.10 PM.png


In the same way I have created other 3 automation rules to set the colour based on the value ranges of the RAID Severity (set Amber 12 to 16; set Yellow for values 9 to 12) 


(P.S. - RAID Severity is auto-calculated through a Jira Automation) 
Screenshot 2023-11-23 at 2.49.42 PM.png


I am facing some issues around this.

1. The RAID Level does not auto-set if the RAID Severity (auto-calculation is on)
2. I turned off the RAID Severity,  and found that the RAID Level value is set when I manually put in a value in RAID Severity. Also, if I change the value from 3 to 6 the RAID Level colour does not change from Blue to Yellow. The initial colour is retained no matter the value I put in.

This brings in a lot of questions to mind such as does Jira support automation on automation. Is there a way to check for multiple OR conditions (not AND) at once that is have one rule for colour coding instead of 4 different rules and is there way to tell JIRA which rules runs when. 


PLEASE HELP!!!

1 answer

1 accepted

2 votes
Answer accepted
Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 23, 2023

Hi @kitty.miranda 

This is possible; I also consolidated it into one rule for ease.

The rule uses...

  • The Custom Field Option IDs rather than the value to set the option
  • A lookup table rather than multiple IF/ELSE statements

---

Prerequisites

You're going to use the Option IDs in the rule to set the field value - to get these:

  • Go to Settings (cog icon in top-right) > Issues
  • Select Custom Fields from the left-hand menu
  • Locate the "RAID Level" field
  • Select the breadcrumbs (...) on the right-hand side, and select Contexts and default value
  • Next, select the hyperlink Edit Options
  • In the Actions column, hover over each Edit hyperlink
  • Take note of each options' ID
    • It's the value at the end of the URL - eg. &selectedValue=10123

Also take note of the RAID Severity Custom Field's ID at the same time:

  • Go back to the Custom Fields screen
  • Select the breadcrumbs (...) on the right-hand side, and select Edit Details
  • Take note of the Custom Field ID for RAID Severity, which is at the end of the URL - eg. ?id=10456

---

Rule

  • Trigger: Field Value Changed
    • Field to Monitor = RAID Severity
  • Action: Create Lookup Table
    • Table Name = raidLevel
    • Table Entries...
      • Row 1
        • Key = 0
        • Value = 10123
      • Row 2
        • Key = 1
        • Value = 10123
      • ...etc
  • Action: Edit Issue
    • Field = RAID Level
      • Value = {{raidLevel.get(issue.customfield_10456.format("#"))}}
  • Other: Modify Rule Details
    • Check Allow rule trigger to TRUE (checkbox)

---

Notes:

  • The Rule Details section should allow your RAID Severity rule to activate the other one
  • The Create Lookup Table will require as many rows as you have numeric values in RAID Severity...
    • The Keys are those numeric values (eg. 1-20 = 20 rows)
    • The Value should be the Option ID - eg. 10123 might be for "Blue"
  • The Edit Issue Action then sets the field value, based on checking each row. It uses a dynamic smart value to do this.

---

Let us know if this works for you!

Ste

kitty.miranda November 30, 2023

Hi Stephen - I really appreciate the time you took to provide each step by step instruction. I have configured per all the instructions, I am not aware of JSON functions, I am just failing on the JSON line of code. When I have 'customfield' in my line of code it is red underlined hence I updated it as below.

1. As you mentioned in Action above, do I need to add something in place of 'customfield_' before the field ID 

2. In place of # what do I need to enter


{
"RAID Level": {
"value": "raidLevel.get(issue.10340.format("#"))"
                       }
}

Screenshot 2023-11-30 at 1.18.21 PM.pngScreenshot 2023-11-30 at 1.18.42 PM.pngScreenshot 2023-11-30 at 1.20.55 PM.png

Thanks,

Kitty

Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 30, 2023

Hi @kitty.miranda 

I didn't use the Advanced section - no JSON should be required.

You can enter the smart value directly into the box below "RAID Level" when selected as the field.

Remove the JSON in Advanced to avoid error.

Ste

kitty.miranda November 30, 2023

Hi Stephen - I have added the smart value under RAID Level (screenshot below), yet the RAID Level field is not auto-populating with any colour value.  The RAID Level field ID is also entered correctly.

I know I am almost there just clueless on how to proceed or even troubleshoot.

Thank you once again for helping out.

P.S. The variable name in Create Lookup is all in small caps (raidlevel). Could it be because of Raid Level field value options are neither string or numeric (the colour icons I believe are considered as strings though)

Screenshot 2023-12-01 at 11.54.21 AM.png

Screenshot 2023-12-01 at 11.48.19 AM.png


Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 30, 2023

Hi @kitty.miranda 

You need to use the Custom Field ID for the number field (i.e RAID Severity) not the RAID Level select list in the "raidlevel.get" smart value.

This is to allow you to compare RAID Severity to the Key set within the Lookup Table.

Ste

kitty.miranda November 30, 2023

Thankkkk you!!!... It Worked...

... cannot thank you enough .. i learnt something new and advanced further in my journey to understanding Jira

Screenshot 2023-12-01 at 12.35.29 PM.png

(At times I have to refresh the issue/ticket a couple of times for the rule to take effect, reading on how to improve the triggering of the rules)

Like Ste Wright likes this
Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 30, 2023

Awesome, glad its working!

The rule can take a few seconds to activate - it is completing some more complex logic :)

Ste

Suggest an answer

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

Atlassian Community Events