Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Automation: Iterating through issue changelog

Edited
Tomislav Tobijas
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.
Oct 31, 2023

Hi,

One of our customers would like to get the following information in their report (when they export issues to Excel/CSV) - timestamp when the issue was first assigned to a user. I was thinking of creating a new custom field (date time field type) where this value would be stored + automation that would add that value based on assignee change (assignee added). However, this would cover only new issues, and for old ones, I would need to get that data somehow from Jira.

I managed to find this in the issue changelog, via URL https://<site_name>.atlassian.net/rest/api/latest/issue/<issue_key>?expand=changelog but the question is - can I, somehow with automation, go through all issues within some filter/JQL, and go through all changelogs for each issue, and find the value I'm looking for?

In the example below, you can see that in changelog entry #37, there is information that field "assignee" was changed from "null" to "<some_value>" and from there I would just need to get this "created" attribute value.2023-10-31_14-54-23.png

Any help with this would be appreciated 🙌

1 answer

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.
Oct 31, 2023

Hi @Tomislav Tobijas 

What is the problem your customer is trying to solve by having that information?  Knowing that may help the community to suggest additional solution approaches.

 

Back to your question...

Short answer to, "is this possible": maybe.

My recommendation: If you really want to do this, consider doing it with a marketplace addon that enhances the features of JQL, allowing such changelog queries.

 

Much longer answer:

If you still want to try this with a rule...

I believe the REST API function to get the change log returns pages, up to 100 entries at a time, and it returns the total number of entries.

And so a rule could, call the function once to get the count, create an advanced branch to iterate pages, and then repeatedly call the REST API function until it hits an assignment entry to update the custom field.  There are many challenges with this approach...

  • Assignee can be set at the time an issue is created.  This will not appear in the changelog as a change to the assignee.
  • You appear to want the first time of assignment, and not any assign / un-assign / assign cycles, and so the rule must process the entries in order.  Automation branches on more than one thing process in parallel and asynchronously.  Therefore there is likely no way with a rule to correctly enforce the order.
  • Rule branches are limited to 100 things.  In the unlikely event an issue has more than 10K entries, the rule would not find them.
  • Bigger problem: this type of rule would likely exceed the service limits for run-time, and so get throttled repeatedly

Kind regards,
Bill

Tomislav Tobijas
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.
Nov 02, 2023

Cheers @Bill Sheboy !

I also suggested going with the add-on in the first place but I was also wondering if there was a free solution regarding this topic. My colleagues just forwarded this request to me so I don't know the whole background but generally, this specific client is used to generate numerous reports so I guess there was some idea regarding this request as well.

They've decided not to move forward with this (as it might use too many resources at this point) but if they decide to proceed with this, I'll surely try out the things you've mentioned.

Thanks for the help and for your insights/concerns about this approach!

Best,
Tomislav

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer