Bug 18593

Summary: Suggestions aren't updated when one biblio is merged with another
Product: Koha Reporter: Koha Team University Lyon 3 <koha>
Component: AcquisitionsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: major    
Priority: P5 - low CC: fridolin.somers, jonathan.druart, koha, lisettepalouse+koha, lucie.gay, m.de.rooy, martin.renvoize, nick, sandboxes
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 18593: Move suggestions when bibliographic records are merged
Bug 18593: Move suggestions when bibliographic records are merged
Bug 18593: Move suggestions when bibliographic records are merged

Description Koha Team University Lyon 3 2017-05-12 12:31:11 UTC

    
Comment 1 Koha Team University Lyon 3 2017-05-12 12:36:50 UTC
When we place an order from a suggestion, a biblio record is created and its number is stocked in suggestion table.
If we merge this biblio record with another one (and prefering the other one), the biblio number is changed in the order but not in the suggestion, so we lost the link between this order and the suggestion. ANd the patron will not be alerted when the document will be received.
Comment 2 Katrin Fischer 2017-06-04 21:18:44 UTC
Would be good to see this fixed! As a suggestion always creates a new record the merge operation is often used.
Comment 3 Jonathan Druart 2017-09-27 19:00:33 UTC
Could you detail? It seems to work for me.
Comment 4 Katrin Fischer 2017-10-14 20:51:13 UTC
Tested on master:

1) Create a suggestion in OPAC
2) Accept the suggestion in staff
3) Add order from this suggestion
4) Go to cataloguing search and search for the record and another
5) Merge the suggestion record with the catalog record - catalog record wins (should be the more common case when a patron suggests something that already exists)
6) Verify that after merging, the new title displays in the acquisition record
7) Verify that the suggestion info no longer displays in basket
8) Verify that the new title doesn't display in suggestions. The old title will still show as suggested (not updated)
Comment 5 Jonathan Druart 2018-01-02 18:45:54 UTC
Created attachment 70233 [details] [review]
Bug 18593: Move suggestions when bibliographic records are merged

When bibliographic records are merged, the suggestions.biblionumber
field should be replaced with the new record.
Ideally we should have kept an history of the merges, to know what was
the original record. Now we cannot fix the broken links.

Test plan:
1) Create a suggestion in OPAC
2) Accept the suggestion in staff
3) Add order from this suggestion
4) Go to cataloguing search and search for the record and another
5) Merge the suggestion record with the catalog record - catalog record wins (should be the more common case when a patron suggests something that already exists)
6) Verify that after merging, the new title displays in the acquisition record
7) Verify that the suggestion info no longer displays in basket

From Katrin's test plan:
8) Verify that the new title doesn't display in suggestions. The old title will still show as suggested (not updated)
=> This is the title from suggestions.title, I think it makes sense to show this one.
Maybe we should open a new bug report to improve the display of the suggestion, and link to the bibliographic record
Comment 6 Biblibre Sandboxes 2018-03-12 14:18:11 UTC
Patch tested with a sandbox, by Lucie Gay <lucie.gay@ens-paris-saclay.fr>
Comment 7 Biblibre Sandboxes 2018-03-12 14:18:32 UTC
Created attachment 72690 [details] [review]
Bug 18593: Move suggestions when bibliographic records are merged

When bibliographic records are merged, the suggestions.biblionumber
field should be replaced with the new record.
Ideally we should have kept an history of the merges, to know what was
the original record. Now we cannot fix the broken links.

Test plan:
1) Create a suggestion in OPAC
2) Accept the suggestion in staff
3) Add order from this suggestion
4) Go to cataloguing search and search for the record and another
5) Merge the suggestion record with the catalog record - catalog record wins (should be the more common case when a patron suggests something that already exists)
6) Verify that after merging, the new title displays in the acquisition record
7) Verify that the suggestion info no longer displays in basket

From Katrin's test plan:
8) Verify that the new title doesn't display in suggestions. The old title will still show as suggested (not updated)
=> This is the title from suggestions.title, I think it makes sense to show this one.
Maybe we should open a new bug report to improve the display of the suggestion, and link to the bibliographic record

Signed-off-by: Lucie Gay <lucie.gay@ens-paris-saclay.fr>
Comment 8 Lucie Gay 2018-03-12 14:29:34 UTC
It's ok : the new title displays in the acquisition record after merging, but not in suggestions. However the information "Available in library" displays in suggestions.
Comment 9 Marcel de Rooy 2018-03-23 06:41:31 UTC
QA: Looking here now
Comment 10 Marcel de Rooy 2018-03-23 06:47:45 UTC
Created attachment 73159 [details] [review]
Bug 18593: Move suggestions when bibliographic records are merged

When bibliographic records are merged, the suggestions.biblionumber
field should be replaced with the new record.
Ideally we should have kept an history of the merges, to know what was
the original record. Now we cannot fix the broken links.

Test plan:
1) Create a suggestion in OPAC
2) Accept the suggestion in staff
3) Add order from this suggestion
4) Go to cataloguing search and search for the record and another
5) Merge the suggestion record with the catalog record - catalog record wins (should be the more common case when a patron suggests something that already exists)
6) Verify that after merging, the new title displays in the acquisition record
7) Verify that the suggestion info no longer displays in basket

From Katrin's test plan:
8) Verify that the new title doesn't display in suggestions. The old title will still show as suggested (not updated)
=> This is the title from suggestions.title, I think it makes sense to show this one.
Maybe we should open a new bug report to improve the display of the suggestion, and link to the bibliographic record

Signed-off-by: Lucie Gay <lucie.gay@ens-paris-saclay.fr>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 11 Jonathan Druart 2018-03-26 20:34:53 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 12 Nick Clemens (kidclamp) 2018-04-24 01:34:48 UTC
Awesome work all, backported to stable for 17.11.05
Comment 13 Fridolin Somers 2018-04-24 13:26:46 UTC
Pushed to 17.05.x for 17.05.11