I have looked at all the threads related to this issue but so far no workaround for the problem I am seeing. I have the automation set up as in the attached screen shot.
https://www.youtube.com/watch?v=PROcxEOMyGM is the video I was following. In the video it uses action issuetype in (story) and "Epic Link" = "{{issue.Epic Name}}" that didn't work so I changed it to "parent" = {{issue.key}}. However I still see the epic's Story Points field keep getting reset to zero.
Not sure why this is happening. Please help.
Hello @Janany Satkunam
Are your Epics and stories in the same project?
In your lookup JQL, use "Epic Link" = {{issue.Epic Link}}
Before you edit your issue, put a log statement and log the value {{lookupIssues.Story Points.sum}} to verify..
Parent logic is only for cloud.
Hi Kalyan, Epics and stories are in the same project. I tried "Epic Link" = {{issue.Epic Link}}. but the issue is still happening. Epic Story Points field resets to empty.
You mentioned putting a log statement. Can you give me the steps to do this? And what are we trying to check with this log statement?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Janany Satkunam
Log statement just logs values so we know that lookupIssues found related stories of the epic or not. Its easy to understand whats going on looking at audit logs this way.
To do this, add component above "Edit Issue" -> New Action - Type Log in search box, under Advanced, there will be "Log Action". (see screenshot 1).
Then when you have selected that option, put in {{lookupIssues.key}} and hit save. (see screenshot 2)
Now, going back to your issue, if Epic Link is not working, most probably your company has renamed the Epic Link to something else. Like "Feature Link". Try that.
If that also does not work, then,
Seems like a lot of the steps but this is wa way to find custom field values and once you do it, its straight forward. Bookmark that URL for future reference.
Please try and share if any issues. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did the log statement as. you suggested. However I don't see any log entry in the ticket. Where should I see this logged?
As for doing the JSON, when I opened the URL with ?expand=names I am still getting the same normal view (not a JSON response).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also I can confirm we do use Epic Link which is cf[10008]. But one thing I don't understand is why the Epic's Story Points value get set to zero. For example, I just updated to a random number and then I went and updated the child story's 'Story Points' field. As soon as I did that, the parent's story points field got set to nothing.
See attached screenshot from the history tab of the epic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My hunch is that you have a separate rule which is wiping this field every time it gets updated. Please review your existing rules.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's not possible because this is my first rule I am trying out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, I just tested. Because you are in Data Center edition, Story Points is not exposed when using lookupIssues. There a limited set of fields we can use this way. Cloud OTOH exposes all fields but unfortunately DC has this limitation.
Your only option is to make a web request call to sum up the story points. If interested in that route, we can discuss next steps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Kalyan,
I see the below in audit log. Is this because of the reason you are explaining above?
I do want a solution to achieve my desired output. Please advise on next steps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Never mind, I had a typo earlier when I was testing. We can do this simply.
Please make your rule just like I have below and share audit log screenshot if issues.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FYI, here is the suggestion to add those other fields to Lookup Issues for the Data Center version of automation: https://jira.atlassian.com/browse/JIRAAUTOSERVER-877
If it is of any consolation, when Lookup Issues was added for Jira Cloud, it also only had about a dozen fields. About a year later, all of the remaining fields were added.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Kalyan Sattaluri I can’t see what you have for the last condition (for the then statement for Edit Issue). Can you also share that?
Also are you saying that this should work for DataCenter version? I thought there was some limitation you mentioned in previous reply.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What you have for the edit issue should work. that is assign it the {{lookupIssues.Story Points.sum}}
Also, ignore what I said earlier. I had a typo and was mistaken.
Please implement like I have in my screenshot, trigger the rule by changing a story's points and check epic field and share audit log if it does not work.
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 Kalyan, I got it to work!
There are two fields called "Epic Link" and it was using the wrong one. So I changed the LookUp JQL to cf[10008] = {{issue.Epic Link}}. and it started working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great, please accept answer so it helps others in the future thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Right now the rule is only triggering on create or edit actions. I want the story points field of the epic updated anytime epic link is updated to this epic or if a child is deleted or moved. Can I accomplish all of this in one action?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can just use "Multiple Issue Events" trigger and choose Issue created, Issue Deleted, Issue updated triggers together and update epic. It should cover all your scenarios. Do note that for for issue created scenario, you need to include an additional Re fetch action because usually the rule does not have all the fields at hand when issue created is the trigger. You could separate that out as a rule by itself and rest, combine them in 1 rule. Hope it helps and as mentioned in below, please accept that answer for future reference. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I accepted the answer for the original issue.
Can you let me know how use "Multiple Issue Events" for the rule I have? Also how do I delete a component on the automation rule as currently I don't see an option to do this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Right now you have field value changed, instead you will choose "multiple issue events" trigger as below.. My suggestion is, keep "Issue created, Issue updated" together and Issue deleted a separate rule.. And add a refetch action step after trigger..
Also, I am not sure what do you mean delete component... As in remove component from issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I mean when I am setting up the rule and say I added a condition or action which I now want to remove. How do I go about doing that on the automation screen. Even right now, if I want to change the 'field value changed to 'multiple issue events' how do I do that? I don't see an obvious way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You just hover over the name of the component, see highlighted, you can edit trigger or delete components from there.
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.
I dont have access to delete issues in my instance so I dont know if re fetch will work for that scenario.. but even if that step errors out, epic will still be updated. Thats why I said to separate Issue deleted as its own rule. You can simply go back to your rule list and copy current one and modify the trigger so it should not be a lot of work,
Finally, one last addition, before refetch, include an if condition, issue type check and check if issue is a story/task, only then continue with refetch and other steps, cause this rule as it is now will run for changes made to sub-task/epic etc which you dont want...
If you make that change, everything looks good. Try it and share if issues.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you using Jira Cloud? And if so, are you using a company-managed or a team-managed project? You may find that information and the bottom-left of the screen expanding area on the page.
Company-managed projects use the "Story points" field and team-managed projects use the "Story point estimate" field...even though the UX typically calls them the same. For the smart values, the two options would be:
{{lookupIssues.Story points.sum|0}} or {{lookupIssues.Story point estimate.sum|0}}
I added a default value of 0 to the end after the sum.
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.
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.