Commit graph

911 commits

Author SHA1 Message Date
c76b77ad42 Bug 24879: Add check_cookie_auth when missing
This can certainly be improved to adjust the permissions, but at least
they are no longer opened to the world..

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 496c8c4e2d9199a38c796fdd6f63d89d8c6b215d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 309e976765f593d6ec2b857295dc58e57d58900e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
2024-03-25 08:23:03 +00:00
2a14e79250 Bug 35290: (follow-up) Perltidy formatting corrections
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-28 14:14:17 +00:00
c2c52c3223 Bug 35290: Sanitize field input on cataloguing/ysearch.pl
This change sanitizies the field input on cataloguing/ysearch.pl

Test plan:
0. Apply the patch and restart/reload Koha
1a. "Add marc21_field_260b.pl plugin to 260$b in the Default framework"
1b. Go to http://localhost:8081/cgi-bin/koha/admin/marc_subfields_structure.pl?
op=add_form&tagfield=260&frameworkcode=#subbfield
1c. Choose "marc21_field_260b.pl" from the dropdown next to "Plugin"
1d. Click "Save changes"
2a. "Add new record"
2b. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=
3. Click on tab "2" and scroll down to 260 "b"
4. Type in "Ori" into 260 subfield b
5. Some autocomplete suggestions should appear

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-28 14:14:17 +00:00
a0458e0300 Bug 35298: Remove focus handler from dateaccessioned plugin.
Test plan:
Verify that setting focus to date acquired field in items editor
fills date of today when field is empty but does not replace existing
date.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0583deac95)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5ca56bf8b3)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-11-16 09:37:10 +00:00
Katrin Fischer
156ab3c738 Bug 34993: (QA follow-up) Perltidy
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 24e1ee2118)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6b193a8097)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:46:49 -01:00
Emily Lamancusa
20c77759cf Bug 34993: Pass context parameters to generate_subfield_form
Pass necessary parameters from the UI to ensure that the basic
MARC editor can correctly identify when a framework is changed,
a bib is being duplicated, or a bib is being imported with Z39.50 -
for purposes of filling in default values according to the settings
of ApplyFrameworkDefaults.

To test:
1. Set the system preference ApplyFrameworkDefaults - Select All
2. Create or edit a MARC bibliographic framework with a default value in
   one of the fields (such as 500$a)
3. Go to the Cataloguing module and create a new record using the
   framework from step 2
   --> Confirm that the default value is filled in
4. Search for an existing bib record
5. Click Edit > Edit record to open the basic editor
6. If the field from step 2 already has data, clear it
7. Switch the framework to the framework from step 2
   --> Confirm that the default value is filled in
8. Clear the field again, and save the edit
9. Click Edit > Edit as new (duplicate)
   --> Confirm that the default value is filled in
10. Go to the cataloguing module and do a Z39.50 search
11. Find a record that does not have a value for the subfield from step 2
12. Import the record using the framework from step 2
    --> Confirm that the default value is filled in

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0c94114790)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e72ac1bacc)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:46:42 -01:00
04feadb6bf Bug 32379: Add check on existing item
Simplest fix; bail out with output_error.

Test plan:
Try /cgi-bin/koha/cataloguing/additem.pl?biblionumber=1&op=saveitem&itemnumber=999999
Note: Replace 1 by existing biblionumber, and iitem 999999 should not exist.
You should get the 404 screen now.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0677a53e14)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7890c068fa)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
2023-11-14 13:41:58 -01:00
Julian Maurice
33ad16fdb7 Bug 32853: Fix cataloguing/value_builder/unimarc_field_125.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 826aeaf22f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit dd34d7df04)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-11-13 15:22:17 +00:00
Julian Maurice
391e8d7c5f Bug 32856: Fix cataloguing/value_builder/unimarc_field_126.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4fa7d59c61)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 57da913eae)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-11-13 15:22:17 +00:00
c8eb02e5c8 Bug 34171: Use barcodedecode when attaching items to another record
Bug 26351 added barcodecode that transforms scanned barcodes either
by using itemBarcodeInputFilter  or via a plugin to various pages in
Koha, including checkout and checkin. But the feature for attaching
items to a new record was missed.

To test:
* Add an item with barcode "ab" to any record
* Set itemBarcodeInputFilter to "Remove spaces from"
* Search for another record in the catalog
* Edit > attach item > "a b"
* The item is not found.
* Apply patch, restart_all
* Try again with "a b"
* Verify that the item is found and attached to the record

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit cd033bfc60)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e65437199a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-11-13 14:19:28 +00:00
f3742afa64 Bug 35101: Stop screen from jumping back to top when using barcode.pl plugin
To test:
1. Set 'autoBarcode' to something other than 'don't generate automatically'
2. If the a framwwork make sure some 952 fields have the barcode.pl plugin enabled
3. Add a new item and click the '...' next to the 952 field with the barcode.pl plugin enabled.
4. The screen jumps back to the top, annoying.
5. Apply patch
6. Try again, it should not jump anymore!

