[Bug 8609] New: Add an URL validation plugin for authority and biblio frameworks
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 Priority: P5 - low Change sponsored?: --- Bug ID: 8609 CC: m.de.rooy@rijksmuseum.nl Assignee: gmcharlt@gmail.com Summary: Add an URL validation plugin for authority and biblio frameworks Severity: enhancement Classification: Unclassified OS: All Reporter: fcapovilla@live.ca Hardware: All Status: NEW Version: master Component: Cataloging Product: Koha Created attachment 11511 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=11511&action=edit Add an URL validation plugin for authority and biblio frameworks. This patch adds a new validation plugin that can be used in biblio and authority frameworks. The plugin uses a regex to validate that a field contains a valid url. For example, this plugin could be used for field 856$u of MARC21 biblio and authority frameworks. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 Frédérick Capovilla <fcapovilla@live.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Change sponsored?|--- |Sponsored Assignee|gmcharlt@gmail.com |fcapovilla@live.ca --- Comment #1 from Frédérick Capovilla <fcapovilla@live.ca> --- Patch sponsored by the CCSR ( http://www.ccsr.qc.ca ) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 Frédérick Capovilla <fcapovilla@live.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff --- Comment #2 from Frédérick Capovilla <fcapovilla@live.ca> --- Sorry, forgot "Needs signoff". Better late than never... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #3 from David Cook <dcook@prosentient.com.au> --- Sounds like a good idea Frédérick! Can you provide a test plan, so I know what to expect before and after for testing? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com --- Comment #4 from Galen Charlton <gmcharlt@gmail.com> --- Two thoughts: - I think using Regexp::Common::URI to get the regular expressions would be easier to maintain. - What about having the plugin also actively verify that the link is good? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 I'm just a bot <gitbot@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |gitbot@bugs.koha-community. | |org --- Comment #5 from I'm just a bot <gitbot@bugs.koha-community.org> --- Applying: Add an URL validation plugin for authority and biblio frameworks. Using index info to reconstruct a base tree... M koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt M koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt M koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt M koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt Patch failed at 0001 Add an URL validation plugin for authority and biblio frameworks. The copy of the patch that failed is found in: /home/christopher/git/koha/.git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 Frédérick Capovilla <fcapovilla@live.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #11511|0 |1 is obsolete| | --- Comment #6 from Frédérick Capovilla <fcapovilla@live.ca> --- Created attachment 26464 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26464&action=edit New version of the patch, rebase on master and using Common::Regex::URI. Here is a new version of the patch, rebased on current master and using Common::Regex::URI -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 Frédérick Capovilla <fcapovilla@live.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 --- Comment #7 from simith.doliveira@inlibro.com --- Created attachment 31279 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31279&action=edit Add an URL validation plugin for authority and biblio frameworks. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 simith.doliveira@inlibro.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.begin@inLibro.com, | |francois.charbonnier@inlibr | |o.com, | |philippe.blouin@inlibro.com | |, | |simith.doliveira@inlibro.co | |m Assignee|fcapovilla@live.ca |simith.doliveira@inlibro.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 simith.doliveira@inlibro.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 --- Comment #8 from simith.doliveira@inlibro.com --- Created attachment 31282 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31282&action=edit Bug 8609 - Add an URL validation plugin for authority and biblio frameworks This patch adds a new validation plugin to validate that a field/subfield contains a valid url. This plugin that can be used in biblio and authority frameworks. Changes: C4/Installer/PerlDependencies.pm - Regexp::Common::URI dependence added cataloguing/value_builder/url.pl - new file koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt - new function called in url.pl koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt - new function called in url.pl koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt - new function called in url.pl koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt - new function called in url.pl Testing: I) Before applying: 0) Go to the Cataloging module: menu->More->Cataloging; 1) Click <<New record -> default framework>> bouton; 2) Click tab << 8 >>; 3) Insert a text (for example "test") in the 856->u input field; 4) Click out of the input field; 5) Validate no message; II) After Applying: i) field/subfield plugin attach 0) In Koha adminstration, click << MARC bibliographic framework >>; 1) In Default framework, click << MARC structure >>; 2) Search field 856 and click << Subfields >>; 3) Click << u >>; 4) In Other options -> Plugin, choose url.pl ii) Insert a text in the 856->u input field 0) Go to the Cataloging module: menu->More->Cataloging; 1) Click <<New record -> default framework>> bouton; 2) Click tab << 8 >>; 3) Insert a text (for example "test") in the 856->u input field; 4) Click out of the input field; 5) Validate message: << The field 856$u must contain a valid URL! ex : http://www.google.com >> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 simith.doliveira@inlibro.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 simith.doliveira@inlibro.com changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26464|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 simith.doliveira@inlibro.com changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31279|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31282|0 |1 is obsolete| | --- Comment #9 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 38961 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38961&action=edit Bug 8609 - Add an URL validation plugin for authority and biblio frameworks This patch adds a new validation plugin to validate that a field/subfield contains a valid url. This plugin that can be used in biblio and authority frameworks. Changes: C4/Installer/PerlDependencies.pm - Regexp::Common::URI dependence added cataloguing/value_builder/url.pl - new file koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt - new function called in url.pl koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt - new function called in url.pl koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt - new function called in url.pl koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt - new function called in url.pl Testing: I) Before applying: 0) Go to the Cataloging module: menu->More->Cataloging; 1) Click <<New record -> default framework>> bouton; 2) Click tab << 8 >>; 3) Insert a text (for example "test") in the 856->u input field; 4) Click out of the input field; 5) Validate no message; II) After Applying: i) field/subfield plugin attach 0) In Koha adminstration, click << MARC bibliographic framework >>; 1) In Default framework, click << MARC structure >>; 2) Search field 856 and click << Subfields >>; 3) Click << u >>; 4) In Other options -> Plugin, choose url.pl ii) Insert a text in the 856->u input field 0) Go to the Cataloging module: menu->More->Cataloging; 1) Click <<New record -> default framework>> bouton; 2) Click tab << 8 >>; 3) Insert a text (for example "test") in the 856->u input field; 4) Click out of the input field; 5) Validate message: << The field 856$u must contain a valid URL! ex : http://www.google.com >> REBASED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |mtompset@hotmail.com --- Comment #10 from M. Tompsett <mtompset@hotmail.com> --- "Patterns for the following URIs are supported: fax, file, FTP, gopher, HTTP, news, NTTP, pop, prospero, tel, telnet, tv and WAIS." It does not include https. Kind of important. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|simith.doliveira@inlibro.co |maxime.beaulieu@inlibro.com |m | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 Rémi Mayrand-Provencher <remi.mayrand-provencher@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |remi.mayrand-provencher@inL | |ibro.com --- Comment #11 from Rémi Mayrand-Provencher <remi.mayrand-provencher@inLibro.com> --- I removed the conflicts so it can be applied properly. I then followed the test plan and everything worked properly, including HTTPS URIs. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 Rémi Mayrand-Provencher <remi.mayrand-provencher@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38961|0 |1 is obsolete| | --- Comment #12 from Rémi Mayrand-Provencher <remi.mayrand-provencher@inLibro.com> --- Created attachment 41231 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41231&action=edit Bug 8609 - Add an URL validation plugin for authority and biblio frameworks This patch adds a new validation plugin to validate that a field/subfield contains a valid url. This plugin that can be used in biblio and authority frameworks. Changes: C4/Installer/PerlDependencies.pm - Regexp::Common::URI dependence added cataloguing/value_builder/url.pl - new file koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt - new function called in url.pl koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt - new function called in url.pl koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt - new function called in url.pl koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt - new function called in url.pl Testing: I) Before applying: 0) Go to the Cataloging module: menu->More->Cataloging; 1) Click <<New record -> default framework>> bouton; 2) Click tab << 8 >>; 3) Insert a text (for example "test") in the 856->u input field; 4) Click out of the input field; 5) Validate no message; II) After Applying: i) field/subfield plugin attach 0) In Koha adminstration, click << MARC bibliographic framework >>; 1) In Default framework, click << MARC structure >>; 2) Search field 856 and click << Subfields >>; 3) Click << u >>; 4) In Other options -> Plugin, choose url.pl ii) Insert a text in the 856->u input field 0) Go to the Cataloging module: menu->More->Cataloging; 1) Click <<New record -> default framework>> bouton; 2) Click tab << 8 >>; 3) Insert a text (for example "test") in the 856->u input field; 4) Click out of the input field; 5) Validate message: << The field 856$u must contain a valid URL! ex : http://www.google.com >> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 Rémi Mayrand-Provencher <remi.mayrand-provencher@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Please check EXAMPLE.pl in the plugin directory. You do not need plugin_parameters etc. anymore. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 --- Comment #14 from Rémi Mayrand-Provencher <remi.mayrand-provencher@inLibro.com> --- Created attachment 41232 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41232&action=edit Bug8609 - Removed useless plugin_parameters sub -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 Zeno Tajoli <z.tajoli@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |hector.hecaxmmx@gmail.com --- Comment #15 from Héctor Eduardo Castro Avalos <hector.hecaxmmx@gmail.com> --- Hi Rémi This patch doesn't apply anymore: Conflict merge: CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt CONFLICT (content): Merge conflict in C4/Installer/PerlDependencies.pm Please resolve the problem. Please squash the two patches. Could be great if you include changes in SQL frameworks for fresh installations and update database <http://wiki.koha-community.org/wiki/Database_updates> for frameworks already installed. Note: For debian this package is needed libregexp-common-perl in debian/control Regards -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8609 --- Comment #16 from Galen Charlton <gmcharlt@gmail.com> --- Comment on attachment 41231 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41231 Bug 8609 - Add an URL validation plugin for authority and biblio frameworks Review of attachment 41231: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=8609&attachment=41231) ----------------------------------------------------------------- ::: cataloguing/value_builder/url.pl @@ +57,5 @@
+ my $regex = $RE{URI}; + $regex =~ s/\//\\\//g; + + my $res = <<END_OF_JS; +<script typei="text/javascript">
"typei" is a typo. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org