Answers.Body: <p>Those upgrade steps are updating particular fields in smartgroups.  If you don't have any smart groups using those fields, it won't matter... but if those steps are failing it suggests you <em>do</em> have affected smart groups and those won't work correctly.  You could delete those groups and recreate them.</p>
  <p>But the underlying question is why is the upgrade hitting problems?  If for example the field renames have failed, that will cause you more trouble in the future.  I suggest you post the errors from the logs for the failing upgrade steps so we can diagnose the cause.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-05-05T13:38:07.720Z
Answers.Text: I have only one smart group, I think it was for testing.
  Where can I check the names of these fields? What fields are they? System fields or custom or other fields?
Answers.UserDisplayName: Alain Rihs
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-05-04T08:52:36.463Z
Answers.LastActivityDate: 2021-05-04T08:52:36.463Z
Answers.UserDisplayName: Aidan
Body: <p>In Drupal 7, after this long update from 5.4 to 5.36.1 in a CiviCRM which I take administration, I had 2 blocking errors in the sites/all/modules/civicrm/CRM/Upgrade/Incremental/php/FiveTwenty.php file. I commented on the 2 lines that are problematic and the update could be done completely :</p>
  <pre><code>    $this-&gt;addTask('Update smart groups to rename filters on case_from and case_to to case_start_date and case_end_date', 'updateSmartGroups', [
    'renameField' =&gt; [
      ['old' =&gt; 'case_from_relative', 'new' =&gt; 'case_start_date_relative'],
      ['old' =&gt; 'case_from_start_date_high', 'new' =&gt; 'case_start_date_high'],
      ['old' =&gt; 'case_from_start_date_low', 'new' =&gt; 'case_start_date_low'],
      ['old' =&gt; 'case_to_relative', 'new' =&gt; 'case_end_date_relative'],
      ['old' =&gt; 'case_to_end_date_high', 'new' =&gt; 'case_end_date_high'],
      ['old' =&gt; 'case_to_end_date_low', 'new' =&gt; 'case_end_date_low'],
      ['old' =&gt; 'mailing_date_relative', 'new' =&gt; 'mailing_job_start_date_relative'],
      ['old' =&gt; 'mailing_date_high', 'new' =&gt; 'mailing_job_start_date_high'],
      ['old' =&gt; 'mailing_date_low', 'new' =&gt; 'mailing_job_start_date_low'],
      ['old' =&gt; 'relation_start_date_low', 'new' =&gt; 'relationship_start_date_low'],
      ['old' =&gt; 'relation_start_date_high', 'new' =&gt; 'relationship_start_date_high'],
      ['old' =&gt; 'relation_start_date_relative', 'new' =&gt; 'relationship_start_date_relative'],
      ['old' =&gt; 'relation_end_date_low', 'new' =&gt; 'relationship_end_date_low'],
      ['old' =&gt; 'relation_end_date_high', 'new' =&gt; 'relationship_end_date_high'],
      ['old' =&gt; 'relation_end_date_relative', 'new' =&gt; 'relationship_end_date_relative'],
      ['old' =&gt; 'event_start_date_low', 'new' =&gt; 'event_low'],
      ['old' =&gt; 'event_end_date_high', 'new' =&gt; 'event_high'],
    ],
  ]);
  </code></pre>
  <p>and 3 lines after, from 120 to 134 :</p>
  <pre><code>    $this-&gt;addTask('Update smart groups where jcalendar fields have been converted to datepicker', 'updateSmartGroups', [
    'datepickerConversion' =&gt; [
      'birth_date',
      'deceased_date',
      'case_start_date',
      'case_end_date',
      'mailing_job_start_date',
      'relationship_start_date',
      'relationship_end_date',
      'event',
      'relation_active_period_date',
      'created_date',
      'modified_date',
    ],
  ]);
  </code></pre>
  <p>Can anyone tell me if the 2 commented lines will pose a problem later and how to manually perform the operations left out?</p>
  <p>I found this question but I didn't know what to do in my case : <a href="https://civicrm.stackexchange.com/questions/34152/upgrade-fails-with-civicrm-api3-exception-api-error-could-not-delete-payment">Upgrade fails with CiviCRM_API3_Exception: &quot;API error: Could not delete payment processor type&quot;</a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-10-01T15:45:47.627Z
Comments.Text: We hit this same upgrader issue too due to smart groups being broken. Did you resolve?
Comments.UserDisplayName: Andy Burns
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-10-08T16:16:54.380Z
Comments.Text: No, I didn’t really solve the problem. I commented on the 2 lines and restarted the process and the update passed. On the other hand, not using the smarts groups, I don’t know if commenting on these 2 lines will pose a problem for the continuation of the use of CiviCRM...
  Did you follow the link to the other discussion?
