Bug 14026 - Deleting Authority record tag does not update bibliographic marc record
Summary: Deleting Authority record tag does not update bibliographic marc record
Status: CLOSED DUPLICATE of bug 17913
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Authority data support (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on: 17950
Blocks: 17908
  Show dependency treegraph
 
Reported: 2015-04-20 16:43 UTC by Joy Nelson
Modified: 2017-02-07 08:55 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 14026: First expose the problem in Merge.t (2.00 KB, patch)
2017-01-31 14:43 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 14026: Extend sub merge to remove fields for deleted authorities (10.11 KB, patch)
2017-01-31 14:43 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Joy Nelson 2015-04-20 16:43:35 UTC
When an authority record that is linked to a bibliographic record has a subfield *deleted*, that deleted tag is *not* deleted from the linked bibliographic record(s).   note: edits and additions are reflected in the linked bibliographic records.  only deletions are not.


Steps to reproduce:
1. Create authority record with multiple subfields.  i.e. 110$a$v$x
2. Create new biblio record, 
   a. Select authority record created in step 1 to link the two together
3. Edit authority record by deleting a subfield  (i.e. 110$x)
4. View bibliographic record - the deleted authority subfield is still present in the bibliographic record

Note: wait for reindexing between steps
Comment 1 Owen Leonard 2016-06-21 16:07:34 UTC
Is this report specific to 3.18.x? If it is valid in master, please mark it as such.
Comment 2 Marcel de Rooy 2017-01-24 14:42:38 UTC
Pick this up in the course of omnibus bug 17908. Support appreciated.
Comment 3 Marcel de Rooy 2017-01-31 14:43:32 UTC
Created attachment 59684 [details] [review]
Bug 14026: First expose the problem in Merge.t

Adding a test where we delete an authority and prove that the linked
biblio still contains a reference to it.

Test plan:
[1] Run t/db_dependent/Authorities/Merge.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2017-01-31 14:43:36 UTC
Created attachment 59685 [details] [review]
Bug 14026: Extend sub merge to remove fields for deleted authorities

In order to accomplish this, we need to add some additional checks in
the merge routine. The actual change to remove the field, is quite
small.

Furthermore, we need to add a merge call in DelAuthority and adjust
the merge cron job accordingly.

The change is well supported by additional tests, including a simulation
of postponed removal via cron, if dontmerge is enabled.

Test plan:
[1] Run t/db_dependent/Authorities/Merge.t
[2] Look for an authority with a few linked biblios.
    Delete this authority: the quickest way currently is URL manipulation:
    /cgi-bin/koha/authorities/authorities-home.pl?op=delete&authid=[XXX]
    Now check the biblio records; the link should be removed.

Note: Since merge can handle deleting authorities now, we could consider
adding the option 'Delete' on the Actions menu for authorities having
linked biblios. The delete action also needs CSRF protection. Both should
be handled on new reports.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Marcel de Rooy 2017-01-31 14:56:06 UTC
(In reply to Joy Nelson from comment #0)
> When an authority record that is linked to a bibliographic record has a
> subfield *deleted*, that deleted tag is *not* deleted from the linked
> bibliographic record(s).   note: edits and additions are reflected in the
> linked bibliographic records.  only deletions are not.

Joy:
This subfield deletion problem is already fixed on bug 17913, patch Do not keep a cleared subfield in loose merge mode.
When I glanced through this report, I had a fix for deleting the complete authority record in mind. And so that should be fixed now too..
Comment 6 Marcel de Rooy 2017-02-07 08:53:07 UTC
For the abovementioned reason I close this report in favor of bug 17913 that solved the original issue.
Moving the functionality outside the original scope to a new report 18070.

*** This bug has been marked as a duplicate of bug 17913 ***