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.