Details
-
Bug
-
Status: Done
-
High
-
Resolution: Won't Fix
-
5.6.10
-
None
-
None
-
2.5
Description
Summary
Actions performed by a User from the Tempo user interfaces within Jira will trigger listeners correctly, however, the message popups users can create with our UserMessageUtil class will not show.
For example, if you create listeners that listen for the WorklogUpdatedEvent or WorklogCreatedEvent and then create or edit a worklog using the Tempo user interface, the UserMessageUtils methods calls do not show the flag with your custom user message.
Steps to reproduce
- Create a listener with a script like this:
import com.atlassian.jira.event.worklog.WorklogCreatedEvent import com.atlassian.jira.event.worklog.WorklogUpdatedEvent import com.onresolve.scriptrunner.runner.util.UserMessageUtil import org.apache.log4j.Logger import org.apache.log4j.Level def log = Logger.getLogger(getClass()) log.setLevel(Level.DEBUG) if(event instanceof WorklogUpdatedEvent || event instanceof WorklogCreatedEvent) { log.debug("Trigger message") UserMessageUtil.success("You logged time...") }
- Add a work log entry with Jira's methods from the more menu "More > Log Work" and this should show the message flag correctly
- Add a new worklog with TEMPO's method "Log Time" and the message flag does not show
- Same problem if you edit a worklog from the Tempo area on the issue page
The Events are fired exactly the same in all cases and the listeners are triggered. It is the UserMessageUtil class that does not show the message when the actions are performed from the Tempo User interfaces.