Hi,
I have a field in Jira coming from a plugin (CRM for Jira) that the Automation doesn't see.
Now I have an Automation rule, that starts with an EPIC - and if I set up a value in that custom field (10951) I get that value through JSON and I apply it to the tasks I create under that epic.
But in case I update that value of that custom field in the EPIC - how can I update it in the tasks created under him also?
This is the automation:
Maybe you can do this:
Create the initial scope of your automation and after the condition of "Issuetype" = Epic
Add a BRANCH;
Use the option "Branch rule / related issues";
Select the "Stories (or other issues in Epic)" option
After that, inside the BRANCH add the "Edit Issue" action and place the JSON normally in "Additional fields".
I'm not sure if in Jira Server it's the same format, but you can start with a JSON similar to this:
{
"update": {
"customfield_10951": [{
"set": "{{triggerIssue.customfield_10951}}"
}]
}
}
I believe if you create a new automation just for this update it will be more effective.
Then create an automation like:
TRIGGER: Field Value Changed > Custom field 10951
Condition: issuetype = Epic
BRANCH > Related issues
"Stories (or other issues in Epic)"
Inside BRANCH > Edit issue > Additional Fields and put the JSON.
Hope this helps :)
@Fernando Eugênio da Silvathanks alot for the answer.
So i have applied your json, is working - in terms that is updating the field I have but the automation is throwing an error.
Do you know what's wrong with this or how to fix it?
Also with this custom field (10951) I had it in the Summary of the same automation rule like:
{{customfield_10951.value}} My Summary text
Is there a way to update this value also when I update the value of the custom field 10951?
This is how it looks:
Thanks alot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Albert,
About the error you are seeing, can you confirm if the ID field 10951 is a custom field of type select list or checbox?
This changes the JSON structure a bit.
As for updating the summary also when the field is edited, I would recommend the following:
Create a new automation with the following details:
Normally configure the CONDITIONS;
Add the BRANCH as previously guided and in EDIT ACTION you can do as follows:
But if you want to do it directly by JSON, you would not need to indicate the summary in "Edit fields", just pass it in the "Additional Fields" load.
Here's JSON that might help you:
{
"update": {
"customfield_10951": [{
"set": "{{triggerIssue.customfield_10951}}"
}],
"summary": [{
"set": "{{triggerIssue.customfield_10951}}"
}]
}
}
If this doesn't work as expected or it's still not what you're looking for, I look forward to more details so we can keep moving forward here :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Fernando Eugênio da Silva the field 10951 is a select list type (single choice).
Unfortunatly if I set
"summary": [{
"set": "{{triggerIssue.customfield_10951}}"
I will update the entire title of my ticket with the value of the field 10951.
What i have in my summary field is:
{{customfield.10951.value}} + This is my text
And is not keeping "This is my text" is updating te whole name.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Albert,
Please, try this:
{
"update": {
"summary": [{
"set": "{{triggerIssue.customfield_10951}} + This is my text"
}]
}
}
I tried this and it worked as expected.
However, to do this you have to indicate the summary value only by JSON and not load it as a field in the creation. You need to indicate it here only:
Let me know if this works for you and share any error that appear
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.