Bug 28769

Summary: tabloop not used in cataloguing plugins
Product: Koha Reporter: Jonathan Druart <jonathan.druart+koha>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart+koha>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: enhancement    
Priority: P5 - low CC: david, kyle, m.de.rooy, tomascohen
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This technical change removes the "tabloop" variable that is passed from the add item form logic to the cataloguing plugins, as it is never used.
Version(s) released in:
21.11.00
Bug Depends on: 27526    
Bug Blocks: 28445    
Attachments: Bug 28769: Remove tabloop from cataloguing plugins
Bug 28769: Remove tabloop from cataloguing plugins
Bug 28769: Remove tabloop from cataloguing plugins
Bug 28769: Remove tabloop from cataloguing plugins
Bug 28769: (QA follow-up) Fix another occurrence

Description Jonathan Druart 2021-07-27 14:33:11 UTC
There is a "tabloop" variable that is passed from the add item form logic to the cataloguing plugins.
But there is confusion, sometimes it's an iterator ($i) and sometimes (batchMod.pl) an array.

Actually this tabloop variable is never used from cataloguing plugins, we should remove it.
Comment 1 Jonathan Druart 2021-07-27 14:35:57 UTC
Created attachment 123212 [details] [review]
Bug 28769: Remove tabloop from cataloguing plugins

There is a "tabloop" variable that is passed from the add item form logic to the cataloguing plugins.
But there is confusion, sometimes it's an iterator ($i) and sometimes (batchMod.pl) an array.

Actually this tabloop variable is never used from cataloguing plugins, we should remove it.

Test plan:
Read the code and confirm the above.
You can also test a couple of plugins and confirm that they are still
working.
Comment 2 Tomás Cohen Arazi 2021-10-05 17:01:59 UTC
This is a trivial change, *but* it needs to be advertised because it might break custom cataloguing plugins.
Comment 3 Tomás Cohen Arazi 2021-10-05 17:03:14 UTC
Created attachment 125748 [details] [review]
Bug 28769: Remove tabloop from cataloguing plugins

There is a "tabloop" variable that is passed from the add item form logic to the cataloguing plugins.
But there is confusion, sometimes it's an iterator ($i) and sometimes (batchMod.pl) an array.

Actually this tabloop variable is never used from cataloguing plugins, we should remove it.

Test plan:
Read the code and confirm the above.
You can also test a couple of plugins and confirm that they are still
working.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Jonathan Druart 2021-10-12 10:18:18 UTC
Created attachment 126085 [details] [review]
Bug 28769: Remove tabloop from cataloguing plugins

There is a "tabloop" variable that is passed from the add item form logic to the cataloguing plugins.
But there is confusion, sometimes it's an iterator ($i) and sometimes (batchMod.pl) an array.

Actually this tabloop variable is never used from cataloguing plugins, we should remove it.

Test plan:
Read the code and confirm the above.
You can also test a couple of plugins and confirm that they are still
working.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Marcel de Rooy 2021-10-12 15:10:27 UTC
(In reply to Tomás Cohen Arazi from comment #2)
> This is a trivial change, *but* it needs to be advertised because it might
> break custom cataloguing plugins.

Hmm. So trivial for skipping QA ?
Comment 6 Jonathan Druart 2021-10-12 17:00:33 UTC
Do you think it needs an additional pair of eyes on this patch, Marcel?
Comment 7 Marcel de Rooy 2021-10-13 11:09:09 UTC
(In reply to Jonathan Druart from comment #6)
> Do you think it needs an additional pair of eyes on this patch, Marcel?

Well, at least might need. I will do it this week.
Note that comment2 is no recommendation for using the fast lane :)
Comment 8 Marcel de Rooy 2021-10-15 06:25:38 UTC
QAing
Comment 9 Marcel de Rooy 2021-10-15 06:54:34 UTC
I wonder who wrote this in 2014: Note that some of these parameters are not used in most (if not all) plugins and may be obsoleted in the future (kept for now to provide backward compatibility).

Somehow I mixed up tabloop and tagslib. Tabloop is probably the most useless one to pass. But tagslib might be a good candidate too now, especially since we cache these structures now.
Comment 10 Marcel de Rooy 2021-10-15 06:55:24 UTC
Created attachment 126304 [details] [review]
Bug 28769: Remove tabloop from cataloguing plugins

There is a "tabloop" variable that is passed from the add item form logic to the cataloguing plugins.
But there is confusion, sometimes it's an iterator ($i) and sometimes (batchMod.pl) an array.

Actually this tabloop variable is never used from cataloguing plugins, we should remove it.

Test plan:
Read the code and confirm the above.
You can also test a couple of plugins and confirm that they are still
working.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 11 Marcel de Rooy 2021-10-15 06:55:28 UTC
Created attachment 126305 [details] [review]
Bug 28769: (QA follow-up) Fix another occurrence

Framework plugin unimarc_leader_authorities.pl.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 12 Jonathan Druart 2021-10-18 09:34:05 UTC
Pushed to master for 21.11, thanks to everybody involved!