Bug 8334 - Authority UNIMARC 100 field plugin
Summary: Authority UNIMARC 100 field plugin
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Authority data support (show other bugs)
Version: Main
Hardware: All All
: P2 enhancement (vote)
Assignee: Galen Charlton
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-29 14:22 UTC by Vitor Fernandes
Modified: 2015-06-04 23:23 UTC (History)
6 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
Script to generate UNIMARC authorities 100 field (3.91 KB, application/x-perl)
2013-09-16 10:30 UTC, Vitor Fernandes
Details
Template for UNIMARC authorities 100 field (15.89 KB, text/html)
2013-09-16 10:31 UTC, Vitor Fernandes
Details
Bug 8334 - Authority UNIMARC 100 field plugin (21.88 KB, patch)
2013-09-19 00:25 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 8334 - Authority UNIMARC 100 field plugin (21.80 KB, patch)
2013-09-19 10:38 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[PATCH][SIGNED OFF] Bug 8334 - Authority UNIMARC 100 field plugin (21.91 KB, patch)
2013-11-29 21:02 UTC, Mathieu Saby
Details | Diff | Splinter Review
Bug 8334 - Authority UNIMARC 100 field plugin (21.98 KB, patch)
2013-12-13 14:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 8334: Remove commented JS code (2.70 KB, patch)
2013-12-13 14:47 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Vitor Fernandes 2012-06-29 14:22:05 UTC
There is no 100 authority field plugin. It would be nice to have it.
Comment 1 Vitor Fernandes 2012-11-26 14:57:21 UTC
Many people are asking to this plugin.
Can anyone with more UNIMARC knowlegdes than me start this?
I can improve the plugin later.
Comment 2 Vitor Fernandes 2013-09-16 10:30:27 UTC Comment hidden (obsolete)
Comment 3 Vitor Fernandes 2013-09-16 10:31:18 UTC Comment hidden (obsolete)
Comment 4 Vitor Fernandes 2013-09-16 10:33:01 UTC
The script needs to be copied to ../intranet/cgi-bin/cataloguing/value_builder/
The template needs to be copied to ../intranet/htdocs/intranet-tmpl/prog/en/modules/cataloguing/value_builder/

I've tested and everything worked fine.
Comment 5 Bernardo Gonzalez Kriegel 2013-09-17 23:43:40 UTC
Vitor, looks promising, tested and works well AFAIK.

But:
1) You must make a patch
a) Verify unimarc_field_100_authorities.pl is chmoded +x

b) Update licence information, you do not work for katipo :)
read http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence

c) do
git add cataloguing/value_builder/unimarc_field_100_authorities.pl
git add koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_100_authorities.tt
git commit -m "Bug 8334 - Authority UNIMARC 100 field plugin"

d) then do
git bz attach -e 8334 HEAD
or
git format-patch origin/master, and upload that as patch

2) But before upload, you must fix the following errors 
koha-qa -c 1 -v 3
testing 1 commit(s) (applied to dcbe50c 'Bug 10897: remove test for module tha')

 FAIL   cataloguing/value_builder/unimarc_field_100_authorities.pl
   OK     pod
   FAIL   forbidden patterns
                forbidden pattern: tab char (line 124)
                forbidden pattern: tab char (line 119)
                forbidden pattern: tab char (line 118)
                forbidden pattern: tab char (line 122)
                forbidden pattern: tab char (line 117)
                forbidden pattern: tab char (line 121)
                forbidden pattern: tab char (line 123)
   OK     valid
   OK     critic

 FAIL   koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_100_authorities.tt
   FAIL   forbidden patterns
                forbidden pattern: trailing space char (line 326)
                forbidden pattern: trailing space char (line 187)
                forbidden pattern: trailing space char (line 372)
                forbidden pattern: trailing space char (line 321)
                forbidden pattern: trailing space char (line 213)
                forbidden pattern: tab char (line 213)
                forbidden pattern: trailing space char (line 74)
                forbidden pattern: trailing space char (line 361)
                forbidden pattern: trailing space char (line 100)
                forbidden pattern: trailing space char (line 134)
                forbidden pattern: trailing space char (line 239)
                forbidden pattern: tab char (line 188)
                forbidden pattern: tab char (line 187)
                forbidden pattern: trailing space char (line 106)
                forbidden pattern: trailing space char (line 45)
                forbidden pattern: trailing space char (line 389)
                forbidden pattern: trailing space char (line 124)
                forbidden pattern: trailing space char (line 205)
                forbidden pattern: trailing space char (line 393)
                forbidden pattern: trailing space char (line 354)
                forbidden pattern: trailing space char (line 334)
                forbidden pattern: trailing space char (line 405)
                forbidden pattern: trailing space char (line 149)
                forbidden pattern: trailing space char (line 315)
   OK     tt_valid
   OK     valid_template

