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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,559,325
Community Members
 
Community Events
184
Community Groups

Category (Locked) field and Populating through automation

Hi All,

I'm trying to populate the recently introduced Issue Category field on Work Management Projects through an automation.

I have a cascading dropdown box configured that the users populate during issue creation. I was able to extract the level 1 value of that dropdown into a single line text field, however upon finding limitations in the filtering/grouping of the work management list view - am now trying to move the value from the single line text field to the Category field.

I've already added all the context options that could possibly be entered in that field through the automation, but I'm getting errors.

I've also tried populating the Issue Category field directly from the cascading dropdown, as well as from the Single Line text field I had originally configured.

It won't let me configure this through the simple method, so having to use advanced and I'm not very familiar with JSON coding.

Any help would be massively appreciated.


Fields:
issue.customfield_10070
= Cascading Dropdown box providing value
customfield_10084 = Single Line text field originally configured to take the value from the cascading dropdown.
customfield_10080 = Issue Category (Locked) field trying to populate


WORKING CODE
This is the code that is currently writing to the single line text field.

{
"fields": {
"customfield_10084": "{{issue.customfield_10070.value}}"
}
}


NOT WORKING CODE
This is the code that is not working

{
"fields": {
"customfield_10080": "{{issue.customfield_10084.value}}"
}
}

2 answers

1 accepted

0 votes
Answer accepted

Hi All,

So logged a support ticket and the assistance was super fast - same day! :O

And they've provided the correct JSON script to update the issue category value through automation.

So here it is:

 

{
   "update": {
      "customfield_10080": [
         {
            "set": {
               "value": "{{triggerIssue.fields.customfield_10084}}"
            }
         }
      ]
   }
}

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 15, 2022

Hi Sheradyn,

Try this since Category can have multiple values. 

{

"update": {

"customfield_10080": [{

"add": "{{issue.customfield_10084.value}}"

}]

}

}

Hi,

Thank you for your suggestion, unfortunately it didn't work.

Attempt 1

Error editing issues

TEAM-149 (Field with id' customfield_10080' and name 'Category' does not support operation 'add' Supported operation(s) are: 'set')

After trying to apply what the error suggested, tried again and got the next error.

Attempt 2

Error editing issues

TEAM-149 (Specify a valid 'id' or 'name' for Category (customfield_10080))

 

After doing some digging, I've tried getting more details using the rest API tools.

"customfield_10080":
     {"required":false,
     "schema":
          {"type":"option",
          "custom":"com.atlassian.jira.plugin.system.customfieldtypes:jwm-category",
          "customId":10080},
     "name":"Category",
     "key":"customfield_10080",
     "operations":
           ["set"],
     "allowedValues":
           [{"self":"https ://your-domain/rest/api/2/customFieldOption/10217",
          "value":"[BM] Bid Management",
          "id":"10217"},
          {"self":"https ://your-domain/rest/api/2/customFieldOption/10218",
          "value":"[BI] Billing & Invoicing",
          "id":"10218"},
          {"self":"https ://your-domain/rest/api/2/customFieldOption/10219",
          "value":"[CR] Cost Recognition / GL",
          "id":"10219"},
          {"self":"https ://your-domain/rest/api/2/customFieldOption/10220",
          "value":"[NB] Non-Billable Projects",
          "id":"10220"},
          {"self":"https ://your-domain/rest/api/2/customFieldOption/10221",
          "value":"[OB] On/Offboarding",
          "id":"10221"},
          {"self":"https ://your-domain/rest/api/2/customFieldOption/10222",
          "value":"[OCS] OCS",
          "id":"10222"},
          {"self":"https ://your-domain/rest/api/2/customFieldOption/10223",
          "value":"[OP] Operations",
          "id":"10223"},
          {"self":"https ://your-domain/rest/api/2/customFieldOption/10224",
          "value":"[PA] Project Activation",
          "id":"10224"},
          {"self":"https ://your-domain/rest/api/2/customFieldOption/10225",
          "value":"[PM] Project Management",
          "id":"10225"},
          {"self":"https ://your-domain/rest/api/2/customFieldOption/10226",
          "value":"[RC] Recons",
          "id":"10226"},
          {"self":"https ://your-domain/rest/api/2/customFieldOption/10227",
          "value":"[RM] Resource Management",
          "id":"10227"},
          {"self":"https ://your-domain/rest/api/2/customFieldOption/10228",
          "value":"[RPT] Reporting",
          "id":"10228"},
          {"self":"https ://your-domain/rest/api/2/customFieldOption/10229",
          "value":"[RR] Revenue Recognition",
          "id":"10229"},
          {"self":"https ://your-domain/rest/api/2/customFieldOption/10230",
          "value":"[SO] Security & Organization",
          "id":"10230"},
          {"self":"https ://your-domain/rest/api/2/customFieldOption/10231",
          "value":"[TE] Time & Expense",
          "id":"10231"}]
     }

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 16, 2022

I would open a support ticket with Atlassian - that field is new and everything might not be set up for it. 

https://support.atlassian.com/contact/#/

Please post back here with the resolution. 

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 18, 2022

Well, I was close! It was the triggerissue instead of just issue. 

Glad it is working for you!

Like sheradyn.ford likes this

Yeah, thank you! :)

I had no idea how to phrase the query. :P

Like John Funk likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events