Bug 19537

Summary: Authorities search doesn't correctly populate subfield $2 source of heading
Product: Koha Reporter: Nick Clemens <nick>
Component: CatalogingAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P5 - low CC: katrin.fischer, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18904
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 18904    
Attachments: Bug 19537: Correct addition of source subfield from authorities
Bug 19537: Correct addition of source subfield from authorities
Bug 19537: Correct addition of source subfield from authorities
Bug 19537: (QA Follow-up) Consistent structures
Bug 19537: (QA Follow-up) Consistent structures

Description Nick Clemens 2017-10-27 10:38:12 UTC
There is code intended to check theindicators and 008 for an authority and update subfield 2, but it doesn't work
Comment 1 Nick Clemens 2017-10-27 10:47:10 UTC
Created attachment 68677 [details] [review]
Bug 19537: Correct addition of source subfield from authorities

To test:
1 - Find or create a subject authority
2 - Define 008/11 as 's' or 'r'
3 - Add 2nd indicator '7' to main heading
4 - Open or create a bibliographic record
5 - Link to the authority created above
6 - Subfield $2 is not set
7 - Apply patch
8 - Repeat linking, subfield $2 should be set




Assignee: nick@bywatersolutions.com
Comment 2 Josef Moravec 2017-10-29 19:32:04 UTC
Created attachment 68809 [details] [review]
Bug 19537: Correct addition of source subfield from authorities

To test:
1 - Find or create a subject authority
2 - Define 008/11 as 's' or 'r'
3 - Add 2nd indicator '7' to main heading
4 - Open or create a bibliographic record
5 - Link to the authority created above
6 - Subfield $2 is not set
7 - Apply patch
8 - Repeat linking, subfield $2 should be set

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 3 Marcel de Rooy 2017-11-03 07:27:28 UTC
Created attachment 68903 [details] [review]
Bug 19537: Correct addition of source subfield from authorities

To test:
1 - Find or create a subject authority
2 - Define 008/11 as 's' or 'r'
3 - Add 2nd indicator '7' to main heading
4 - Open or create a bibliographic record
5 - Link to the authority created above
6 - Subfield $2 is not set
7 - Apply patch
8 - Repeat linking, subfield $2 should be set

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2017-11-03 07:27:32 UTC Comment hidden (obsolete)
Comment 5 Marcel de Rooy 2017-11-03 07:28:41 UTC
Removing enh label. This is a bug.
Comment 6 Marcel de Rooy 2017-11-03 07:30:19 UTC
Created attachment 68905 [details] [review]
Bug 19537: (QA Follow-up) Consistent structures

The subfield_loop structure should contain things like:
$VAR1 = {
          'marc_subfield' => 'v',
          'marc_values' => [
                             'form'
                           ]
        };

This patches replaces the list by an array ref to restore consistency,
although Template Toolkit does not really care. Both work.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Jonathan Druart 2017-11-08 16:51:19 UTC
Pushed to master for 17.11, thanks to everybody involved!