compucorp / uk.co.compucorp.membershipextras

Membership Extras for CiviCRM
Other
5 stars 8 forks source link

IO-72: Create Automated membership upgrade rule create/update forms #295

Closed omarabuhussein closed 4 years ago

omarabuhussein commented 4 years ago

Overview

This creates forms for creating and updating automated membership upgrade rules.

Before

Theree is no place in the UI to create the Automated membership upgrade rule nor the entity itself is created yet.

After

A new entity is created called AutoMembershipUpgradeRule which contains the following main fields :

the SQL to create this entity was added to this file sql/autoupgraderuletable_install.sql which will be executed automatically when we install the extension (since the file name ends with _install). and also an upgrader (upgrade_0005) is added to create the table on existing sites by running the same SQL file.

also new form is created to allow users to create/update this new entity :

2020-09-18 13_20_21-New Automated Membership Upgrade Rule _ me4test6

hence that currently this form is only accessible by hitting the following URL :

{site-url}/civicrm/admin/member/automated-upgrade-rules/add

or by appending the id to the same URL in case of "update/edit" :

{site-url}/civicrm/admin/member/automated-upgrade-rules/add&id={target-id}

the menu item will be added later when we create the rules listing (management) page.

here is a gif for creating/updating the entity and how it will look using the API explorer :

dadada