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

Cannot save a prediction pattern for an existing holding #1471

Closed
ManaDeweerdt opened this issue Nov 19, 2020 · 5 comments · Fixed by rero/ng-core#332
Closed

Cannot save a prediction pattern for an existing holding #1471

ManaDeweerdt opened this issue Nov 19, 2020 · 5 comments · Fixed by rero/ng-core#332
Assignees
Labels
bug Breaks something but is not blocking f: editor Concerns editor based on JSON schema AND custom editor f: serials p-Medium Medium priority (to be solved within 1-2 years)
Milestone

Comments

@ManaDeweerdt
Copy link
Contributor

ManaDeweerdt commented Nov 19, 2020

Describe the bug
When I load a prediction pattern on an existing holding and try to save, it spins forever.
It works for a new holding.

image

To Reproduce
Steps to reproduce the behavior:

  1. Find a serial.
  2. Edit the holding and load a prediction pattern. Ex : https://ils.test.rero.ch/professional/records/holdings/edit/2012?source=templates&pid=31
  3. Try to save.
  4. See error

Expected behavior
We should have a reason why it doesn't save. Fields missing?

@ManaDeweerdt ManaDeweerdt added bug Breaks something but is not blocking triage labels Nov 19, 2020
@ManaDeweerdt ManaDeweerdt changed the title Cannot save a holding with a prediction pattern Cannot save an existing holding with a new prediction pattern Nov 19, 2020
@ManaDeweerdt ManaDeweerdt changed the title Cannot save an existing holding with a new prediction pattern Cannot save a prediction pattern for an existing holding Nov 19, 2020
@BadrAly
Copy link

BadrAly commented Nov 19, 2020

After analysis with @jma:

  1. The template does erase the link with the parent record. This problem normally can be duplicated for other resource like item
  2. Maybe it is wise not to allow using template on existing records.

@pronguen
Copy link
Contributor

@BadrAly I would disable template for existing records. If it is possible and if it is the easiest way.

@zannkukai zannkukai self-assigned this Nov 19, 2020
@JoelleDosimont
Copy link
Contributor

In the life of a serial, it's common to have a change in prediction when frequency changes. In this case, the use of template should help to create a new prediction (frequency and predictions patterns). But it should not change the other informations : Available collection, notes, vendor, number of claimed, ...
Don't know what is possible here...

@iGormilhit iGormilhit added f: serials f: editor Concerns editor based on JSON schema AND custom editor and removed triage labels Nov 23, 2020
@zannkukai
Copy link
Contributor

zannkukai commented Nov 25, 2020

In the life of a serial, it's common to have a change in prediction when frequency changes. In this case, the use of template should help to create a new prediction (frequency and predictions patterns). But it should not change the other informations : Available collection, notes, vendor, number of claimed, ...
Don't know what is possible here...

@JoelleDosimont
The logic for template is now to load in the editor the data from the template (all previous values are lost). In this case, you suggest to "override" only the data provided by template (but keep possible existing other values).

  1. This behavior introduces a lot of changes about template implementation
  2. Is this behavior should be implemented for all resources or only holding resource ?

@iGormilhit iGormilhit added the p-Medium Medium priority (to be solved within 1-2 years) label Nov 26, 2020
@JoelleDosimont
Copy link
Contributor

The logic for template is now to load in the editor the data from the template (all previous values are lost). In this case, you suggest to "override" only the data provided by template (but keep possible existing other values).

1. This behavior introduces a lot of changes about template implementation
2. Is this behavior should be implemented for all resources or only holding resource ?

I guess what I'm looking for is something that allows :

  1. to create a new record with a template (that's what is possible now).
  2. to merge a record (bib, item, holding... don't know for the patron) with a template. It would add the fields in the template, but keep the existing values in the record... It would be usefull, but it's more a "nice to have", we can work without it for now.

@iGormilhit iGormilhit added this to the v0.15.0 milestone Nov 26, 2020
zannkukai added a commit to zannkukai/ng-core that referenced this issue Dec 15, 2020
To avoid parent reference problem, the 'load template' button should be
only displayed for resource creation (and hide when a resource is edited).

Closes rero/rero-ils#1471.

Co-Authored-by: Renaud Michotte <[email protected]>
@zannkukai zannkukai modified the milestones: v0.15.0, v1.0.0 Dec 15, 2020
zannkukai added a commit to zannkukai/ng-core that referenced this issue Jan 18, 2021
To avoid parent reference problem, the 'load template' button should be
only displayed for resource creation (and hide when a resource is edited).

Closes rero/rero-ils#1471.

Co-Authored-by: Renaud Michotte <[email protected]>
zannkukai added a commit to rero/ng-core that referenced this issue Jan 18, 2021
To avoid parent reference problem, the 'load template' button should be
only displayed for resource creation (and hide when a resource is edited).

Closes rero/rero-ils#1471.

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: editor Concerns editor based on JSON schema AND custom editor 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.

6 participants