Bug 14660 - Cataloguing plugins for generating inventory numbers are broken
Summary: Cataloguing plugins for generating inventory numbers are broken
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 10480
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-06 22:16 UTC by Katrin Fischer
Modified: 2016-12-05 21:23 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 14660: Fix stocknumberAV.pl catalguing plugin (1.34 KB, patch)
2015-08-06 22:22 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 14660: Fix stocknumberam123.pl catalguing plugin (1.30 KB, patch)
2015-08-06 22:36 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 14660: Fix stocknumberAV.pl cataloguing plugin (1.34 KB, patch)
2015-08-06 22:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 14660: Fix stocknumberam123.pl cataloguing plugin (1.31 KB, patch)
2015-08-06 22:39 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 14660: Fix stocknumberAV.pl cataloguing plugin (1.40 KB, patch)
2015-08-07 06:15 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 14660: Fix stocknumberam123.pl cataloguing plugin (1.36 KB, patch)
2015-08-07 06:15 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 14660: Fix stocknumberAV.pl cataloguing plugin (1.47 KB, patch)
2015-08-19 08:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14660: Fix stocknumberam123.pl cataloguing plugin (1.43 KB, patch)
2015-08-19 08:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14660: Fix 3 other cataloguing plugins (1.71 KB, patch)
2015-08-19 08:13 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 Katrin Fischer 2015-08-06 22:16:40 UTC
The cataloguing plugin stocknumberAV is no longer working on master.

To test:
- Link a subfield to the plugin - usually it's 952$i or the UNIMARC equivalent in your MARC frameworks
- Set up a new authorised value INVENTORY, the code is an uppercase prefix - "B"
- The Descriptions is your starting number - 1
- The OPAC description remains empty
- Catalalog an item
- Enter B as stocknumber and activate the plugin by clicking on ... at the end of the field
- The number will not get added - Firebug shows an error:
 Undefined subroutine CGI::output_html_with_http_headers
Comment 1 Katrin Fischer 2015-08-06 22:22:15 UTC Comment hidden (obsolete)
Comment 2 Katrin Fischer 2015-08-06 22:36:55 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2015-08-06 22:38:45 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2015-08-06 22:39:20 UTC Comment hidden (obsolete)
Comment 5 Josef Moravec 2015-08-07 06:15:43 UTC Comment hidden (obsolete)
Comment 6 Josef Moravec 2015-08-07 06:15:59 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2015-08-19 07:57:44 UTC
git bisect blames the following commit

commit ff5996d65e4788e20d1c113ec70e80d0fd0710af

    Bug 10480: Use the framework plugin object in cataloguing
    
    This patch implements the use of Koha::FrameworkPlugin in Cataloguing,
    Authorities, Acquisition, Serials and Tools.
Comment 8 Jonathan Druart 2015-08-19 08:03:14 UTC
% grep -Hl output_ `grep -RL 'C4::Output' cataloguing/value_builder`

cataloguing/value_builder/callnumber.pl
cataloguing/value_builder/unimarc_field_010.pl
cataloguing/value_builder/stocknumberAV.pl
cataloguing/value_builder/stocknumberam123.pl
cataloguing/value_builder/callnumber-KU.pl


Some others exist.
Comment 9 Jonathan Druart 2015-08-19 08:13:38 UTC
Created attachment 41651 [details] [review]
Bug 14660: Fix stocknumberAV.pl cataloguing plugin

The cataloguing plugin stocknumberAV.pl is broken and no
longer generating numbers - this patch fixes it.

To test:
- Link a subfield to the plugin - usually it's 952$i or the UNIMARC
  equivalent in your MARC frameworks
- Set up a new authorised value INVENTORY, the code is an uppercase
  prefix - "B"
- The Descriptions is your starting number - 1
- The OPAC description remains empty
- Catalalog an item
- Enter B as stocknumber and activate the plugin by clicking on
  ... at the end of the field
- The number will not get added - Firebug shows an error:
  Undefined subroutine CGI::output_html_with_http_headers
- Apply patch
- Verify numbers are now generated and no errors are shown

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 10 Jonathan Druart 2015-08-19 08:13:44 UTC
Created attachment 41652 [details] [review]
Bug 14660: Fix stocknumberam123.pl cataloguing plugin

The cataloguing plugin stocknumberam123.pl is broken and no
longer generating numbers - this patch fixes it.

To test:
 - Link a subfield to the plugin - usually it's 952$i or the UNIMARC
   equivalent in your MARC frameworks
 - Create a new item, set the inventory number to: A 0000000002
 - Start to catalog another item, enter A into inventory and
 - Enter A as stocknumber and activate the plugin by clicking on
   ... at the end of the field
 - The number will not get added - Firebug shows an error:
   Undefined subroutine CGI::output_html_with_http_headers
 - Apply patch
 - Verify numbers are now generated and no errors are shown

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 11 Jonathan Druart 2015-08-19 08:13:47 UTC
Created attachment 41653 [details] [review]
Bug 14660: Fix 3 other cataloguing plugins

These 3 should use C4::Output not to explode.

Test plan:
Link the plugins with the correct fields
They should not log an error when calling them

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Jonathan Druart 2015-08-19 08:15:41 UTC
(In reply to Jonathan Druart from comment #11)
> Created attachment 41653 [details] [review] [review]
> Bug 14660: Fix 3 other cataloguing plugins
> 
> These 3 should use C4::Output not to explode.
> 
> Test plan:
> Link the plugins with the correct fields
> They should not log an error when calling them
> 
> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

I have not tested the behavior of the plugins, but they raised an error in the log.
With this patch, they don't.
Comment 13 Jonathan Druart 2015-08-19 08:16:15 UTC
Increasing the severity to major.
Comment 14 Jonathan Druart 2015-08-19 08:17:31 UTC
Should be backported to 3.20.x
Comment 15 Tomás Cohen Arazi 2015-08-20 16:47:00 UTC
Patches pushed to master.

Thanks Katrina and Jonathan!
Comment 16 Chris Cormack 2015-08-23 06:15:06 UTC
Pushed to 3.20.x will be in 3.20.3