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"

    Details

    • Type: Bug
    • Status: Triage
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: 6.9.0, 6.17.0
    • Fix Version/s: None
    • Component/s: Listeners
    • Labels:
      None
    • Critical Points:
      1

      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

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            tlihyao Tiong Yao
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: