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

It should not be possible to delete an item type with linked items #2159

Closed
pronguen opened this issue Jul 13, 2021 · 0 comments · Fixed by #2161
Closed

It should not be possible to delete an item type with linked items #2159

pronguen opened this issue Jul 13, 2021 · 0 comments · Fixed by #2161
Assignees
Labels
bug (critical) Blocking issue, should be fixed ASAP bug Breaks something but is not blocking p-High High priority (to be solved in the 2-3 next months) production Issue specifically spotted on the production server
Milestone

Comments

@pronguen
Copy link
Contributor

pronguen commented Jul 13, 2021

Describe the bug

Currently, it is possible to delete an item type linked to an item through the temporary_item_type field.
It is not possible if the item type is linked though field item_type.

To Reproduce

  1. Create an item type X
  2. Add an new item to a document
  3. Set an existing item type and add X as temporary_item_type
  4. Delete X
  5. Try to display the item detailed view or the document detailed view. There is an error.

Expected behavior

  • Removing an item type linked to an item via the temporary_item_type field is not possible.
  • Existing item linked to a deleted item types are corrected. Example in bib.rero.ch: barcode:1011368274

Context

  • server: bib.rero.ch
  • version: v1.4.1
@pronguen pronguen added bug (critical) Blocking issue, should be fixed ASAP bug Breaks something but is not blocking p-High High priority (to be solved in the 2-3 next months) production Issue specifically spotted on the production server labels Jul 13, 2021
@Garfield-fr Garfield-fr self-assigned this Jul 14, 2021
Garfield-fr added a commit to Garfield-fr/rero-ils that referenced this issue Jul 14, 2021
* Fixes remove the item type if it is defined on the item.
* closes rero#2159.

Co-Authored-by: Bertrand Zuchuat <bertrand.zuchuat@rero.ch>
Garfield-fr added a commit to Garfield-fr/rero-ils that referenced this issue Jul 14, 2021
* Denies the deletion of item type when it's used by any item.
* Closes rero#2159.

Co-Authored-by: Bertrand Zuchuat <bertrand.zuchuat@rero.ch>
Garfield-fr added a commit to Garfield-fr/rero-ils that referenced this issue Jul 14, 2021
* Denies the deletion of item type when it's used by any item.
* Closes rero#2159.

Co-Authored-by: Bertrand Zuchuat <bertrand.zuchuat@rero.ch>
Garfield-fr added a commit to Garfield-fr/rero-ils that referenced this issue Jul 14, 2021
* Denies the deletion of item type when it's used by any item.
* Closes rero#2159.

Co-Authored-by: Bertrand Zuchuat <bertrand.zuchuat@rero.ch>
Garfield-fr added a commit to Garfield-fr/rero-ils that referenced this issue Jul 14, 2021
* Denies the deletion of item type when it's used by any item.
* Closes rero#2159.

Co-Authored-by: Bertrand Zuchuat <bertrand.zuchuat@rero.ch>
Garfield-fr added a commit that referenced this issue Jul 14, 2021
* Denies the deletion of item type when it's used by any item.
* Closes #2159.

Co-Authored-by: Bertrand Zuchuat <bertrand.zuchuat@rero.ch>
@iGormilhit iGormilhit added this to the v1.4.2 milestone Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug (critical) Blocking issue, should be fixed ASAP bug Breaks something but is not blocking p-High High priority (to be solved in the 2-3 next months) production Issue specifically spotted on the production server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants