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

circulation: allow 'less than one day' checkout #1477

Merged
merged 1 commit into from
Dec 10, 2020

Conversation

AoNoOokami
Copy link
Contributor

@AoNoOokami AoNoOokami commented Nov 20, 2020

  • Changes minimum checkout duration in the circulation policy JSON
    schema to allow 'less than one day' checkouts.

Co-Authored-by: Alicia Zangger alicia.zangger@rero.ch

Why are you opening this PR?

Task 1881 of US1759
https://tree.taiga.io/project/rero21-reroils/us/1759?milestone=277700

Dependencies

My PR depends on the following rero-ils-ui's PR(s):

N/A

How to test?

Please do code review only.

Code review check list

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

@AoNoOokami AoNoOokami added this to the v0.15.0 milestone Nov 20, 2020
@AoNoOokami AoNoOokami self-assigned this Nov 20, 2020
@AoNoOokami AoNoOokami added the f: circulation Concerns the circulation interface or backend label Nov 20, 2020
@AoNoOokami AoNoOokami force-pushed the zaa-#1881-checkout-per-hours branch from 529d6a3 to c49b589 Compare November 20, 2020 13:13
@AoNoOokami AoNoOokami changed the title ci-po: allow per hours checkout ci-po: allow 'less than one day' checkout Nov 20, 2020
@AoNoOokami AoNoOokami marked this pull request as ready for review November 20, 2020 13:15
@iGormilhit iGormilhit added the f: data About data model, importation, transformation, exportation of data, specific for bibliographic data label Nov 23, 2020
Copy link

@iGormilhit iGormilhit 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 proposition:

circulation: allow 'less than one day' checkout

* Changes minimum checkout duration in the circulation policy JSON
  schema to allow 'less than one day' checkouts.

Co-Authored-by: Alicia Zangger <alicia.zangger@rero.ch>

@iGormilhit iGormilhit changed the title ci-po: allow 'less than one day' checkout circulation: allow 'less than one day' checkout Nov 23, 2020
@AoNoOokami AoNoOokami marked this pull request as draft November 23, 2020 08:41
@AoNoOokami AoNoOokami force-pushed the zaa-#1881-checkout-per-hours branch 5 times, most recently from d90aa92 to e585e0d Compare November 24, 2020 12:23
@AoNoOokami AoNoOokami marked this pull request as ready for review November 25, 2020 07:21
@AoNoOokami AoNoOokami force-pushed the zaa-#1881-checkout-per-hours branch from e585e0d to 63081b8 Compare November 25, 2020 07:24
tests/fixtures/organisations.py Show resolved Hide resolved
tests/ui/circulation/test_inhouse_cipo.py Show resolved Hide resolved
tests/ui/circulation/test_inhouse_cipo.py Show resolved Hide resolved
tests/ui/circulation/test_inhouse_cipo.py Show resolved Hide resolved
tests/ui/circulation/test_inhouse_cipo.py Show resolved Hide resolved
@AoNoOokami AoNoOokami force-pushed the zaa-#1881-checkout-per-hours branch 2 times, most recently from 3d62ed8 to bd23d7a Compare November 25, 2020 14:38
@AoNoOokami AoNoOokami requested a review from BadrAly November 25, 2020 16:08
@AoNoOokami AoNoOokami force-pushed the zaa-#1881-checkout-per-hours branch from bd23d7a to 35fd084 Compare November 30, 2020 10:04
@AoNoOokami AoNoOokami marked this pull request as draft November 30, 2020 11:04
@AoNoOokami AoNoOokami force-pushed the zaa-#1881-checkout-per-hours branch from 35fd084 to 378f95a Compare December 1, 2020 10:26
@AoNoOokami AoNoOokami requested review from rerowep and removed request for jma December 1, 2020 10:28
@AoNoOokami AoNoOokami marked this pull request as ready for review December 2, 2020 07:16
@AoNoOokami AoNoOokami removed the request for review from rerowep December 2, 2020 07:30
@pronguen
Copy link
Contributor

