Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-4095

UserMessageUtil does not show flag message when users add new or edit existing worklogs through TEMPO

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • High
    • Resolution: Won't Fix
    • 5.6.10
    • None
    • Script Listeners
    • 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

      1. 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...")
        }
        
      2. Add a work log entry with Jira's methods from the more menu "More > Log Work" and this should show the message flag correctly
      3. Add a new worklog with TEMPO's method "Log Time" and the message flag does not show
      4. 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.

      Attachments

        Activity

          People

            twozniak Tomasz Wozniak [X] (Inactive)
            mclark Matthew Clark
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: