Skip to content
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

Merge "Subscription" branch to dev #940

Merged
merged 5 commits into from
Apr 24, 2020
Merged

Merge "Subscription" branch to dev #940

merged 5 commits into from
Apr 24, 2020

Conversation

zannkukai
Copy link
Contributor

@zannkukai zannkukai commented Apr 20, 2020

How to test

  • ./run-tests.sh

  1. As a system_librarian, create a new patron_type or edit an existing patron_type with a valid subscription amount.
  2. edit a patron to link it with this patron type.
  3. see in patron "fees" tab, the newly created subscription fee.
  4. create a second new patron_type with a valid subscription.
  5. edit the same patron and link it to this new second patron type.
  6. see in patron "fees" tab, no new subscription will be created because the patron has already a pending subscription.

Code review check list

  • Commit message template compliance.
  • Commit message without typos.
  • File names.
  • Functions names.
  • Functions docstrings.
  • Unnecessary commited files?
  • Extracted translations?

@zannkukai zannkukai self-assigned this Apr 20, 2020
@zannkukai zannkukai force-pushed the US1297 branch 2 times, most recently from e1731af to 5df44d4 Compare April 21, 2020 10:34
@zannkukai zannkukai force-pushed the US1297 branch 2 times, most recently from baba04a to 8225c86 Compare April 23, 2020 10:45
@zannkukai zannkukai marked this pull request as ready for review April 24, 2020 08:07
@zannkukai zannkukai added this to the release: v0.8.0 milestone Apr 24, 2020
Updates some resources to allow the creation of patron subscription feature.
This commit also introduces some specific methods to create a patron
subscription. Updated resources are :
  - Patron
  - PatronType
  - PatronTransactionEvent

* Adapts resources to allow patron subscription.
* Adds functionnalities to create/check patron subscription.
* Increases code coverage
* Adds unit testing

Co-Authored-by: Renaud Michotte <[email protected]>
When a patron is create/updated, if the patron is linked to a patron
type requiring a subscription, we need to create a subscription
transaction if the patron doesn"t have any current one.
This is the purpose of this commit.

* Adds a listener method for patron signals : after_record_create, after_record_update
* Adds unit tests

Co-Authored-by: Renaud Michotte <[email protected]>
* First task : cleans old subscriptions. This task checks about obsolete stored
 patron subscriptions and remove them
* Second task : creates new subsription. Search for patrons linked to a subscription
required patron type and check if the patron need a new subscription. If yes, then create a
new subscription transaction

Co-Authored-by: Renaud Michotte <[email protected]>
Display an alert bootstrap message into the patron profile page to
inform them if a subscription is pending. This commit also add some
utils function to extract data from a "$ref" string.

Co-Authored-by: Renaud Michotte <[email protected]>
* Corrects patron JSON schema according to guidelines.
* rebase transaltions

Co-Authored-by: Renaud Michotte <[email protected]>
@zannkukai zannkukai merged commit a224758 into dev Apr 24, 2020
@zannkukai zannkukai deleted the US1297 branch May 5, 2020 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants