Hi,
I want to create an automation rule in a jira work management project
when a subtaks is created -> copy the category field from the parent issue.
Can anyone help me with this ?
Thanks in advanced !
You can construct something like this:
You'll need to use Advanced fields section within Edit issue action and you can use the following JSON:
{
"fields": {
"Category": { "value": "{{issue.parent.Category.value}}" }
}
}
This should copy any "Category" value that is set to a parent issue (if it exists).
Hope this helps.
Best,
Tom
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
I am facing the same problem and when using the JSON, I get the following error message: Additional fields contains invalid field(s) in 'update' or 'fields' section: Category
I would appreciate some assistance with this case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you copy Additional fields section content and maybe paste screenshots from the site and where the problem appears?
Also, can you confirm you're in business/Jira Work Management project? Additionally, from where are you creating sub-tasks?
Cheers,
Tom
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Yes, it's a Jira Work Management project and a team-managed project.
The subtasks are created by automation and both parent and subtasks contain the category field.
The only Category field I can choose is showing the wrong values, so it can't be the correct field.
I believe we messed up something with the field, but I'm unsure how to solve it.
Thanks for your support.
Best,
Justina
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
PS: I believe the field is preset, as I can't change the field at all.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think I've managed to replicate this error you're experiencing.
Basically, this might happen in case you have more than 1 field named "Category".
From the "Edit issue" action that you've attached here, I suspect that's the case (as you cannot, at the moment, select the system "Category" field from that dropdown).
Can you please navigate to Settings > Issues > Custom fields and check if that's the case? It should look something like this (note that the highlighted field is the custom field created by a user, and the one with "Locked" status is a system field):
In order to 'fix' this - to be able to use the provided JSON within the automation action, please rename all custom fields that are named "Category".
If that did not help, or if you mustn't/shouldn't rename those fields, I can try to find some other solution that actually uses system field ID instead of a name.
Just a note - I've tested this on 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.
Hi,
Thanks for the suggestion and quick answer. Unfortunately, I can't and think I shouldn't change this field, as it's supposed to be a preset field and those I can't change.
It would be great if you could find a solution to use the field ID. I tried it, but I'm unsure what the JSON needs to look like.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then, you can basically use the following format customfield_ID instead of "Category" string/name.
To find the ID of the system "Category" field navigate to Custom fields page under Jira administration and search for the term "category", and follow the steps below:
Once you find the ID, go back to the automation rule and just replace "Category" string with customfield_ID where the ID is the number you've found in the step 4.
I've tested this by having 2 fields named "Category" in the custom fields list, and automation worked as expected. Also no errors/warnings were stated when trying to save/publish the rule.
Note that it might be recommended to not have two or more fields with the same name (whether we are talking about system or custom fields) - due to easier administration and also to not confuse end users. That's why I suggested renaming the custom field in my previous answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot for the support. Is there any chance that you can post the JSON as text so that I can copy it? I'm receiving the following error message "Error while parsing additional fields. Not valid JSON."
Sorry, for asking again, and thanks a lot!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No problem. Here's JSON as text:
{
"fields": {
"customfield_10123": { "value": "{{issue.parent.customfield_10123.value}}" }
}
}
Note that, sometimes, during the copy/paste process, quote marks might automatically change (due to OS config. or something else). If that happens, try to replace all symbols (including parentheses) with new ones by typing them manually.
👉 Also, as stated above, replace ID 10123 with field ID from your site.
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.
Hi @Erik Mathijs ,
please take a look to the following tutorial https://www.youtube.com/watch?v=klwQA9cwBfU, it should help you on that
Fabio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Fabio Racobaldo _Herzum_ ,
This video is helpfull but the category field in jira work management seems to be a special field.
I can't select it in the edit field action screen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
please share a screenshoot about that field on creation
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In jira work management i have the field category
i want to copy the category field from the parent to the subtask when a subtask is created.
In the automation rule i create a branch
In the choose field to set the category field is not available
and it is also not available on the copy field from parent (for getting this i selected another field to try getting the parent field category
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.