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

UserMessageUtil not displaying messages

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 4.3.13
    • Fix Version/s: 5.0.0, 5.0.1
    • Component/s: None
    • Labels:
    • Environment:

      reproduced on JIRA 7.1+

    • Sprint:
      Sprint 27 - Ends Jan 24, Sprint 28 - Ends Apr 19, Sprint 29 - Ends 10 May
    • Critical Points:
      0

      Description

      UserMessageUtil does not display messages correctly. Sometimes the flag is displayed on transition but not always.

      To reproduce:

      • Create a custom scripted post-function with the following inline script on transition In Progress -> In Progress (transition doesn't really matter):
        import com.onresolve.scriptrunner.runner.util.UserMessageUtil
        
        UserMessageUtil.success('Transitioned!')
        
      • Message may be displayed.
      • Transition again, message is not displayed.

      It seems that the context that is passed from the JIRA.Events.NEW_CONTENT_ADDED event is null when the message is not displayed and we simply return in this case.

        Attachments

          Activity

            People

            Assignee:
            jcarter Jonny Carter
            Reporter:
            amarkham Adam Markham
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: