Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-15539

Assets - Notifications are sent to the watcher who is made inactive on Jira

      Issue Summary

      Notifications are sent to an inactive user who is the watcher of an Assets object.

      The same use case for JSM or JSW , when an inactive user is an watcher - the email is not sent. It is only for Asset objects and it doesn't respect if the outgoing email is disabled (Notifications are still sent to object watcher)

      Steps to Reproduce

      1. Create an object schema with Objects 
      2. Add an user (Say User A) as an watcher to an object
      3. Login as User B and made some changes to the object
      4. User A will receive notifications.
      5. Now deactivate the user on Jira, on user management. 
        1. Issue is reproducible even when the user's access to object is revoked.
      6. As User B, make some changes to the object.
      7. Email will be triggered to User A, even if the user is marked as inactive

      Expected Results

      Email not triggered to inactive user.

      Actual Results

      Email will be triggered to User A, even if the user is marked as inactive

      Workaround

      • Delete the user 
      • Remove the inactive user as watcher from the object using the below SQL query 
        SELECT 
           OW.*,
           CU."display_name"
        FROM public."AO_8542F1_IFJ_OBJ_WATCH" OW
        LEFT OUTER JOIN "app_user" AU ON AU."user_key" = "USER_KEY"
        LEFT OUTER JOIN "cwd_user" CU ON AU."lower_user_name" = CU."lower_user_name"
             WHERE OW."OBJECT_ID" = XX;  

        Once the records are identified, perform deletion of these records from AO_8542F1_IFJ_OBJ_WATCH table.
        Ensure to take a backup of the DB

      Versions Tested

      Please confirm all versions that have been tested for this issue, and indicate whether the tested version is affected or not affected, below: 

      Testing Requirements Version Affected Version
      Customers Reported Version 5.4.27 Yes
      Most Recent Bug-Fix Release    
      Previous Major Release    
      Most Recent LTS    
      Previous Supported LTS    
      Other Versions..    
      (Add rows as needed)    

              jxu2@atlassian.com Sam Xu
              06613d25b549 Raja
              Affected customers:
              0 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: