Feature to file emails on multiple case ids provided in the url not working
I don't use this feature, and the ability to use multiple case ids appears to have originally been added for CiviHR, but this came up while looking into something else.
After #1750 (closed), what happens now is multiple activities are created if there were multiple recipients. The code at https://github.com/civicrm/civicrm-core/blob/master/CRM/Contact/Form/Task/EmailTrait.php#L453-L457 loops thru all the case ids in the url and files the activity on them. However, after #1750 (closed), the activity id being used here is only the last activity created, because it's the one from here which is now within the loop, but it's not returned until after the loop. So that would be the first problem, and is technically a regression in 5.36.
However, for a single case id it's not necessary anyway to do the filing loop in EmailTrait.php since it was already filed on the case by the api call at https://github.com/civicrm/civicrm-core/blob/9a518a43e3296153eae8a1bb22bcdc350aebea9a/CRM/Activity/BAO/Activity.php#L984.
However*2, if you have multiple case ids the problem is it doesn't even get to the first problem because that api call fails because
CiviCRM_API3_Exception: "case_id is not a valid integer". That might have broke at https://github.com/civicrm/civicrm-core/commit/f7f1cc3b179536bcf2b3e8d1c49a481c155fc933 but I haven't confirmed and possibly hasn't been working for a long time.
@jamienovick1 Does CiviHR still use this feature to set multiple case ids in the url for email activities?