You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hello community,
I am in front of optimizing an routine job done in script runner.
Basically, every night, it compares some custom fields with set off issues and recreates issue links between true findings.
Thats working fine and as expected, the problem is, when users tries to reach the issue history.
Its flooded with system automation user entries of removing / recreating links.
My idea is, to
Any ideas how to achieve at least one of those?
Thanks, Tom
I am not aware of a way to create issue links using lower level API that don't also create the history. You'd need to get into some pretty complexe "OfBizDelegator" methods. You can always go explore the source code for the DefaultIssueLinkManager class (you should have access to the jira source code from your license page) to see how Jira does the createIssueLinke and removeIssueLink.
And I am not aware of a method to selectively remove history items (you can only delete the entire history for an issue, that is designed to clean up the history when you delete an issue).
My suggestion would be for your script to be smarter and only perform the absolutely necessary operations. Before adding a link, validate that conditions that would cause it to be removed later are not true. Before removing it, do the reverse validation.
I actually just accidentally came across: https://docs.atlassian.com/software/jira/docs/api/8.13.15/com/atlassian/jira/issue/link/DefaultIssueLinkManager.html#removeIssueLinksNoChangeItems-com.atlassian.jira.issue.Issue-
But it won't help you with the creation part.
And it removed ALL the issue links. As stated in the javadoc, this is intended to be paired with a delete issue operation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yup, I find that one as well. The trouble is, that the issue is very complex part of SAFe automation, so the root issues do have up to 50 links from 6-7 different link type.
The troubling automation do working with only 1 particular link type.
Well, customer is 15k+ DC priority tier, so I will try ask Atlassians as well.
Figured out, that even Tempo guys do have this issue, but with history spammed with logtime records in long terms tasks. Will keep this issue updated.
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.