I have two projects, Incident Management and Problem Management. In the Incident Management project I have a field titled 'Total Agent Hours' that we fill in with a numeric value at the end of every incident to reflect how many hours it has cost us from an end user CS agent perspective. We then link our incidents to problem tickets in the Problem Management project. One problem can have multiple incidents linked to it if necessary.
I would like to be able to set up a rule or automation that takes the 'Total Agent Hours' value from the incident tickets and returns a sum of them on the problem ticket. I would like this to update each time a new incident ticket is linked to the problem ticket so as to show a running total. For example:
Incident ticket 123 has a value of 10 agent hours, when it is linked to problem ticket 123 the value of 10 is shown in the agent hours field.
Incident ticket 345 has a value of 20 agent hours and is subsequently linked to problem ticket 123. The value in he agent hours field should now read 30.
Is it possible to set this up using Project Automation? We do have scriptrunner installed, but this seems more complex to set up and I am the only one that can set these things up and I'm not good with scriptrunner!
Many thanks for your help.
Welcome to community! For Project Automation, if i'm understanding this correctly, we're looking at just a single field but different Project is it? If so I believe script runner might be a more suitable candidate for this use case. As i'm now wondering how to does the Automation know which tickets to calculate or will this be pre-determined?
You might be able to use Automation For Jira for that. Take a look at this post and see Rule #2 as a guide.
This looks like it might be a solution however, when I tried on Friday last week to make it work, I can only get it to remove a value from the field rather than adding it in. For example,
I manually added in the value of 0 to the field in the Problem ticket. I ran this rule and updated the same field in a linked Incident ticket to 40. The rule told me it ran successfully (in the audit log) but when I went to the Problem ticket I found that the field had been cleared?
The only thing I changed was in the edit field section to match the field I needed to look up:
Any ideas where I'm going wrong?
Hi @John Funk thanks. No idea how that got in there! I've removed but the rule still doesn't pull the agent hours from the incident to the problem. The audit log doesn't show any errors which makes me think the rule is working but just not doing what I want it to do?
Thanks four your help @John Funk really appreciate it. I'm now getting errors if I try and use the above (with my custom field id's).
I've tried a variation of both:
and for both I get the reult in audit log of 'Some Errors' and under the details I have the error of 'Missing parameter(s) for operator -u: -/+' (depending on the code above).
Sorry to be a massive pain, but anything else you can suggest?
Thanks, I still get the same error when doing that too. I'm beggining to wonder if this is actually possible in Jira or whether or not I should look into eazyBI (we have that installed) to see if I could do it that way. It's not ideal but at least it would give us the information at a glance. Or even if Scriptrunner is something that I should explore more (I'm not very good with that either!)
Do you have any suggestions as to how else I might be able to get this?
That's really weird because it works fine for mine.
I would go ahead and open a support ticket with Atlassian:
Then please come back here and update with the resolution so we can help future folks, and can close this post out.
Hey there Cloud Community members! We’re excited to give you the first glimpse of the new home for business teams on Jira — Jira Work Management. Jira Work Management is the next generation of J...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events