Bug 12674

Summary: GetMarcISSN should not return empty ISSN
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 12554    
Bug Blocks:    
Attachments: Bug 12674: (regression tests) GetMarcISSN should not return empty ISSN
Bug 12674: GetMarcISSN should not return empty ISSN
Bug 12674: (regression tests) GetMarcISSN should not return empty ISSN
Bug 12674: GetMarcISSN should not return empty ISSN
[PASSED QA] Bug 12674: (regression tests) GetMarcISSN should not return empty ISSN
[PASSED QA] Bug 12674: GetMarcISSN should not return empty ISSN

Description Tomás Cohen Arazi 2014-07-29 19:07:41 UTC
Currently, GetMarcISSN returns an array of all present ISSN on a specific record.
Unlike the GetMarcISBN counterpart, it doesn't filter empty ISSNs out.

To reproduce, run the attached regression test.
Comment 1 Tomás Cohen Arazi 2014-07-29 19:16:21 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi 2014-07-29 19:16:28 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2014-08-29 13:57:48 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2014-08-29 13:57:54 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall 2014-08-29 14:18:55 UTC
Created attachment 31287 [details] [review]
[PASSED QA] Bug 12674: (regression tests) GetMarcISSN should not return empty ISSN

Proves GetMarcISSN returns empty ISSNs in the results array.

To reproduce:
 - Run $ prove -v t/db_dependent/Biblio.t

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Kyle M Hall 2014-08-29 14:19:04 UTC
Created attachment 31288 [details] [review]
[PASSED QA] Bug 12674: GetMarcISSN should not return empty ISSN

This patch makes GetMarcISSN test for empty subfield before pushing to the
result array.

To test:
- Run the regression test
=> FAILS for all MARC flavours
- Apply the patch
- Run the regression test
=> SUCCESS: tests pass
- Sign off

Sponsored-by: Universidad Nacional de Cordoba

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 7 Tomás Cohen Arazi 2014-09-01 13:53:06 UTC
Patch pushed to master.