Filing activities on closed cases
UPDATE: Can do this with an extension using hook_civicrm_alterEntityRefParams. It also magically adds a Case Status filter in the &quot;refine search&quot; dropdown that appears when you start typing a name. See https://lab.civicrm.org/dev/core/-/issues/2209#note_51075 and https://github.com/AsylumSeekersCentre/civicrm-moveActivityToAnyCase

While I'd vote to bring the ability to file on a closed case back, or maybe make it a configuration option to allow or not, one workaround is to use the email processor and put the case id in square brackets in the subject (https://issues.civicrm.org/jira/browse/CRM-21446). It will happily file it on a closed case. Information about setting up the email processor is here https://docs.civicrm.org/sysadmin/en/latest/setup/civimail/inbound/#autofiling-email-activities-via-emailprocessor
And if you edit an activity and add the case id in square brackets to the subject and then save, it will file on case, e.g. &quot;this is the subject [case #1234]&quot;
According to the issue you linked, https://issues.civicrm.org/jira/browse/CRM-17645 you should be able to use a hook_civicrm_entityGet in an extension to alter the query, but I'm not sure from those notes that it actually got implemented.