Skip to content

Commit

Permalink
Update zwb_donation_receipt_item custom field group. systopia#156
Browse files Browse the repository at this point in the history
  • Loading branch information
muniodiego committed Sep 4, 2023
1 parent c797d69 commit 0827b1e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CRM/Donrec/DataStructure.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,19 @@ class CRM_Donrec_DataStructure {
'style' => 'Inline',
'collapse_display' => 1,
'is_active' => 1,
'is_multiple' => 1,
);
public static $customGroups = array(
array(
'name' => 'zwb_donation_receipt',
'title' => 'donation-receipt',
'extends' => 'Contact',
'is_multiple' => 1,
),
array(
'name' => 'zwb_donation_receipt_item',
'title' => 'donation-receipt-item',
'extends' => 'Contribution',
'is_multiple' => 0,
)
);
public static $customFieldDefaults = array(
Expand Down
13 changes: 13 additions & 0 deletions CRM/Donrec/Upgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -513,4 +513,17 @@ public function upgrade_0220() {
return TRUE;
}

/**
* Upgrade to 2.2:
* - Update zwb_donation_receipt_item custom field group
* @link https://github.com/systopia/de.systopia.donrec/issues/156
*/
public function upgrade_0230() {
civicrm_api3('CustomGroup', 'get', [
'name' => "zwb_donation_receipt_item",
'api.CustomGroup.create' => ['id' => "\$value.id", 'is_multiple' => 0],
]);
return TRUE;
}

}

0 comments on commit 0827b1e

Please sign in to comment.