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

serials: enumeration and chronology field is incorrect in the slow issue receive #1696

Closed
BadrAly opened this issue Feb 11, 2021 · 4 comments · Fixed by #1713
Closed

serials: enumeration and chronology field is incorrect in the slow issue receive #1696

BadrAly opened this issue Feb 11, 2021 · 4 comments · Fixed by #1713
Labels
bug Breaks something but is not blocking f: professional ui Professional interface f: serials p-Medium Medium priority (to be solved within 1-2 years)
Milestone

Comments

@BadrAly
Copy link

BadrAly commented Feb 11, 2021

From the holdings detail view, librarian has two ways to receive the next issue:

  1. quick (no editing)
  2. slow (possibility to edit the issue before receiving)

If a librarian decides to use the slow receive, the Enumeration and chronology proposed in the issue editor is for the last received issue. It should be the Enumeration and chronology for the next issue.

Screenshot 2021-02-11 at 18 11 11

The Enumeration and chronology is "Vol 2012" in the editor instead of "Vol 2013"

Screenshot 2021-02-11 at 18 10 54

@BadrAly BadrAly added triage bug Breaks something but is not blocking labels Feb 11, 2021
@BadrAly
Copy link
Author

BadrAly commented Feb 11, 2021

@zannkukai after a quick analysis: A quick fix is to use the holdings.receive_regular_issue api for the slow receive instead of the item.update

@zannkukai
Copy link
Contributor

zannkukai commented Feb 12, 2021

@BadrAly for a slow receive we use the item ng-core editor based on Item jsonschema, we provide some arguments to the editor using the query string URL. So, I can't change the behavior of the item form submit.

Why we need to know is : why the prediction isn't well updated when the issue is created.
I will check on backend API

@zannkukai
Copy link
Contributor

zannkukai commented Feb 12, 2021

I just reproduce the problem with https://ils.test.rero.ch/professional/records/holdings/detail/968.
All seems right with data (https://ils.test.rero.ch/api/holdings/968 and https://ils.test.rero.ch/api/items/1664)

Why isn't it ? Or why this called failed ?
Can't reproduce this error on localhost (fresh setup, rebased on rero/dev)

@zannkukai
Copy link
Contributor

zannkukai commented Feb 12, 2021

Ok, all seems working fine in backend ::

  • The prevision is well updated
  • we called holding.update() with correct data

But, we called the update with the same dbcommit, reindex arguments than from Item.create() method (False by default). So the change isn't dbcommited using the db session was commited.
This is committed by "invenio_record_rest" (https://github.com/inveniosoftware/invenio-records-rest/blob/master/invenio_records_rest/views.py#L697) But this call, commit changes on Item, not on the holding.

A quick and dirty solution should be to force True for the call to holding.update() https://github.com/rero/rero-ils/blob/dev/rero_ils/modules/items/api/record.py#L158

zannkukai added a commit to zannkukai/rero-ils that referenced this issue Feb 22, 2021
When an issue is created withe item editor (slow received), the holding
was updated but not committed into the DB.

Closes rero#1696

Co-Authored-by: Renaud Michotte <[email protected]>
@iGormilhit iGormilhit added f: professional ui Professional interface f: serials p-Medium Medium priority (to be solved within 1-2 years) and removed triage labels Feb 23, 2021
@iGormilhit iGormilhit added this to the v1.0.1 milestone Feb 23, 2021
zannkukai added a commit to zannkukai/rero-ils that referenced this issue Feb 24, 2021
* Fixes the missing commit into the DB after the holdings update when an
  issue is created with the item editor (slow received).
* Closes rero#1696.

Co-Authored-by: Renaud Michotte <[email protected]>
zannkukai added a commit to zannkukai/rero-ils that referenced this issue Feb 25, 2021
* Fixes the missing commit into the DB after the holdings update when an
  issue is created with the item editor (slow received).
* Closes rero#1696.

Co-Authored-by: Renaud Michotte <[email protected]>
@iGormilhit iGormilhit changed the title Issue slow receive: Enumeration and chronology field is incorrect serials: enumeration and chronology field is incorrect in the slow issue receive Feb 25, 2021
zannkukai added a commit that referenced this issue Feb 25, 2021
* Fixes the missing commit into the DB after the holdings update when an
  issue is created with the item editor (slow received).
* Closes #1696.

Co-Authored-by: Renaud Michotte <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Breaks something but is not blocking f: professional ui Professional interface f: serials p-Medium Medium priority (to be solved within 1-2 years)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants