seek and document activityTypeName
authorDemeritCowboy <demeritcowboy@hotmail.com>
Fri, 2 Aug 2019 04:24:36 +0000 (00:24 -0400)
committerDemeritCowboy <demeritcowboy@hotmail.com>
Fri, 2 Aug 2019 04:24:36 +0000 (00:24 -0400)
CRM/Financial/Form/FinancialBatch.php
templates/CRM/Activity/Form/Activity.tpl
templates/CRM/Case/Form/Activity.tpl
tests/phpunit/CRM/Core/BAO/MessageTemplateTest.php
tools/bin/scripts/testProcess.php

index 283db9a3a24173137d8d8a126c9f73f2af1c1236..94574348b2bc5049304dfb47f5b689d1371cbfb3 100644 (file)
@@ -235,6 +235,7 @@ class CRM_Financial_Form_FinancialBatch extends CRM_Contribute_Form {
 
     // create activity.
     $activityParams = [
+      // activityTypeName - dev/core#1116-unknown-if-ok
       'activity_type_id' => CRM_Core_PseudoConstant::getKey('CRM_Activity_DAO_Activity', 'activity_type_id', $activityTypeName),
       'subject' => $batch->title . "- Batch",
       'status_id' => CRM_Core_PseudoConstant::getKey('CRM_Activity_DAO_Activity', 'activity_status_id', 'Completed'),
index e43909aa4ded107c517dc7e80bcc4dbdae86e6ed..f1ca57e4854f6ee6259e82f644c945878c8f74a7 100644 (file)
   </tr>
   <tr class="crm-activity-form-block-details">
     <td class="label">{$form.details.label}</td>
+    {* activityTypeName means label here not name, but it should be name (dev/core#1116-fixme) *}
     {if $activityTypeName eq "Print PDF Letter"}
       <td class="view-value">
       {$form.details.html}
       </td>
+    {* activityTypeName means label here not name, but it should be name (dev/core#1116-fixme) *}
     {elseif $activityTypeName eq "Inbound Email"}
       <td class="view-value">
        {$form.details.html|crmStripAlternatives|nl2br}
index dc48f6202e601a77fcda6ba6ccb42fbd3b6955cb..4a8935e99855db0247e8391b18f4652820eb24fb 100644 (file)
   <div class="messages status no-popup">
     <i class="crm-i fa-info-circle"></i> &nbsp;
     {if $action eq 8}
+      {* activityTypeName means label here not name, but it's ok because label is desired here (dev/core#1116-ok-label) *}
       {ts 1=$activityTypeName}Click Delete to move this &quot;%1&quot; activity to the Trash.{/ts}
     {else}
+      {* activityTypeName means label here not name, but it's ok because label is desired here (dev/core#1116-ok-label) *}
       {ts 1=$activityTypeName}Click Restore to retrieve this &quot;%1&quot; activity from the Trash.{/ts}
     {/if}
   </div><br />
 
                 <tr class="crm-case-activity-form-block-activityTypeName">
                   <td class="label">{ts}Activity Type{/ts}</td>
+                  {* activityTypeName means label here not name, but it's ok because label is desired here (dev/core#1116-ok-label) *}
                   <td class="view-value bold">{$activityTypeName|escape}</td>
                 </tr>
                 <tr class="crm-case-activity-form-block-source_contact_id">
index 1009943a7162d5e7b22cff3a7870596bab20d18d..fd50f2212af91c9932b2184ad9dd2d101637b3a7 100644 (file)
@@ -21,6 +21,7 @@ class CRM_Core_BAO_MessageTemplateTest extends CiviUnitTestCase {
     $tplParams = [
       'isCaseActivity' => 1,
       'client_id' => $client_id,
+      // activityTypeName means label here not name, but it's ok because label is desired here (dev/core#1116-ok-label)
       'activityTypeName' => 'Follow up',
       'activity' => [
         'fields' => [
index 077836aa983fb74770fe0211f7e58c2cf6a4601e..8d2668c5260d4dd745d8196dd707e4d2ff92ecce 100644 (file)
@@ -15,6 +15,7 @@ $params = [
   'clientID' => 104,
   'creatorID' => 108,
   'standardTimeline' => 1,
+  // activityTypeName means name here not label, and that is correct here (dev/core#1116-ok-name)
   'activityTypeName' => 'Open Case',
   'dueDateTime' => time(),
   'caseID' => 1,