Signed-off-by: Barbara Johnson <barbara.johnson@swbell.net>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eec5d7e4be)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 85d38e5ef5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-11-13 14:03:03 +00:00
24e48496a7 Bug 34689: Ignore itemnumber when creating item hash
A primary key error can be thrown when an item number is included in a new title hash. We need the item creation to ignore an itemnumber even if it is included in a MARC Framework

Test plan:
1) Edit the MARC framework relating to books (BKS in KTD)
2) In the 952$9 field (Koha itemnumber (autogenerated)), change the value of "Managed in tab" to "items (10)"
3) In the catalog, find a record that uses that MARC framework
4) Click "New" and choose to add a new item
5) Enter a barcode and click the "Add & duplicate" button
6) The page will refresh and an item will have been added
7) Enter a new barcode and click the same button again
8) An error will be thrown
9) Click the back button in the browser
10) Apply patch and restart_all
11) Click the add and duplicate button again
12) This time no error will be thrown and the page will refresh with another new item added
13) Sign off!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5b9dbe558f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 71dda50762)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-10-17 16:56:24 +00:00
301f5ecf85 Bug 34288: Allow access to the cataloguing module with tools permission
Bug 31162 moved the cataloguing tools to a new cataloguing module home
page. This prevents people without cataloguing permissions, but with
some tools permissions to access things like the labels creator tool.

I tracked all permissions on the cataloging-home.tt template, including
the Stock Rotation ones which I initially missed because I was focusing
on tools.

This patch makes the cataloging-home.pl page require either
'cataloguing' or any relevant 'tools' permission to allow access. the
page.

The staff interface main page and the top bar dropdown are updated using
the same logic to display the cataloguing module link.

For that purpose, I wrapped the permissions on a sub in `C4::Auth`.

To test:
1. Have a patron with only 'catalogue' and some of this permissions:

* inventory
* items_batchdel
* items_batchmod
* items_batchmod
* label_creator
* manage_staged_marc
* marc_modification_templates
* records_batchdel
* records_batchmod
* stage_marc_import
* upload_cover_images
* stockrotation => manage_rotas

2. Log in
=> FAIL: No link to the cataloguing module, neither in the dropdown
3. Apply this patch
4. Repeat 2
=> SUCCESS: You have the link!
5. Play with the different combinations and notice things are sound and
   correct
6. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0db60995a8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit afacad6a2d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-07-19 10:14:21 +00:00
27b7f9576f Bug 34232: Make dropdown on additem page rescept display order
To test:
1. EnableItemGroups
2. Find a record and add some new item groups with different display orders
3. Now edit an item on the record and scroll down to the dropdown underneath "+ Add to item group"
4. Notice that the values in the dropdown do not respect the display order.
5. Apply patch and restart_all
6. The display order should now be respected

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8065e3515a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ebe3637a25)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-07-18 15:28:31 +00:00
Phil Ringnalda
9fef2b809d Bug 34097: Prevent clicking ellipsis for dateaccessioned plugin from scrolling up
Test plan:
1. Find a record with several items (in ktd "MacLaren's Gaelic
   self-taught" will do nicely
2. Click the Edit button next to one of the items
3. Click the "..." to the right of "d - Date acquired" and verify that the
   page doesn't scroll up to the top, and that the current date is
   inserted in the field
4. Click the "..." to the right of "w - Price effective from" and verify
   that the page doesn't scroll up and the current date is inserted

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3824547e5c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2d24f269f5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-07-18 14:47:45 +00:00
58cbb8f450 Bug 34146: Do not allow multiple copies to crash server
Currently hardcoded to 1000.
Can be refined later. Let's first prevent this kind of accidents.

Test plan:
Add additem.pl. Edit the 1000 to 2. Restart all.
Add 3 multiple copies. Notice that you got 2.
Revert your code change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2eba689a5a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4945626e32)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-07-18 13:11:35 +00:00
681215be89 Bug 32959: Don't store results of autobarcode in item editor templates
Test Plan:
1) Enable autobarcode
2) Create a new item template, leave the barcode field blank
3) Apply that item template
4) Note the template prefills the barcode field
5) Delete that item template
6) Apply this patch
7) Restart all the things!
8) Repeat steps 2-4
9) Note the barcode field remains empty!

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 47b2b4f15a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-06-08 16:51:19 +00:00
e0077548da Bug 33445: Pass through form info if present and use record values otherwise
This patch updates the form to pass through values formthe form when searching, and
to use record values if nothing is passed in.

TO test:
 1 - Without the patch, edit a personal name authority record
 2 - Replace 100 subfield a (200 subfield a for UNIMARC) with your own name
 3 - Click "Replace record via Z39.50/SRU search"
 4 - Note that prefilled search field contains the original value, not your name.
 5 - Replace the Author (personal) field with your name in the search form
 6 - choose a search target, and click Search.
 7 - Note that the results of the search are for the original value, not your name
 8 - From the details page of a record, click 'Edit -> Replace record via Z3950'
 9 - Note form is prefilled
10 - Change value as in 5 and search
11 - Note original term was searched
12 - Apply patch, restart all
13 - Repeat searches as before
14 - Confirm that form is prefilled with record or the updated value
15 - Confirm your entered search terms are always searched

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 44e868f464)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-05-15 12:41:21 +00:00
Julian Maurice
a1188b89a1
Bug 32874: Fix cataloguing/value_builder/unimarc_field_700-4.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8f84bc082b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-11 13:23:41 +01:00
Julian Maurice
b913b98929
Bug 32484: Enable plugins when UseACQFrameworkForBiblioRecords is set
Test plan:
1. Do not apply the patch yet
2. Make sure you have an ACQ biblio framework with some framework
   plugins enabled. Create it if you don't.
3. Enable UseACQFrameworkForBiblioRecords system preference
4. Create a new acquisition basket.
5. On this new basket, click on "+ Add to basket", then "From a new
   (empty) record"
6. You should see a simplified MARC editor based on ACQ framework.
   Confirm that the plugins are not enabled (no visible buttons, nothing
   happening on focus/blur)
7. Apply patch
8. Repeat step 5
9. You should now see the plugins' buttons (only if you enabled plugins
   that use the 'click' event)
10. Confirm that the enabled plugins work correctly

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit edcabe3728)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2023-05-11 11:38:18 +01:00
Julian Maurice
28c518b868 Bug 32865: Fix cataloguing/value_builder/unimarc_field_146a.pl
Remove unnecessary call to event.preventDefault()

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f1a27df97e)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-05-10 13:49:26 +01:00
Julian Maurice
84545f0c2a Bug 32870: Fix cataloguing/value_builder/unimarc_field_225a_bis.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aab0da10d8)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-05-10 13:49:17 +01:00
Julian Maurice
57c5f47dfc Bug 32869: Fix cataloguing/value_builder/unimarc_field_210c.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d0d4ce0e6b)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-05-10 13:49:06 +01:00
Julian Maurice
6d338c8f3b Bug 32873: Fix cataloguing/value_builder/unimarc_field_686a.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9030a637e2)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-05-10 13:48:56 +01:00
Julian Maurice
57b84056ec Bug 32868: Fix cataloguing/value_builder/unimarc_field_210c_bis.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 166f13b88e)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-05-10 13:48:46 +01:00
Julian Maurice
7f50e5284e Bug 32871: Fix cataloguing/value_builder/unimarc_field_225a.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c9ddf42075)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-05-10 13:48:35 +01:00
Julian Maurice
9c23d18864 Bug 32866: Fix cataloguing/value_builder/unimarc_field_146h.pl
Remove unnecessary call to event.preventDefault()

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f7beb484eb)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-05-10 13:48:26 +01:00
Julian Maurice
48a26071ca Bug 32867: Fix cataloguing/value_builder/unimarc_field_146i.pl
Remove unnecessary call to event.preventDefault()

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bffb4fb0f4)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-05-10 13:48:16 +01:00
Julian Maurice
e4849e1874 Bug 32817: Fix cataloguing/value_builder/dateaccessioned.pl
Remove unnecessary call to event.preventDefault()

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8047afde13)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-05-10 13:48:03 +01:00
Julian Maurice
edf9c754b5 Bug 32818: Fix cataloguing/value_builder/marc21_field_005.pl
Remove unnecessary return statement

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6454da4eda)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-05-10 13:47:45 +01:00
Julian Maurice
68ede82a65 Bug 32872: Fix cataloguing/value_builder/unimarc_field_4XX.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0e85a35164)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-05-10 13:47:32 +01:00
Julian Maurice
8e2d89eb52 Bug 32875: Fix cataloguing/value_builder/unimarc_leader_authorities.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 634c23f699)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-05-10 13:47:20 +01:00
Julian Maurice
104f6951dd Bug 32876: Fix cataloguing/value_builder/unimarc_leader.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 16bd0d658e)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-05-10 13:47:08 +01:00
30260ece2f Bug 33375: Quote reserved keyword 'rank' in advanced editor
This change quotes the 'rank' keyword in the advanced editor,
so that it doesn't cause fatal crashes when using MySQL 8

Test plan:
0. Apply patch and koha-plack --restart kohadev
1. Enable advanced editor
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=EnableAdvancedCatalogingEditor
2. Go to http://localhost:8081/cgi-bin/koha/cataloguing/editor.pl#new/
3. Click on "Advanced" on the left nav
4. Note that "LIBRARY OF CONGRESS" is ordered before "NATIONAL LIBRARY OF FRANCE"
5. Rejoice!

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 99f8273673)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-18 12:08:13 +00:00
717715dd9e Bug 32418: Remove useless statement
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 74dd4dc281)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-18 12:03:57 +00:00
98673dc9d4 Bug 32418: (follow-up) Remove jQuery, Fix typos in url, add biblio as template param
To test:
1. Go to any record
2. Hit the edit button on an item in the holdings table
3. Modify the URL so that the query param for the itemnumber is either
    3.1 empty: /cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=384&itemnumber=
    3.2 an itemnumber that doesn't exist:
      /cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=384&itemnumber=9999999999
    3.3 whatever else you come up with..
4. Check the same thing for the dupe option (op=dupeitem)
5. Sign off

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 40d014ec45)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-18 12:03:38 +00:00
eb033b9438 Bug 32418: Can't call method 'unblessed' on an undefined value at cataloguing/additem.pl
Check whether the current op is edititem or dupeitem and if so check
whether the itemnumber supplied as a query param actually exists.

If it doesn't, redirect to the additem op and hide all UI elements except
for a dialog that gives options to add a new item to the record or to
view the records holdings.

This behaviour was adapted from the addbiblio view, as suggested by
Fridolin.

To test:
1. Go to any record
2. Hit the edit button on an item in the holdings table
3. Modify the URL so that the query param for the itemnumber is either
    3.1 empty: /cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=384&itemnumber=
    3.2 an itemnumber that doesn't exist:
      /cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=384&itemnumber=9999999999
    3.3 whatever else you come up with..
4. Check the same thing for the dupe option (op=dupeitem)
5. Sign off

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ef803755f5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-18 12:03:18 +00:00
Julian Maurice
bf2836cb34 Bug 32850: Fix cataloguing/value_builder/unimarc_field_124.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d79ec626fc)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
2023-04-16 17:45:49 +01:00
Julian Maurice
dcb4c8f5fc Bug 32864: Fix cataloguing/value_builder/unimarc_field_141.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit be54d835cb)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-11 11:12:00 +00:00
Julian Maurice
530e1f1585 Bug 32863: Fix cataloguing/value_builder/unimarc_field_140.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c66589555a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-11 11:11:42 +00:00
Julian Maurice
cf59164d79 Bug 32862: Fix cataloguing/value_builder/unimarc_field_135a.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5d2677a4ac)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-11 11:11:24 +00:00
Julian Maurice
15b6363265 Bug 32861: Fix cataloguing/value_builder/unimarc_field_130.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a81e94844f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-11 11:11:07 +00:00
Julian Maurice
edffc1f672 Bug 32860: Fix cataloguing/value_builder/unimarc_field_128c.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 848ff6cf95)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-11 11:10:50 +00:00
Julian Maurice
a6a4a34cbc Bug 32859: Fix cataloguing/value_builder/unimarc_field_128b.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b37a45717e)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-11 11:10:33 +00:00
Julian Maurice
836862111f Bug 32858: Fix cataloguing/value_builder/unimarc_field_128a.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 28c9f9e1aa)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-11 11:10:16 +00:00
Julian Maurice
e16a89100d Bug 32857: Fix cataloguing/value_builder/unimarc_field_127.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2b5784c5cb)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-11 11:09:59 +00:00
Julian Maurice
5060f0082a Bug 32855: Fix cataloguing/value_builder/unimarc_field_126b.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8f85d85d9c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-11 11:09:40 +00:00
Julian Maurice
7d426c4f9f Bug 32854: Fix cataloguing/value_builder/unimarc_field_126a.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 898dceff48)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-11 11:09:22 +00:00
Julian Maurice
cf55fd8efe Bug 32852: Fix cataloguing/value_builder/unimarc_field_125b.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ad7d3e5099)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-11 12:05:33 +01:00
Julian Maurice
52b244c35e Bug 32851: Fix cataloguing/value_builder/unimarc_field_125a.pl
Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b1fa6e27b0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
2023-04-11 12:05:33 +01:00