Details
Description
As discussed in - http://forum.civicrm.org/index.php/topic,23834.0.html
For anyone else looking, I found a fix for this.
It's to do with the XML processor for activities that get created, if it's not an open case task it doesn't add a subject. Which makes sense, but my client had a justification for this not being the case.
So create a copy of CRM/Case/XMLProcessor/Process.php
and at line 350, simply add
'subject' => CRM_Utils_Array::value('subject', $params) ? $params['subject'] : $activityTypeName,
Basically a straight copy and past from line 331 above.
Patch attached
If I may interject a small pet peeve here. I think CRM_Utils_Array::value() is one of the most misused functions in CivICRM. In many if not most of the times I've seen it used, 'empty()' would have been a better choice, since it is shorter to write and much faster performance-wise. So your code could be simplified and made more efficient by changing it to
'subject' => !empty($params['subject']) ? $params['subject'] : $activityTypeName,
On the other hand, CRM_Utils_Array::value() is very handy when you want to get a value that may or may not exist, and you want to supply a default value if it's not there. This situation is a good example, actually, because that inline if-statement is kind of clunky and can be better written as:
'subject' => CRM_Utils_Array::value('subject', $params, $activityTypeName),
Ultimately the inline if-statement using empty might be a better choice in this specific situation since you want to test for empty rather than testing for array_key_exists which is what CRM_Utils_Array::value() does, but I thought I'd point out both alternatives.