I setup an automation which is recurring each month and has a new issue as action.
Everything works fine but I also want to set the issue category to an already existing value.
The field itself is not available in the automation UI, there is this question where the field is referred to with {{issue.Category.value}}
---
When doing an JQL Query it is referred to as "Category[Category]"
I also tried with JSON but no success - can someone please help with this?
Hello all,
Appreciate this is a long running question, but I have just managed to solve this for myself.
I used the customfield id.
"fields": {
"customField_10160": { "value": "{{Object."Control Category".Name}}" }
}
}
So this is a JWM project, and the field Category[Category] is customfield_10160.
The value I am assigning comes from ASSETS, and so it needs to go btw quotes.
THe audit log shows:
And then in the ticket we have:
which then displays on the list as:
Hello @Klaus Ergert
This is the JSON that you need. Replace category1 with a valid Category value for your project.
{
"fields": {
"Category": { "value": "category1" }
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the same challenge but received the following error: Additional fields contains invalid field(s) in 'update' or 'fields' section: Category
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Elizabeth Jones
Can you check your environment to see if you have more than one custom field named Category defined for the system?
Are you running the automation rule for a Team Managed project or a Company Managed project?
Can you show us the automation rule, the details of the Edit action, and the output in the rule audit log?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Trudy Claspill , thanks so much for your solution, I was trying to automatically assign a category based on keywords in the summary field, and stumbled on your answer. Within the "Edit issue fields" action, I can't find the Category field to simply add a value, and your JSON worked beautifully. I just need to select "Environment" as the field, set the option to "SET" and then use your JSON. Sharing for anyone else in need.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Trudy Claspill I am having the same issue as @Elizabeth Jones - I set the rule as above and got the same error. I have this category created and I can select it manually in the list view or on a ticket. Not sure what's wrong. Thank you in advance!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I also tried using changing 'fields' to 'field' in the Additional fields text box's code above which seemed to fixed the error but now on the audit log it says some errors. attaching the error log here... Not sure what it's wrong. Attaching here some more screenshots:
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Eduardo Lello
It should be "fields", not "field".
Can you check your environment to see if you have more than one custom field named Category defined for the system? You can determine this by going to the View all issues page under the Filters menu, then enter a JQL statement. Start typing in category and Jira will show you all the fields that have that as part of their name. Check if more than one field is being suggested with the name just Category.
Are you running the automation rule for a Team Managed project or a Company Managed project?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.