Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation for Jira fills wrong values into custom fields

janez_m
Contributor
July 11, 2023

We are using Automation for Jira (server) and have a lot of tasks that get created every quarter via cron - like this:

When: Scheduled
every 0 0 6 10 7 ?

Then Create
a new Task
in project SYS
which has some fields pre-filled, the issues are with:
Client which is of Select List (multiple choices) type or
Environment which is of Database Picker Custom Field type.
For Client we have selected the value which it should fill, while for Environment we use the more options field with a JSON like this
{
"fields": {
"customfield_11300" : [ "11376" ]
}
}

Most of the tasks get created correctly but some have totally wrong values for the two fields mentioned above all while the other fields like Description are correct.

Interesting thing is that the wrong values in two fields are correlated and not totally random. Could this happen as the rules are ran at the same time and somehow it reuses parts of already executed rules?

How would I troubleshoot this behaviour? I've seen suggestions of adding a debug to the automation (https://support.atlassian.com/cloud-automation/docs/debug-an-automation-rule/) in the audit log there is only a message that Issues were created successfully...

2 answers

1 accepted

1 vote
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 12, 2023

Hi @janez_m 

Just to confirm the symptom you are describing: are you running a scheduled rule, hard-coding the values of 2 custom fields, and the result is the values are not stored as expected from the hard-coded values?

In this case, I hypothesize that you have a timing and/or multiple-edit situation for the issues, possibly from multiple rules or manual edits. 

If you post some images that may help identify the cause.  Please post images of:

  • the complete rule in one image,
  • each action's details,
  • the audit log details showing an execution of the rule, and
  • images of the created issue(s) fields showing the incorrect values and the issue history

Kind regards,
Bill

janez_m
Contributor
July 13, 2023

Hi @Bill Sheboy 

Thank you very much for your reply. Yes I am running many quarterly/annual rules that create tasks and are ran at the same time, but somehow the values of created tasks are wrong.

I am sorry but I can't post pictures of client details here. I can post the complete rule image:

Screenshot 2023-07-13 at 11.55.00.png

And the interesting find in the issue history that you proposed to check - it looks like the task created originally did contain the correct values, but they got overwritten somehow with the wrong ones:

 

Screenshot 2023-07-13 at 12.04.45.png

Now I have to check all the rules and the workflow to see what is causing this kind of behavior. In the past we had similar rules running at the same time before and without issues, so something else changed and I have to find out what (there are other admins, who are also making changes). Thank you again for your directions.

Kind regards,

Janez

Like Bill Sheboy likes this
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 13, 2023

Until the histories show more information about rules changing issues, you can try this:

Hover over the issue history to get the date/time of the changes, and then view the global automation audit log for that date/time.  That may help narrow down if a rule is making this change, and which one is doing it.

Like janez_m likes this
janez_m
Contributor
July 14, 2023

Thank you for pointers, at the end the automation rule had wrong epic linked to them and some workflow rule copied the values from the wrong parent - your suggestion to check the history tab helped troubleshoot this behavior.

 

Have a nice day!

Like Bill Sheboy likes this
0 votes
Alexander Pappert
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 12, 2023
Interesting thing is that the wrong values in two fields are correlated and not totally random. 
Could this happen as the rules are ran at the same time and somehow it reuses parts of already executed rules?

Do you have 1 or 2 automation rules?

Can you put all in 1 rule?

If not, can you start 2nd rule when 1st is finished (lets say 5 mins later)

Is it then working?

janez_m
Contributor
July 12, 2023

Hi Alexander,
We have many, many those rules - I would say from 20 - 30 rules.. I will try on stage environment if I can use a cron for them to be couple of minutes apart if that helps.

Thank you for the suggestion

Suggest an answer

Log in or Sign up to answer