Comments.UserDisplayName: Alain Rihs
Tags: <drupal><upgrade>
Title: Update from 5.4 to 5.36.1 : problem to Update smart groups to rename filters on case_from and case_to to case_start_date and case_end_date
ThreadText: # Update from 5.4 to 5.36.1 : problem to Update smart groups to rename filters on case_from and case_to to case_start_date and case_end_date
  
  (Asked by: username_0 on 2021-05-04)
  
  In Drupal 7, after this long update from 5.4 to 5.36.1 in a CiviCRM which I take administration, I had 2 blocking errors in the sites/all/modules/civicrm/CRM/Upgrade/Incremental/php/FiveTwenty.php file. I commented on the 2 lines that are problematic and the update could be done completely :
  
  ```
      $this->addTask('Update smart groups to rename filters on case_from and case_to to case_start_date and case_end_date', 'updateSmartGroups', [
    'renameField' => [
      ['old' => 'case_from_relative', 'new' => 'case_start_date_relative'],
      ['old' => 'case_from_start_date_high', 'new' => 'case_start_date_high'],
      ['old' => 'case_from_start_date_low', 'new' => 'case_start_date_low'],
      ['old' => 'case_to_relative', 'new' => 'case_end_date_relative'],
      ['old' => 'case_to_end_date_high', 'new' => 'case_end_date_high'],
      ['old' => 'case_to_end_date_low', 'new' => 'case_end_date_low'],
      ['old' => 'mailing_date_relative', 'new' => 'mailing_job_start_date_relative'],
      ['old' => 'mailing_date_high', 'new' => 'mailing_job_start_date_high'],
      ['old' => 'mailing_date_low', 'new' => 'mailing_job_start_date_low'],
      ['old' => 'relation_start_date_low', 'new' => 'relationship_start_date_low'],
      ['old' => 'relation_start_date_high', 'new' => 'relationship_start_date_high'],
      ['old' => 'relation_start_date_relative', 'new' => 'relationship_start_date_relative'],
      ['old' => 'relation_end_date_low', 'new' => 'relationship_end_date_low'],
      ['old' => 'relation_end_date_high', 'new' => 'relationship_end_date_high'],
      ['old' => 'relation_end_date_relative', 'new' => 'relationship_end_date_relative'],
      ['old' => 'event_start_date_low', 'new' => 'event_low'],
      ['old' => 'event_end_date_high', 'new' => 'event_high'],
    ],
  ]);
  
  ```
  
  and 3 lines after, from 120 to 134 :
  
  ```
      $this->addTask('Update smart groups where jcalendar fields have been converted to datepicker', 'updateSmartGroups', [
    'datepickerConversion' => [
      'birth_date',
      'deceased_date',
      'case_start_date',
      'case_end_date',
      'mailing_job_start_date',
      'relationship_start_date',
      'relationship_end_date',
      'event',
      'relation_active_period_date',
      'created_date',
      'modified_date',
    ],
  ]);
  
  ```
  
  Can anyone tell me if the 2 commented lines will pose a problem later and how to manually perform the operations left out?
  
  I found this question but I didn't know what to do in my case : [Upgrade fails with CiviCRM\_API3\_Exception: "API error: Could not delete payment processor type"](https://civicrm.stackexchange.com/questions/34152/upgrade-fails-with-civicrm-api3-exception-api-error-could-not-delete-payment)
  
  **Tags:** drupal, upgrade
  
  > **Comments:**
  > **username_1**: We hit this same upgrader issue too due to smart groups being broken. Did you resolve?  
  > **username_0**: No, I didn’t really solve the problem. I commented on the 2 lines and restarted the process and the update passed. On the other hand, not using the smarts groups, I don’t know if commenting on these 2 lines will pose a problem for the continuation of the use of CiviCRM... Did you follow the link to the other discussion?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2021-05-04. Score: 1
  
  Those upgrade steps are updating particular fields in smartgroups. If you don't have any smart groups using those fields, it won't matter... but if those steps are failing it suggests you *do* have affected smart groups and those won't work correctly. You could delete those groups and recreate them.
  
  But the underlying question is why is the upgrade hitting problems? If for example the field renames have failed, that will cause you more trouble in the future. I suggest you post the errors from the logs for the failing upgrade steps so we can diagnose the cause.
  
  > **Comments:**
  > **username_0**: I have only one smart group, I think it was for testing. Where can I check the names of these fields? What fields are they? System fields or custom or other fields?  
  
  ---
  
  