I have 3 scenarios that I'm working to ensure Story FixVersion fields are synced to the Epic Link they are attached to.
1. Story Created and linked to Epic - Working using PostFunction "Copy Value From Other Field (JSU)".
2. Update Existing Linked Issues when Epic FixVersion Added/Modified - Working using Scriptrunner Listener
def issueLinkManager = ComponentAccessor.getIssueLinkManager()
def epicissue = event.issue as MutableIssue
def issueManager = ComponentAccessor.getIssueManager();
def versionManager = ComponentAccessor.getVersionManager();
def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
if (epicissue.getIssueType().getName() == "Epic")issueLinkManager.getOutwardLinks(epicissue.id).each {
issueLink ->if (issueLink.getDestinationObject().getIssueType().name == "Story")
{
MutableIssue issue = issueLink.getDestinationObject() as MutableIssue;
def currentValue = epicissue.getFixVersions()
issue.setFixVersions(currentValue);
issueManager.updateIssue(user, issue, EventDispatchOption.ISSUE_UPDATED, false)
boolean wasIndexing = ImportUtils.isIndexIssues();
IssueIndexingService indexing = (IssueIndexingService) ComponentAccessor.getComponent(IssueIndexingService.class)
indexing.reIndex(issue)
ImportUtils.setIndexIssues(wasIndexing)
}
}
3. Update FixVersion on Existing Story when Linked to Epic - Not Working
In regards to #3, I'm trying to decide which approach is the best to take. Should this be a Behaviour set on the Epic Link field of the Story or Custom Listener (using IssueLinkCreatedEvent)? I am having trouble finding examples of either. Any help would be greatly appreciated!
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.