Hi All,
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
issueToChange.setSummary(summaryString)
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?
Regards
William
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.