3) Finally, you must add a test plan to the bug description, for example

a) Edit authority framework XXX, link subfield 'a' with plugin
b) create a new record or edit one
c) use plugin
d) save

4) Question: Is there a link to valid language codes? that could be a useful.
Comment 6 Bernardo Gonzalez Kriegel 2013-09-17 23:45:43 UTC
> d) then do
> git bz attach -e 8334 HEAD

Sorry, it's

  git bz attach 8334 HEAD
Comment 7 Vitor Fernandes 2013-09-18 14:10:10 UTC
Hi Bernardo,

Sorry but at this point I can't do a patch for this.
If anyone could do that I'll be very appreciated.
Bernardo, thanks for testing it and give this info.
Comment 8 Bernardo Gonzalez Kriegel 2013-09-19 00:25:07 UTC
Vitor, 
If you do not mind, I'll post a patch on your behalf.

Bernardo
Comment 9 Bernardo Gonzalez Kriegel 2013-09-19 00:25:43 UTC Comment hidden (obsolete)
Comment 10 Vitor Fernandes 2013-09-19 08:52:04 UTC
Thanks Bernardo for the patch :)
Comment 11 Bernardo Gonzalez Kriegel 2013-09-19 10:38:08 UTC Comment hidden (obsolete)
Comment 12 I'm just a bot 2013-09-24 05:48:11 UTC
Patch applied cleanly, go forth and signoff
Comment 13 I'm just a bot 2013-10-24 19:33:08 UTC
Patch applied cleanly, go forth and signoff
Comment 14 Mathieu Saby 2013-11-29 21:00:20 UTC
It works well, I sign off.
Mathieu
Comment 15 Mathieu Saby 2013-11-29 21:02:12 UTC Comment hidden (obsolete)
Comment 16 Mathieu Saby 2013-11-29 21:04:05 UTC
I lower a bit priority...
Mathieu
Comment 17 Jonathan Druart 2013-12-13 14:29:38 UTC
Looks good to me, I ask to Stéphane to have a look too.
Comment 18 Jonathan Druart 2013-12-13 14:30:58 UTC
Bernardo, could you confirm I can delete commented JS code in the tt file?
Comment 19 delaye 2013-12-13 14:42:52 UTC
It works well, I sign off.
Comment 20 Jonathan Druart 2013-12-13 14:47:30 UTC
Created attachment 23513 [details] [review]
Bug 8334 - Authority UNIMARC 100 field plugin

The work for this patch belongs to Vitor Fernandez
Udated License information.

This patch adds a plugin for field 100 of UNIMARC
authorities.

To test on a UNIMARC site:
1) Apply the patch
2) Edit some authority framework, field 100
3) Link subfield 'a' to unimarc_field_100_authorities.pl
plugin, save
4) Edit or add auth record, clic on '...' to bring plugin
5) Modify field 100a
6) Save record

Please someone with UNIMARC experience take a look
at this.

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Stephane Delaye <stephane.delaye@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 21 Jonathan Druart 2013-12-13 14:47:38 UTC
Created attachment 23514 [details] [review]
Bug 8334: Remove commented JS code

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 22 Bernardo Gonzalez Kriegel 2013-12-13 15:55:38 UTC
(In reply to Jonathan Druart from comment #18)
> Bernardo, could you confirm I can delete commented JS code in the tt file?

I confirm :-)
That code was on the original file submited by Vitor, I suppose taken from a file he used as template.

Anyway, if this pass I think an update to UNIMARC frameworks will be needed to link this plugin permanently.

Bernardo
Comment 23 Galen Charlton 2013-12-13 16:34:49 UTC
I've pushed this to master.  Thanks, Vitor!  And thanks, Bernardo, for rescuing this kitten.

I updated the author attribution in the base patch to use Vitor's name and credit Bernardo for converting it to a testable Git patch.
Comment 24 Fridolin Somers 2013-12-24 12:02:40 UTC
Patches pushed to 3.14.x, will be in 3.14.2