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

UserMessageUtil does not show flag message on Listener Event "ProjectRoleUpdatedEvent"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • Low
    • Resolution: Fixed
    • 6.9.0, 6.17.0
    • 8.7.0
    • Script Listeners
    • None
    • 2

    Description

      The user wishes to pop out a message with UserMessageUtil when Listener event "ProjectRoleUpdatedEvent" triggered.

      However, UserMessageUtil seems to only work on the Listener event "Issue create/update" but failed on "ProjectRoleUpdatedEvent."

      Steps to Reproduce

      1. Creat an Listener > mapped to all project
      2. Set the events to "ProjectRoleUpdatedEvent"
      3. Apply a simple UserMessageUtil script:
        import com.onresolve.scriptrunner.runner.util.UserMessageUtil
        // get requestUrl as above
        UserMessageUtil.warning("Please authenticate to Confluence before executing this transition.")
        

      4. Update the Listener
      5. Go to the project setting > Users and roles
      6. Update any user's role

      Expected Behaviour

      A warning message should be displayed at the right corner of the page

      Actual Behaviour

      Nothing happens after editing the user role, I tried refreshing the page and nothing happened as well.

      Workaround

      UserMessageUtil works with "Issue Created" event

      1. Creat an Listener > mapped to all project
      2. Set the events to "Issue Created"
      3. Apply a simple UserMessageUtil script
        import com.onresolve.scriptrunner.runner.util.UserMessageUtil
        // get requestUrl as above
        UserMessageUtil.warning("Please authenticate to Confluence before executing this transition.")
        
      4. Update the Listener
      5. Go to the project setting > Users and roles
      6. Update any user's role
      7. Warning message appears

      Additional Info

      I can confirm the Listener was triggered when there are updates on the user's role with a log error message.

      Here I attached the result of the log after updating a user's role:

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tlihyao Tiong Yao
              Votes:
              6 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: