AOP Case Update not changing defined status #4632

Open
opened 2026-02-20 16:20:59 -05:00 by deekerman · 1 comment
Owner

Originally created by @txinparta on GitHub (Oct 19, 2021).

Issue

In AOP settings I have defined case status changes. These case status changes are not applying.
A similar issue was registerd in 2017 and it was fixed: AOP Case Update not working since upgrade 7.8.3..

Expected Behavior

When the contact receives its case update by email and answers it, aside from appearing its answer related to the case in the CRM, the case status should change to the one defined in the AOP settings.

Possible Fix

File: modules/AOP_Case_Updates/CaseUpdatesHook.php: line 226

Instead of

        if ($email->intent !== 'createcase' || $email->parent_type !== 'Cases') {
            $GLOBALS['log']->warn('CaseUpdatesHook: saveEmailUpdate: Not a create case or wrong parent type');

            return;
        }

Set

        if ($email->intent !== 'createcase' && $email->intent !== 'pick' || $email->parent_type !== 'Cases') {
            $GLOBALS['log']->warn("CaseUpdatesHook: saveEmailUpdate: Not a create case or wrong parent type. Intent: $email->intent ParentType: $email->parent_type Id: $email->id");

            return;
        }

Doing it like this it appears the whole contact's replay email in the Case Updates submodule.

Steps to Reproduce

  1. Admin -> AOP Settings: Enable AOP (I have not enabled External Portal)
  2. Case Status Changes: add a case, e.g. if status is Closed change Status to Assigned
  3. Save changes
  4. Close a case
  5. Open the case's close notification received in the contact's email account and answer it
  6. In the CRM the case history submodule adds the replay email but does not change the status

Context

Its a high priority issue. If the related contact feels that its case is not properly resolved, it has to have a way to reopen the case.

Your Environment

  • SuiteCRM Version used: Version 7.11.19
  • Browser name and version: Firefox Developer Edition 88.0b9 (64-bit)
  • Environment name and version: mariadb:10.6, PHP 7.3
  • Operating System and version: Debian GNU/Linux 10 (buster)
Originally created by @txinparta on GitHub (Oct 19, 2021). #### Issue In AOP settings I have defined case status changes. These case status changes are not applying. A similar issue was registerd in 2017 and it was fixed: [AOP Case Update not working since upgrade 7.8.3.](https://github.com/salesagility/SuiteCRM/issues/3444). <!--- If you have discovered a security risk please report it by emailing security@suitecrm.com. This will be delivered to the product team who handle security issues. Please don't disclose security bugs publicly until they have been handled by the security team. ---> #### Expected Behavior When the contact receives its case update by email and answers it, aside from appearing its answer related to the case in the CRM, the case status should change to the one defined in the AOP settings. #### Possible Fix File: modules/AOP_Case_Updates/CaseUpdatesHook.php: line 226 Instead of ``` if ($email->intent !== 'createcase' || $email->parent_type !== 'Cases') { $GLOBALS['log']->warn('CaseUpdatesHook: saveEmailUpdate: Not a create case or wrong parent type'); return; } ``` Set ``` if ($email->intent !== 'createcase' && $email->intent !== 'pick' || $email->parent_type !== 'Cases') { $GLOBALS['log']->warn("CaseUpdatesHook: saveEmailUpdate: Not a create case or wrong parent type. Intent: $email->intent ParentType: $email->parent_type Id: $email->id"); return; } ``` Doing it like this it appears the whole contact's replay email in the Case Updates submodule. #### Steps to Reproduce <!--- Provide a link to a live example, or an unambiguous set of steps to --> <!--- reproduce this bug include code to reproduce, if relevant --> 1. Admin -> AOP Settings: Enable AOP (I have not enabled External Portal) 2. Case Status Changes: add a case, e.g. if status is Closed change Status to Assigned 3. Save changes 4. Close a case 5. Open the case's close notification received in the contact's email account and answer it 6. In the CRM the case history submodule adds the replay email but does not change the status #### Context Its a high priority issue. If the related contact feels that its case is not properly resolved, it has to have a way to reopen the case. #### Your Environment <!--- Include as many relevant details about the environment you experienced the bug in --> * SuiteCRM Version used: Version 7.11.19 * Browser name and version: Firefox Developer Edition 88.0b9 (64-bit) * Environment name and version: mariadb:10.6, PHP 7.3 * Operating System and version: Debian GNU/Linux 10 (buster)
Author
Owner

@txinparta commented on GitHub (Nov 7, 2021):

Hello,

The proposed solution does not work well. It has another side effect.. I like the first effect, I find it useful for the user to be able to see in the Case Updates submodule the emails the Case receives.

I have configured AOP settings in a way that when a new Case is created the application assigns automatically the least-busy user to the Case.

The second effect is as follows:
With the modification the user assigned to the Case receives many update notifications and each of them with the text of the message repeated several times :(

@txinparta commented on GitHub (Nov 7, 2021): Hello, The proposed solution does not work well. It has another side effect.. I like the first effect, I find it useful for the user to be able to see in the Case Updates submodule the emails the Case receives. I have configured AOP settings in a way that when a new Case is created the application assigns automatically the least-busy user to the Case. The second effect is as follows: With the modification the user assigned to the Case receives many update notifications and each of them with the text of the message repeated several times :(
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#4632
No description provided.