pronguen commented Dec 2, 2020

  • It seems that the switch library (as a system librarian) does not work anymore. To reproduce: 1. Switch library. 2. Reload page. 3. See that the first login library re-appear in the "switch" menu
  • The loan for the same day gives a due date in the next day. Try it with this item (barcode = asdf) in library AOSTE-LYCEE. I adapted the opening hours, but even if it is still open today, the due date is set tomorrow.
  • In the cipo editor
    • I cannot save the form when I enter a not integer in some fields. All fields (except "Frais") must contain only integer. A validation message should be displayed if a decimal is entered.
    • I should not be able to enter decimal with more than 2 digits after comma in the field "Frais". Otherwise, a validation message should be displayed.
      image
    • I should not be able to check twice the same combination of "item type / patron type". However, it is the case, see this one and this one
    • I should be able to see the JSON description (is it normal that they are not displayed? were they displayed in ils.test.rero.ch? I cannot check since it is offline...)
  • This issue is not solved: The application section of the circulation policy editor does not behave as expected. #1363

@AoNoOokami
Copy link
Contributor Author

AoNoOokami commented Dec 2, 2020

* [ ]  It seems that the switch library (as a system librarian) does not work anymore. To reproduce: 1. Switch library. 2. Reload page. 3. See that the first login library re-appear in the "switch" menu

I don't think this is related to the current US. Edit: see rero/rero-ils-ui#442

* [ ]  The loan for the same day gives a due date in the next day. Try it with this item (barcode = asdf) in library `AOSTE-LYCEE`. I adapted the opening hours, but even if it is still open today, the due date is set tomorrow.

It seems that the default ci-po is used. This may be an existing bug that is highlighted with this US. to be confirmed by @BadrAly Edit: this was a bug coming from the current work. The ci-po updated were not correctly indexed.

* [ ]  In the cipo editor
  
  * [ ]  I cannot save the form when I enter a not integer in some fields. All fields (except "Frais") must contain only integer. A validation message should be displayed if a decimal is entered.
  * [ ]  I should not be able to enter decimal with more than 2 digits after comma in the field "Frais". Otherwise, a validation message should be displayed.
    ![image](https://user-images.githubusercontent.com/8154915/100894604-f42cba00-34bc-11eb-8f79-133adfbd077b.png)
  * [ ]  I should not be able to check twice the same combination of "item type / patron type". However, it is the case, see [this one](https://ilsdev.test.rero.ch/api/circ_policies/14) and [this one](https://ilsdev.test.rero.ch/api/circ_policies/18)
  * [ ]  I should be able to see the JSON description (is it normal that they are not displayed? were they displayed in ils.test.rero.ch? I cannot check since it is offline...)

It is the original behaviour of the editor. I can make additional corrections but it will take some time. The restriction on ptty-itty combination that was not working is related to the issue above (due date).

* [ ]  This issue is not solved: #1363

Actually, when we uncheck the last item type, it unchecks the patron type automatically. And when the patron type is not checked, the item types are not displayed. I can change the behaviour to let the item types, but the patron type has to be unchecked manually to allow the form saving.

@AoNoOokami AoNoOokami force-pushed the zaa-#1881-checkout-per-hours branch from 378f95a to 58eb240 Compare December 4, 2020 10:40
@AoNoOokami AoNoOokami force-pushed the zaa-#1881-checkout-per-hours branch 4 times, most recently from 34ae0a6 to f6685f0 Compare December 10, 2020 09:22
* Changes minimum checkout duration in the circulation policy JSON
  schema to allow 'less than one day' checkouts.
* Allows a print in the console when a record is reindexed for debug.
* Corrects russian dolls script to use webpack integration instead of
invenio bundles.

Co-Authored-by: Alicia Zangger <alicia.zangger@rero.ch>
@AoNoOokami AoNoOokami force-pushed the zaa-#1881-checkout-per-hours branch from f6685f0 to d4e4814 Compare December 10, 2020 15:05
@AoNoOokami AoNoOokami merged commit 8ae2e4b into rero:dev Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f: circulation Concerns the circulation interface or backend f: data About data model, importation, transformation, exportation of data, specific for bibliographic data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants