Skip to content
Snippets Groups Projects
Closed Incorrect comparison of status_id when changing status of linked cases
  • View options
  • Incorrect comparison of status_id when changing status of linked cases

  • View options
  • Closed Issue created by DaveD

    It ends up working anyway because it will just change the status of the other case to the same thing it already was so you don't see any problem, but it's comparing wrong and you get an E_NOTICE: Undefined index: status_id in CRM_Case_Form_Activity_ChangeCaseStatus::beginPostProcess() (line 137 of .../CRM/Case/Form/Activity/ChangeCaseStatus.php).

    1. Create a case.
    2. Create another case.
    3. Create a link cases activity and link them.
    4. Create a change case status activity and check the box to update related cases.
    5. Click save.

    It looks like it's been this way since it was implemented: https://github.com/civicrm/civicrm-core/commit/74b15fae91a220e2b1ab6f29f6e86001743eac0d#diff-784c2a130a993b23166dadf7f1ddc489R156. The available field at that point is a label not the id (the word id here would really mean option_value.value, but that's not the issue).

    So two options:

    1. Just remove the if, since that's effectively what it's been doing this whole time.
    2. Include status_id in the results returned from getRelatedCases().

    Linked items ... 0

  • Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    Loading Loading Loading Loading Loading Loading Loading Loading Loading Loading