-
-
Notifications
You must be signed in to change notification settings - Fork 814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev/financial#84 Remove sequential credit notes from core #16462
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,8 @@ public function setPreUpgradeMessage(&$preUpgradeMessage, $rev, $currentVer = NU | |
2 => 'https://lab.civicrm.org/dev/core/issues/1387', | ||
]); | ||
} | ||
$preUpgradeMessage .= '<br/>' . ts('The code to create sequential credit notes when contributions are refunded has been moved to an extension.') . | ||
ts('This extension has been enabled. If this feature is not important to you your performance will be improved by disabling it on the extension screen'); | ||
} | ||
} | ||
|
||
|
@@ -88,6 +90,7 @@ public function upgrade_5_23_alpha1($rev) { | |
if (!$this->hasConfigBackendData()) { | ||
$this->addTask('Drop column "civicrm_domain.config_backend"', 'dropColumn', 'civicrm_domain', 'config_backend'); | ||
} | ||
$this->addTask('Install sequential creditnote extension', 'installCreditNotes'); | ||
} | ||
|
||
/** | ||
|
@@ -167,4 +170,20 @@ private function hasConfigBackendData() { | |
&& CRM_Core_DAO::singleValueQuery('SELECT count(*) c FROM `civicrm_domain` WHERE config_backend IS NOT NULL') > 0; | ||
} | ||
|
||
/** | ||
* Install sequentialCreditNotes extension. | ||
* | ||
* This extension is being moved from core functionality to an extension. | ||
* | ||
* @param \CRM_Queue_TaskContext $ctx | ||
* | ||
* @return bool | ||
* | ||
* @throws \CiviCRM_API3_Exception | ||
*/ | ||
public static function installCreditNotes(CRM_Queue_TaskContext $ctx) { | ||
civicrm_api3('Extension', 'install', ['sequentialcreditnotes']); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So if one is accepting the premise/goal and focused on technical aspects of implementation - would it be fair to say that this task (automatically enabling the extension during an upgrade) is perhaps the main "new" thing going on? e.g. for reviewing, it's important to do some There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I separated it out #16513 |
||
return TRUE; | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a tangential cleanup? (Not trying to criticize - just so that one can read/interpret better.)