Fix activity view bug where an activity type id in the url overrides the actual activ...
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 18 Sep 2023 21:29:23 +0000 (09:29 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 3 Dec 2023 21:18:23 +0000 (10:18 +1300)
commitc69cd9b1b5b8d0664a8bec880693599a970e49f6
tree2296def8776837743a14e42c801470482c9bebcf
parent9db056283f28cbdd6a5d850e505b33ded2a6779d
Fix activity view bug where an activity type id in the url overrides the actual activity type id

When we view an activity there is code in the template that renders differently depending on the
activity type id. However, if the activity ID (atype) is wrong in the url it gives the url precedence

This is a bit obscure - I hit it when I changed the activity type id in the database & the view
did not update
CRM/Activity/Form/Activity.php
CRM/Activity/Form/ActivityFormTrait.php [new file with mode: 0644]
Civi/Test/FormWrapper.php
templates/CRM/Activity/Form/Activity.tpl
templates/CRM/Activity/Form/ActivityView.tpl
templates/CRM/Case/Form/Activity.tpl
templates/CRM/Case/Form/Case.tpl
tests/phpunit/CRM/Activity/Form/ActivityTest.php
tests/phpunit/CRM/Case/BAO/CaseTest.php