I've been working on a rule in Jira for a very long time that updates the estimation counter for the old and new parent when the ticket changes parent (for Epic or for Story)
All works correctly
But today I have problem
In rule trigger - update of ticket
After that we need to check conditions
Go run case when sub-task change Story parent
Condition is match: it is sub-task and parent = story
After that I try to know ID of new parent by {{issue.parent.key}}
and previous parent by {{#changelog.parent}}{{fromString}}{{/}}
A week ago {{issue.parent.key}} return the value of the current parent
Now it returns the value of the previous parent like operation {{#changelog.parent}}{{fromString}}{{/}}
1) Is it okey?
I try to check smart value and create new manual rule for manual trigger for checking this smart value separate for sub-task
But in this rule - {{issue.parent.key}} return me current Story parent and {{#changelog.parent}}{{fromString}}{{/}} doesn't work
I dont understand what happen and why in first rule it work incorrectly and in secod rule part of this works, but other part doesn't work
The symptom you describe seems to indicate a timing problem, where
Two things to check if this is the cause are posting the details of the audit log to see if there are multiple rule triggerings for a parent change, and...consider the steps/order of steps which lead to the reassignment of parent.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Oksana Baier
Regarding why changelog doesn't work in the rule you manually trigger, that is because changelog values are available only when your rule uses the Issue Updated trigger. When you manually trigger a rule, there is no update occurring in the issue so there is not changelog to review.
I'll have to do some experimentation regarding the issue you are seeing with the parent key being returned.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In my experimentation I am not seeing {{issue.parent.key}} returning the previous parent key value.
My experiment was very simple.
The only change I made to the subtask was to move it from one parent issue to another.
Because your rule is using the Issue Updated trigger, it may be getting triggered for changes to subtasks other than the change of the parent. In that case you may not get the results you expect because the changelog will not have an entry for fromString for the parent field.
In the scenario where some other change was made to the subtask, then issue.parent.key still returned the current parent, and changelog.parent returned nothing.
Can you provide the details of the Rule Audit Log in a scenario where the rule was triggered and issue.parent.key returned the key for the subtask's previous parent?
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.