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

Paging (stack request) functionnalities #708

Merged
merged 1 commit into from
May 13, 2020

Conversation

zannkukai
Copy link
Contributor

@zannkukai zannkukai commented Jan 22, 2020

This commit implements tasks relative to UCL paging request in closed stack.
It allows to limit request for items belonging to specific location.
It also allows to restrict the pickup destination to some pickup locations
instead of all pickups locations of the organisation.
If an item of a "paging" location is requested, it also allows to send
a notification to notify a manager.

how to test

Nee to test with RERO-ILS-UI : rero/rero-ils-ui#171

  • logged as a librarian, create a new location into your library. First step is to set the flag "allow_request" to false.
  • create a new item an link it to this new location
  • On an other browser, logged as a patron and try to request this item. The "request" button shouldn't be displayed

  • on your first browser (logged as librarian) edit the new location : set "allow request" to true, and restrict pickup location to one or more (not all) possible pickups locations.
  • on the second browser (logged as patron) refresh your page and try to request the item. The request select bow should only contains pickups locations that you select as possible pickups locations.

  • on librarian browser : edit the location and set "send_notification" to true and set an email address into the "contact_email" field.
  • on the patron browser : place a request on the newly created item. In your RERO-ILS console your should see than an email is send to location email address.

  • Into the professional interface, all "request" button/select should follow the same behavior.

Code review check list

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

@zannkukai zannkukai added the WIP label Jan 22, 2020
@zannkukai zannkukai self-assigned this Jan 22, 2020
@zannkukai zannkukai force-pushed the zan-#UCLpaging-update-location-schema branch 4 times, most recently from efaae4a to 29bfabf Compare January 29, 2020 10:30
@zannkukai zannkukai requested review from BadrAly, jma, rerowep, AoNoOokami, benerken, Garfield-fr, iGormilhit and lauren-d and removed request for BadrAly January 29, 2020 10:52
@zannkukai zannkukai removed the WIP label Jan 29, 2020
rero_ils/modules/loans/api.py Show resolved Hide resolved
rero_ils/modules/locations/api.py Outdated Show resolved Hide resolved
rero_ils/modules/locations/api.py Outdated Show resolved Hide resolved
@zannkukai zannkukai force-pushed the zan-#UCLpaging-update-location-schema branch 4 times, most recently from 7230501 to e208136 Compare January 30, 2020 11:02
@zannkukai zannkukai requested a review from jma January 30, 2020 12:09
Copy link
Contributor

@AoNoOokami AoNoOokami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit message:

  • Updates schema location for UCL paging feature.
  • Adapts existing features with new locations attributes.
  • Updates fixture tests.
    ?

@zannkukai zannkukai force-pushed the zan-#UCLpaging-update-location-schema branch from e208136 to b175a40 Compare February 1, 2020 10:46
@zannkukai zannkukai requested a review from AoNoOokami February 1, 2020 10:46
@zannkukai zannkukai force-pushed the zan-#UCLpaging-update-location-schema branch from b175a40 to 2062e10 Compare February 4, 2020 10:39
@zannkukai zannkukai force-pushed the zan-#UCLpaging-update-location-schema branch 10 times, most recently from 8e1c206 to 9fbc355 Compare May 9, 2020 07:28
Copy link
Contributor

@pronguen pronguen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Notification should be sent only if the item is on shelf without previous pending loan. Now, a notification is sent to the location even if the item is already in circulation.
  • Bug in the following case
    1. I have a location with pick up restriction (more than 1 pickup locations allowed)
    2. I edit this location
    3. I disable the button "Restrict pickup to"
    4. I cannot save
  • In the notification e-mail, the Date placed displays the GMT time, we want the local time
    • Detail: Is Date placed correct? I would write Request date instead.
  • Detail: in the notification e-mail, only the 1st statement of responsibility appears under Document title
  • Detail: the use of icon "truck" for a pickup location in library detailed view could be confusing since this icon is already used for requests in the main menu. The best would be to change the main menu icon, for example with the shopping-basket already in use.

@zannkukai
Copy link
Contributor Author

  • Notification should be sent only if the item is on shelf without previous pending loan. Now, a notification is sent to the location even if the item is already in circulation.

Done

  • Bug in the following case

    1. I have a location with pick up restriction (more than 1 pickup locations allowed)
    2. I edit this location
    3. I disable the button "Restrict pickup to"
    4. I cannot save

Introduced as an issue : #988

  • In the notification e-mail, the Date placed displays the GMT time, we want the local time

Done : Should be test on ilsdev

  • Detail: Is Date placed correct? I would write Request date instead.

Done

  • Detail: in the notification e-mail, only the 1st statement of responsibility appears under Document title

I used the same method than all other emails (recall, due_soon, ...) send to user.

  • Detail: the use of icon "truck" for a pickup location in library detailed view could be confusing since this icon is already used for requests in the main menu. The best would be to change the main menu icon, for example with the shopping-basket already in use.

Done

@zannkukai zannkukai force-pushed the zan-#UCLpaging-update-location-schema branch 5 times, most recently from fb58457 to e57912e Compare May 13, 2020 09:22
@zannkukai zannkukai force-pushed the zan-#UCLpaging-update-location-schema branch 3 times, most recently from 3b13224 to c1b0343 Compare May 13, 2020 12:58
This commit implements tasks relative to UCL paging request in closed stack.
It allows to limit request for items belonging to specific location.
It also allows to restrict the pickup destination to some pickup locations
instead of all pickups locations of the organisation.
If an item of a "paging" location is requested, it also allows to send
a notification to notify a manager.

* Adds some tests function to cover new functionalities.
* Refactoring circulation actions permissions (can_request, ...)
* Increases general code coverage

Co-Authored-by: Renaud Michotte <[email protected]>
@zannkukai zannkukai force-pushed the zan-#UCLpaging-update-location-schema branch from c1b0343 to 62b1b09 Compare May 13, 2020 13:26
@zannkukai zannkukai merged commit 85448e9 into rero:dev May 13, 2020
@zannkukai zannkukai deleted the zan-#UCLpaging-update-location-schema branch May 27, 2020 06:22
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.

7 participants