when I update the summary of an issue (new or after an edit) via a groovy post function, the summary on the card on a Kanban board is not reliably updated. The summary changes in the issue and the detail view to the right, but the card on the board itself is not affected until it is edited or transitioned for the next time.
Here is the code I am using:
def im = ComponentAccessor.getIssueManager();
def issueToChange = im.getIssueObject(issue.id) as MutableIssue
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
def userManager = ComponentAccessor.getUserManager();
def user = userManager.getUserByName(currentUser.name)
im.updateIssue(user, issueToChange, EventDispatchOption.DO_NOT_DISPATCH, false)
I have discovered though that if I change the updateIssue() call to dispatch an Event
im.updateIssue(user, issueToChange, EventDispatchOption.ISSUE_ASSIGNED, false)
then everything works as expected. Unfortunately, as I am using a Listener to listen for many Issue event types, this leads to problems in preventing infinite loops, where I currently have to disable my script for the ISSUE_ASSIGNED event type (as this is the least important to me).
This feels very much like something that will eventually come back to bite me hard ;-)
So my question is: Can I either dispatch a custom event somehow (instead of ISSUE_ASSIGNED) or alternatively, is there some other way to trigger the cards on the kanban board to update themselves from a post function?
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