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

Customer notifications not being sent when issue is resolved due to inconsistent cache state

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 3.9.2
    • 3.9.0, 3.9.1
    • Customer Notification
    • None

      Summary

      ServiceDeskOnCompletionExpectationManagerImpl Inconsistent Cache state prevents customer notifications from being sent

      Environment

      Jira Service Desk 3.9.0

      Steps to Reproduce

      1. As an Agent, Resolve an issue an existing issue via transition

      Expected Results

      customer would get notification of case being resolved

      Actual Results

      No notification is being sent to the customer, but the case is still getting resolved in Service Desk. In the logs we see the error

      2017-11-30 08:35:22,983 http-nio-8080-exec-2 WARN kamil 515x1800x1 1gvj1mo 172.20.7.1,127.0.0.1 /secure/CommentAssignIssue.jspa [c.a.s.p.b.internal.events.ServiceDeskOnCompletionExpectationManagerImpl] Inconsistent Cache state, as object returned event 'com.atlassian.jira.event.issue.IssueEvent@dcaf0ad[issue=CS-2479,comment=com.atlassian.jira.issue.comments.CommentImpl@c9797e64,worklog=<null>,changelog=[GenericEntity:ChangeGroup][id,40615][issue,22104][author,admin][created,2017-11-30 08:35:22.927],eventTypeId=13,sendMail=true,params={eventsource=workflow, baseurl=https://jira.pass},subtasksUpdated=false]' but expecting 'IssueChangedEventImpl{changeItems=[com.atlassian.jira.issue.history.ChangeItemBean@52668145[fieldType=jira,field=resolution,from=<null>,fromString=<null>,to=1,toString=Fixed,created=2017-11-30 08:35:22.927], com.atlassian.jira.issue.history.ChangeItemBean@1683f5bf[fieldType=jira,field=status,from=10301,fromString=Waiting for customer,to=5,toString=Resolved,created=2017-11-30 08:35:22.927]], author=Optional[kamil(admin)], comment=Optional[com.atlassian.jira.issue.comments.CommentImpl@c9797e64], issue=CS-2479, eventTime=Thu Nov 30 08:35:22 UTC 2017, sendMail=true}'
      2017-11-30 08:35:23,011 http-nio-8080-exec-2 WARN kamil 515x1800x1 1gvj1mo 172.20.7.1,127.0.0.1 /secure/CommentAssignIssue.jspa [c.a.s.p.b.internal.events.ServiceDeskOnCompletionExpectationManagerImpl] Inconsistent Cache state, as object returned event 'com.atlassian.jira.event.issue.IssueEvent@dcaf0ad[issue=CS-2479,comment=com.atlassian.jira.issue.comments.CommentImpl@c9797e64,worklog=<null>,changelog=[GenericEntity:ChangeGroup][id,40615][issue,22104][author,admin][created,2017-11-30 08:35:22.927],eventTypeId=13,sendMail=true,params={eventsource=workflow, baseurl=https://jira.pass},subtasksUpdated=false]' but expecting 'IssueChangedEventImpl{changeItems=[com.atlassian.jira.issue.history.ChangeItemBean@462a365a[fieldType=jira,field=resolution,from=<null>,fromString=<null>,to=1,toString=Fixed,created=2017-11-30 08:35:22.927], com.atlassian.jira.issue.history.ChangeItemBean@6f352c2e[fieldType=jira,field=status,from=10301,fromString=Waiting for customer,to=5,toString=Resolved,created=2017-11-30 08:35:22.927]], author=Optional[kamil(admin)], comment=Optional[com.atlassian.jira.issue.comments.CommentImpl@c9797e64], issue=CS-2479, eventTime=Thu Nov 30 08:35:22 UTC 2017, sendMail=true}'
      2017-11-30 08:35:23,022 http-nio-8080-exec-2 WARN kamil 515x1800x1 1gvj1mo 172.20.7.1,127.0.0.1 /secure/CommentAssignIssue.jspa [c.a.s.p.b.internal.events.ServiceDeskOnCompletionExpectationManagerImpl] Inconsistent Cache state, as object returned event 'com.atlassian.jira.event.issue.IssueEvent@dcaf0ad[issue=CS-2479,comment=com.atlassian.jira.issue.comments.CommentImpl@c9797e64,worklog=<null>,changelog=[GenericEntity:ChangeGroup][id,40615][issue,22104][author,admin][created,2017-11-30 08:35:22.927],eventTypeId=13,sendMail=true,params={eventsource=workflow, baseurl=https://jira.pass},subtasksUpdated=false]' but expecting 'IssueChangedEventImpl{changeItems=[com.atlassian.jira.issue.history.ChangeItemBean@6c1ebaeb[fieldType=jira,field=resolution,from=<null>,fromString=<null>,to=1,toString=Fixed,created=2017-11-30 08:35:22.927], com.atlassian.jira.issue.history.ChangeItemBean@e8b73f[fieldType=jira,field=status,from=10301,fromString=Waiting for customer,to=5,toString=Resolved,created=2017-11-30 08:35:22.927]], author=Optional[kamil(admin)], comment=Optional[com.atlassian.jira.issue.comments.CommentImpl@c9797e64], issue=CS-2479, eventTime=Thu Nov 30 08:35:22 UTC 2017, sendMail=true}' 
      

      Notes

      • The transition is firing an issueevent, but this event is also subsequently triggering other actions on the same thread. In turn when SD goes to check this issue in order to create the jsd notification, the status has already changed for that issue which in turn is generating this inconsistent cache state as an error that indicates jsd cannot send a message on this issue.
      • It is possible that other event based actions in Jira could also be affected by this bug. So far we just focused on notifications not working. But it follows that other event driven features such as automation, could be affected by these nested events not all getting fired as expected.

      Workaround

      1. navigate to $JIRAURL /secure/SiteDarkFeatures!default.jspa you will need to be a Jira system administrator to reach this page
      2. remove the feature flag "sd.internal.base.off.thread.on.completion.events.enabled"
      3. While this work-around can help prevent the event based problems noted in this bug, once the upgrade for 3.9.2 has been released/applied, I would recommend turning back on "sd.internal.base.off.thread.on.completion.events.enabled" so that get the benefits of faster requests (SLA indexing / updating and others will happen asynchronously).

            [JSDSERVER-5535] Customer notifications not being sent when issue is resolved due to inconsistent cache state

            Shyam Goda added a comment -

            We are also facing these issues on Jira Service Desk 3.9.1 with Jira v7.6.1 and some of the notifications are not going out to the customers, however I do not find the "sd.internal.base.off.thread.on.completion.events.enabled" dark feature on the /secure/SiteDarkFeatures!default.jspa page to turn it off.

            Since we are already on production, upgrading to 3.9.2 is not immediately feasible. is there any other workaround please?

            This problem is causing a lot of concerns with our customers when they are not notified of the updates.

            Please Help!!

            Shyam Goda added a comment - We are also facing these issues on Jira Service Desk 3.9.1 with Jira v7.6.1 and some of the notifications are not going out to the customers, however I do not find the "sd.internal.base.off.thread.on.completion.events.enabled" dark feature on the /secure/SiteDarkFeatures!default.jspa page to turn it off. Since we are already on production, upgrading to 3.9.2 is not immediately feasible. is there any other workaround please? This problem is causing a lot of concerns with our customers when they are not notified of the updates. Please Help!!

            Dear Lachlan,

            What we did was, upgrading to 3.9.2 installing the .obr file for JSD. But, the final step we needed was to restart Jira application.

            After upgrading and restarting, it worked. We have enabled "sd.internal.base.off.thread.on.completion.events.enabled" dark feature again, and it is working fine.

            Thank you for your interest  

            Soporte Excentia added a comment - Dear Lachlan, What we did was, upgrading to 3.9.2 installing the .obr file for JSD. But, the final step we needed was to restart Jira application. After upgrading and restarting, it worked. We have enabled "sd.internal.base.off.thread.on.completion.events.enabled" dark feature again, and it is working fine. Thank you for your interest  

            aalos189058794
            It's concerning that disabling the feature flag didn't work for you but it seems to be working for others.
            I just did some manual testing in 3.9.2 with the feature flag enabled and confirmed that I was receiving emails, CSAT, and automation rules were being fired.
            Can you check the automation rule audit logs and the regular Jira logs and attach them here?

            Lachlan G (Inactive) added a comment - aalos189058794 It's concerning that disabling the feature flag didn't work for you but it seems to be working for others. I just did some manual testing in 3.9.2 with the feature flag enabled and confirmed that I was receiving emails, CSAT, and automation rules were being fired. Can you check the automation rule audit logs and the regular Jira logs and attach them here?

            Using 3.9.1 we had the same problem.

            We removed the dark feature (sd.internal.base.off.thread.on.completion.events.enabled) and automation did not work.

            We upgraded to 3.9.2 and having enabled and disabled this dark feature, the same, automation is still not working. 

            The same with customer satisfaction notification

             

            Soporte Excentia added a comment - Using 3.9.1 we had the same problem. We removed the dark feature (sd.internal.base.off.thread.on.completion.events.enabled) and automation did not work. We upgraded to 3.9.2 and having enabled and disabled this dark feature, the same, automation is still not working.  The same with customer satisfaction notification  

            Yves Thomas added a comment - - edited

            Same here

            1/ satisfaction feedback notifications will not be sent

            2/ an automation rule won't work :

              -> when a trigger is fired, the rule applies but no condition seems to match, even a trivial default one (that truly should)
              -> the automation rule logs an [not executed] event

            Fortunately The proposed Workaround resolves both problems.

            Yves Thomas added a comment - - edited Same here 1/ satisfaction feedback notifications will not be sent 2/ an automation rule won't work :   -> when a trigger is fired, the rule applies but no condition seems to match, even a trivial default one (that truly should)   -> the automation rule logs an [not executed] event Fortunately The proposed Workaround resolves both problems.

            Same issue with Jira Service Desk automation. Some tickets doesn't fire the automation transitions.

            alan.ortiz@dpworldcallao.com.pe added a comment - Same issue with Jira Service Desk automation. Some tickets doesn't fire the automation transitions.

            Hi everyone,
            Sorry this bug continues to cause problems here. We are expecting to fix this in the 3.9.2 release of Service Desk. This version has not yet been released though. I do not have a clear time table for when this might get released. In the mean time, we were able to locate a new work-around for this issue that I have added to this bug. It should be able to prevent this specific problem. But I would recommend that you re-enable that setting once you have upgraded to the 3.9.2 release or higher to help the performance of Service Desk. I have also updated the notes to better indicate that the problem here does not only effect notifications. The root cause here is in regards to how events are getting fired by Service Desk. In turn other features that are dependent upon events firing could also be affected such as csat surveys and automation rules. However either the work-around or the fix applied in the 3.9.2 are expected to fix these problems as they relate to this bug.
            Regards,
            Andy

            Andy Heinzer added a comment - Hi everyone, Sorry this bug continues to cause problems here. We are expecting to fix this in the 3.9.2 release of Service Desk. This version has not yet been released though. I do not have a clear time table for when this might get released. In the mean time, we were able to locate a new work-around for this issue that I have added to this bug. It should be able to prevent this specific problem. But I would recommend that you re-enable that setting once you have upgraded to the 3.9.2 release or higher to help the performance of Service Desk. I have also updated the notes to better indicate that the problem here does not only effect notifications. The root cause here is in regards to how events are getting fired by Service Desk. In turn other features that are dependent upon events firing could also be affected such as csat surveys and automation rules. However either the work-around or the fix applied in the 3.9.2 are expected to fix these problems as they relate to this bug. Regards, Andy

            Same problem here - this is a critical issue!
            When will the fix be released?

            ControlExpert Admins added a comment - Same problem here - this is a critical issue! When will the fix be released?

            Customer satisfaction survey is not working too.

            Rodolfo Bortolin added a comment - Customer satisfaction survey is not working too.

            Automation is not working here too.

            Rodolfo Bortolin added a comment - Automation is not working here too.

              mmcmahon Matthew McMahon (Inactive)
              d7d4d87caee3 pelex
              Affected customers:
              14 This affects my team
              Watchers:
              34 Start watching this issue

                Created:
                Updated:
                Resolved: