Bug 13203 - Plugin housekeeping: UNIMARC field 123i, 123j, 210c
Summary: Plugin housekeeping: UNIMARC field 123i, 123j, 210c
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-05 13:00 UTC by Marcel de Rooy
Modified: 2015-06-04 23:33 UTC (History)
3 users (show)

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


Attachments
Bug 13203: Plugin housekeeping: UNIMARC field 123i, 123j, 210c (6.91 KB, patch)
2014-11-05 13:36 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 13203: Plugin housekeeping: UNIMARC field 123i, 123j, 210c (6.74 KB, patch)
2014-11-06 08:41 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 13203: Plugin housekeeping: UNIMARC field 123i, 123j, 210c (6.74 KB, patch)
2014-11-06 09:11 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 13203: Plugin housekeeping: UNIMARC field 123i, 123j, 210c (6.75 KB, patch)
2014-11-06 10:55 UTC, Jonathan Druart
Details | Diff | Splinter Review
[PASSED QA] Bug 13203: Plugin housekeeping: UNIMARC field 123i, 123j, 210c (6.89 KB, patch)
2014-11-06 19:05 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2014-11-05 13:00:45 UTC

    
Comment 1 Marcel de Rooy 2014-11-05 13:36:55 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2014-11-05 14:44:02 UTC
(In reply to M. de Rooy from comment #1)
> Note about UNIMARC field 123i and 123j: Subfields $i and $j are each 8
> characters long and contain the same components as subfields $f and $g
> except that character position 0 contains a plus sign (for the northern
> celestial hemisphere) or a minus sign (for the southern celestial
> hemisphere).

I am not sure about that.
From http://multimedia.bnf.fr/unimarcb_trad/B123-6-2010.pdf, $ij are declinaison and $fg are coordinate.
Moreover the default value should be '00' not '', isn't it?
Comment 3 Marcel de Rooy 2014-11-05 14:56:41 UTC
(In reply to Jonathan Druart from comment #2)
> (In reply to M. de Rooy from comment #1)
> > Note about UNIMARC field 123i and 123j: Subfields $i and $j are each 8
> > characters long and contain the same components as subfields $f and $g
> > except that character position 0 contains a plus sign (for the northern
> > celestial hemisphere) or a minus sign (for the southern celestial
> > hemisphere).
> 
> I am not sure about that.
> From http://multimedia.bnf.fr/unimarcb_trad/B123-6-2010.pdf, $ij are
> declinaison and $fg are coordinate.
> Moreover the default value should be '00' not '', isn't it?

My information came from ifla. You are correct that fg is coordinate and ij is declination. I do not understand the 00 ?
Comment 5 Jonathan Druart 2014-11-05 15:20:46 UTC
(In reply to M. de Rooy from comment #3)
> I do not understand the 00 ?
If I don't fill the inputs, the value should be 00, not an empty string. Otherwise the field could be filled with a string's length < 8
Comment 6 Marcel de Rooy 2014-11-06 08:41:19 UTC Comment hidden (obsolete)
Comment 7 Marcel de Rooy 2014-11-06 08:42:09 UTC
(In reply to Jonathan Druart from comment #2)
> Moreover the default value should be '00' not '', isn't it?

Corrected.
Comment 8 Jonathan Druart 2014-11-06 08:59:39 UTC
(In reply to M. de Rooy from comment #7)
> (In reply to Jonathan Druart from comment #2)
> > Moreover the default value should be '00' not '', isn't it?
> 
> Corrected.

1 character is still missing.

"A celestial chart with an angular scale, with declination -16° to -49°"
is $i-0160000$j-0490000

With the patch, I get $i-016000$j-049000
Comment 9 Marcel de Rooy 2014-11-06 09:11:33 UTC Comment hidden (obsolete)
Comment 10 Marcel de Rooy 2014-11-06 09:12:13 UTC
(In reply to Jonathan Druart from comment #8)
> (In reply to M. de Rooy from comment #7)
> > (In reply to Jonathan Druart from comment #2)
> > > Moreover the default value should be '00' not '', isn't it?
> > 
> > Corrected.
> 
> 1 character is still missing.
> 
> "A celestial chart with an angular scale, with declination -16° to -49°"
> is $i-0160000$j-0490000
> 
> With the patch, I get $i-016000$j-049000

Thanks for testing.
Fixed a dumb typo: f3 = f3.substring(f2.length-2);
f2->f3
Comment 11 Jonathan Druart 2014-11-06 10:33:53 UTC
What means "Degree (complete with 0):"?
Does it should be 000 for degree and 00 for the 2 others?
Comment 12 Marcel de Rooy 2014-11-06 10:46:04 UTC
(In reply to Jonathan Druart from comment #11)
> What means "Degree (complete with 0):"?
> Does it should be 000 for degree and 00 for the 2 others?

I just copied this from the existing unimarc_field_123g template. It actually means left padding with zeroes. I agree that this text is confusing.
According to the specs, it is plus or minus followed by 3-2-2 chars (total 8).
Comment 13 Jonathan Druart 2014-11-06 10:55:38 UTC Comment hidden (obsolete)
Comment 14 Katrin Fischer 2014-11-06 19:05:52 UTC
Created attachment 33347 [details] [review]
[PASSED QA] Bug 13203: Plugin housekeeping: UNIMARC field 123i, 123j, 210c

In working on bug 10480, I noticed that these plugins needed some attention:

[2] unimarc_field_123i.pl: added missing template
[3] unimarc_field_123j.pl: resolved missing template with same file
[4] unimarc_field_210c_bis.pl: removed a warn, corrected some POD lines

Note about UNIMARC field 123i and 123j: Subfields $i and $j are each 8
characters long and contain the same components as subfields $f and $g
except that character position 0 contains a plus sign (for the northern
celestial hemisphere) or a minus sign (for the southern celestial hemisphere).

Test plan:
Connect unimarc_field_123i and 123j to some field.
Look especially at changing + or - for the hemisphere in the popup.
Check left-padding with zeroes for the other positions.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script.
Checked plugin in a UNIMARC installation.
Comment 15 Tomás Cohen Arazi 2014-11-11 17:13:11 UTC
Patch pushed to master.

Thanks Marcel!