Commit Graph

374 Commits

Author SHA1 Message Date
nela a86b7a063d
Bug 43650: incremental EAN-13 barcodes produce unexpected sequence
When incremental EAN-13 barcodes are selected for autoBarcode and new item
records are created an unexpected sequence of barcode numbers is produced
instead of a sequence where the barcode is incremented by 1 between each item.
This patch fixes that by adding quote marks in the inline JS, thus treating the
barcode as a string rather than an integer :+)

Test plan:
1. have records imported from somewhere but with no items
2. autoBarcode set to incremental EAN-13 barcodes
3. create a number of new items
4. observe that the item barcodes don't follow the expected sequence
5. apply patch
6. delete item records
7. repeat step 3
8. observe that the item barcodes follow the expected sequence

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-09-29 16:03:52 +00:00
Martin Renvoize 04809de849
Bug 42764: Fix spelling errors across the codebase
Correct genuine spelling errors identified by the codespell 2.4.x
full scan after the KTD container OS upgrade. Changes are in
comments, POD, strings, and template text across 55 files.

"SAN Ouest Provence" (the French library co-operative and Koha
sponsor) is preserved as a proper noun. Perl copyright lines
receive an inline # codespell:ignore annotation; about.tt files
(contributor attribution pages) are added to the Koha::Devel::Files
codespell exception list so that future uses of "Provence" as a
typo for "Province" are still caught in all other files.

Notable user-visible fixes:
- "submiting" -> "submitting" in authority and bibliographic merge screens
- "deleteable" -> "deletable" in patron exception messages
- "Acquistions" -> "Acquisitions" in reports dictionary

Test plan:
1. Apply patches
2. In the staff interface, go to Cataloguing > Merge records and
   confirm the submit button reads "Submitting" (not "Submiting")
3. In the staff interface, go to Authorities > Merge and confirm
   the same correction
4. Attempt to delete a patron with outstanding issues and confirm
   the error message reads "deletable" (not "deleteable")
5. prove xt/author/codespell.t
=> All tests pass

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-03 16:09:04 +00:00
Lucas Gass 1a0501f5e8
Bug 42262: encodeURIComponent for the 006 value
To test:
1- have a MARC record with Type of Material "BKS - Books" that does not have an 006 defined (biblio 1 in the KTD default data will work)
2- edit the biblio in the basic editor
3- open the tag editor for the 006
4- observe that the values along the top of the tag editor window show a value of "" (blank) in position 17
5- click Save in the tag editor window
6- confirm that the values in the 006 tag end with a space
7- open the 006 tag editor again
8- observe that the values along the top of the tag editor window no longer show any value for position 17. Instead, they end with the zero in position 16
9- click Save in the tag editor window
10- confirm that the values in the 006 tag now end with a zero, not followed by a space
11- save your biblio
12- edit the biblio in the basic editor again, get warning "The following fixed-length control field(s) have an invalid length: 006. Please fix."
13- APPLY PATCH and restart_all
14. Try editing the 006 value again, the whitespace should be preserved and you get no error.

Signed-off-by: Justin Swink <Justin.Swink@littleelm.gov>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-18 09:30:21 -06:00
Martin Renvoize fc6e5839d4
Bug 42221: Fix EAN-13 autoBarcode not incrementing
The EAN-13 barcode query used max(abs(barcode)) which allowed non-EAN-13
barcodes (e.g. 14-digit KTD sample barcodes) to dominate the result.
The saved 13-digit EAN-13 barcodes were always smaller, so $nextnum
never advanced and the same barcode was generated on every page load.

Fix by extracting EAN-13 logic into C4::Barcodes::ValueBuilder::EAN13
(consistent with other barcode type packages) and scoping the query to
WHERE length(barcode) = 13 so only valid-length barcodes contribute to
the max. Both barcode.pl and Koha::REST::V1::Biblios now call the shared
function, eliminating the duplicated inline code.

Tests: adds EAN-13 test cases to t/db_dependent/Barcodes_ValueBuilder.t
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-16 15:54:09 -06:00
Petro Vashchuk b3cddc9994
Bug 41454: Remove unused dbh calls
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Amended-by: Jonathan Druart
Tidy C4/Search.pm

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-15 09:14:51 -06:00
Fridolin Somers c10e7a67df
Bug 31717: Value builder unimarc_field_010.pl also use 214$c
Value builder unimarc_field_010.pl tries to find publisher from ISBN in order to fill 210$c.
Since there is now 214$c for publisher this value builder should be adapted.
214 is more important than 210 so if there are both, only 214 will be filled.

Test plan :
1) Choose an existing record with an ISBN and a published in biblioitems.publishercode,
   For example 9782070612369 and Gallimard
2) Use value builder unimarc_field_010.pl on 010$a
3) Create a new record
4) Enter 9782070612369 in 010$a
5) Click on value builder icon on this subfield
6) Check you see 'Gallimard' in 214$c

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-20 11:54:32 +00:00
Fridolin Somers 3b4db6dba6
Bug 40306: Use GET in form of value_builder/unimarc_field_4XX.pl
Since CSRF procetion form without CUD action must use GET instead of POST
Fix value_builder/unimarc_field_4XX.pl

Test plan:
1) Use UNIMARC DB
2) Be sure value builder unimarc_field_4XX.pl is defined on 461$t
3) Create a new biblio record
4) On 461$t click on 'Tag editor' icon
5) Perform a search
6) Click on choose
7) Field 461 is filled

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-19 10:42:29 +00:00
Marcel de Rooy b913df0844
Bug 41060: (QA follow-up) Consistent return for empty string
An empty ISBN should not warn just like an empty ISSN.

Test plan:
Verify that clearing ISBN or ISSN does not warn anymore.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:32 -07:00
Marcel de Rooy 76a1dc2dd6
Bug 41060: (QA follow-up) Check in change, trigger once in Blur
If we already checked and nothing changes, no need to check again.
Set focus to field if we warn.
For consistency copied these changes to validate_isbn.

Test plan:
Try various valid and invalid ISSNs.
Tab through the field repeatedly; you should only have a warning
once, if the ISSN is invalid (yellow colored).
Save a bad ISSN into a record. Open it again and tab through ISSN;
you should be warned.

Repeat similarly for ISBN field.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:32 -07:00
Arthur Suzuki c3e8b34e6a
Bug 41060: (QA follow-up) improve ISSN format detection
Two tests have been added:
- not only the checksum of the ISSN is checked but also the format.
- if the ISSN is left empty, the plugin won't give a warning.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:31 -07:00
Arthur Suzuki 110f7d8030
Bug 41060: Add a cataloguing plugin to check ISSN
Test plan:
- without patch login to Koha
- edit a biblio and put a wrong ISSN in 022a (011a for unimarc).
- leave the input field (looses focus), no warning
- apply patch and do "reset_all" to make a full re-install.
- edit the biblio again and put an invalid ISSN in 022a (011a for unimarc).
- when you leave the input field you should have a warning saying
  "invalid ISSN".
- the input field should turn yellow
- you can still save the biblio with a wrong issn, it is just a warning.
- if you apply the patch on an existing install, you must manually link
  the value builder to your existing frameworks to get it working.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:31 -07:00
Janusz Kaczmarek 4fedfc5adb
Bug 29733: MARC21: Link 7xx linking fields to marc21_linking_section.pl value builder
When creating an analytical record from scratch and filling the 773
field with marc21_linking_section.pl plugin, the information put
in field 773 is very basic, incomplete, sometimes buggy ($9, $0).

Test plan
=========
1. Configure a MARC bibliographic framework: enable essential
   subfields in 773: 7, a, t, b, d, g, k, x, z, w (check the Editor
   checkbox), put them in this order, and chose plugin
   marc21_linking_section.pl for 773 $t.
2. Start creating a new record and go to 773 $t. Activate the plugin
   to find the a record to become the host record (perform a search
   for 'Linux kernel development'). Note the content of the 773
   field.
3. Apply the patch, restart plack etc.
4. Repeat p. 2.-3. See that the generated 773 field contains now much
   more information, including 773 $7.

Additionally, commented code has been removed and check/variable
initialization added to get rid of warnings in log.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-07 10:54:14 -07:00
Jonathan Druart 01514e3aa4
Bug 40943: Use session_id from userenv instead of cookie for value_builder
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Inline tidy. Moved set_userenv_from_session before POD of next sub.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-11-03 14:13:33 -07:00
Lucas Gass a35688c073
Bug 39880: Add shelving location to cn_browser results
To test:
0. APPLY PATCH and resart_all
1. Make sure you have items with itemcallnumber's in your DB
2. Visit http://localhost:8081/cgi-bin/koha/cataloguing/plugin_launcher.pl?q=1&plugin_name=cn_browser.pl and make a search
3. You should see a column for Shelving location now

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-14 14:51:58 -06:00
Lucas Gass 53fca82002
Bug 29980: (follow-up) Fix GNU license link
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-09 16:47:21 -06:00
Arthur Suzuki 53f1874892
Bug 29980: Add a cataloguing plugin to check ISBN
Test plan:
- without patch login to Koha
- edit a biblio and put a wrong ISBN in 020a (010a for unimarc).
- leave the input field (looses focus), no warning
- apply patch and do "reset_all" to make a full re-install.
- edit the biblio again and put an invalid ISBN in 020a (010a for unimarc).
- when you leave the input field you should have a warning saying "invalid ISBN".
- the input field should turn yellow
- you can still save the biblio with a wrong isbn, it is just a warning.
- if you apply the patch on an existing install, you must manually link the value builder to your existing frameworks to get it working.

Signed-off-by: Johannes Reuter <reuter@die-bonn.de>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-10-09 14:58:40 -06:00
Tomas Cohen Arazi 1873d97c07
Bug 40163: Fix several http addresses in the code docs
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-23 16:21:29 -06:00
Jonathan Druart 1d844a7d2f
Bug 39325: Automatic fix
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-28 18:51:22 +02:00
Julian Maurice 591d6abc1b
Bug 32877: Fix cataloguing/value_builder/upload.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: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-14 08:51:02 +02:00
Lucas Gass b1a326238a
Bug 35134: Use localStorage instead of a cookie
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-19 17:34:56 +01:00
Pedro Amorim da66e8ac83
Bug 35134: Save popup size to cookies and use that instead
Follow the original test-plan, open the pop-up and resize to whatever size.
Close the pop-up, open again, notice it opens to the same size it was previously closed.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-19 17:34:56 +01:00
Lucas Gass d50baeabac
Bug 35134: Make cn_browser popup responsive to screen size
To test:
1. Use the cn_browser.pl plugin for the 952$o ( call number )
2. Add or edit an item and select the `...` to the right of the call
   number field.
3. The pop-up is hardcoded as 500px x 400px pop-up.
4. APPLY PATCH
5. Clear browser cache and try again. The window width should now be
   half of the current screen size. The window height should be 100% of
   the screen height.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-19 17:34:55 +01:00
Julian Maurice f000278b32
Bug 30975: Use event delegation for framework plugins
This is to avoid using private jQuery method _data.
Here's what jQuery 1.8.0 release notes says about it:
"this is not a supported public interface; the actual data structures
may change incompatibly from version to version."
So we should not rely on it.

What this patch does is use event delegation [1].
Events are bound to a parent container, so when elements are added
dynamically inside that container, we don't need to re-attach event
handlers manually

This patch also comes with a bit of cleanup, and introduce "breaking
changes" (they are breaking changes only if you happen to have custom
framework plugins):
1) 'mouseover', 'mousemove', 'keypress' events are no longer listened to
   'mouseover' and 'mousemove' are not used and would trigger too much
   events.
   'keypress' is also not used, and is deprecated
2) Event handlers now takes a single parameter that is an Event object
   It just makes the code a lot less complicated.
3) Event handlers do not pollute the global scope anymore

[1] https://learn.jquery.com/events/event-delegation/

Test plan:
- Go to every page that has a MARC editor and verify that plugins still
  work. This includes addbiblio.pl, additem.pl, authorities.pl,
  neworderempty.pl, orderreceive.pl
- Test plugins that use 'focus' event (for instance barcode.pl), 'blur'
  event (callnumber.pl) and 'click' event (almost all the others)
- Test that plugins work on cloned fields/subfields

Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-27 17:32:33 +01:00
Koha Development Team d659526b5a
Bug 38664: Tidy the whole codebase
This commit is generated using:
  % perl misc/devel/tidy.pl
*within* ktd, to get the same version of perltidy than what will be used
by our CI (currently v20230309).

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:24 +01:00
Baptiste Wojtkowski b7ed38413a
Bug 8425: Increment the barcode on each call of set_barcode()
Duplicate barcodes are generated when placing an Order in Acquisitions when AcqCreateItem = "placing an order" and Autobarcode is turned on.

The problem is that you can accidentally attach 3 items to an order, but only 1 will be saved to the database. When you go to receive your order, you can only receive 1 item as the other two were never made, since the barcode wasn't unique.

In 3.8.0, a software error comes up which prevent any item creation, I believe, but master (3.9.x) doesn't throw any warnings or errors.

Yes.. This tries and solve a bug from 3.8.0 /o/

Test plan:
1 - set syspref "autoBarcode" to generated in the form <branchcode> yymm001
2 - set the barcode field to "barcode.pl" in marc structure
3 - create a new basket
4 - add one item to this basket
5 - click on the barcode field -> it should have a barcode
6 - click on add item and click on the new barcode fiels, it should have
 the same value
 APPLY PATCH:
7 - click on the barcode field -> it should have a barcode
8 - click on add item and click on the new barcode fields, it should have
  an higher barcode.

Note : The barcode is incremented each time the barcode with an empty
value is clicked on. Therefore, if the
librarian removes the value from barcode and click again, they could get
another barcode. I do not know if it is an issue.
Note: This patch is not splitted in two parts anymore

Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Followed the test plan, works as advertised.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-24 12:02:15 +01:00
David Cook aec1ad5bab
Bug 38030: (QA follow-up) Move csrf_token to POST body from URL
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-21 13:49:08 +01:00
Janusz Kaczmarek bba164856c
Bug 38030: stocknumberAV.pl fails with CSRF protection
The value builder stocknumberAV.pl does not work after applying the CSRF
protection. In console, it generates entries like:

POST
http://localhost:8081/cgi-bin/koha/cataloguing/plugin_launcher.pl
[HTTP/1.1 403 Forbidden 188ms]

Test plan:
==========
1. Modify the MARC bibliographic framework for the default framework by
   choosing stocknumberAV.pl as plugin for subfield 952 $i.
2. In Authorized values, add a new category 'INVENTORY'.  Add a new
   entry there, e.g. 'ABC', with any number in Description (eg. 123).
3. Find any bibliographic record, make sure it uses the default framework.
   If not set the framework accordingly.
4. Edit an item linked to this record.  Go to the 'i - Inventory number'
   subfield.  You should see three dots on the right.  In the input field
   put ABC and click the three dots.
5. Nothing happens.  You can check in the browser console--there should
   be a message like:
   POST http://FQDN:8081/cgi-bin/koha/cataloguing/plugin_launcher.pl
   [HTTP/1.1 403 Forbidden 188ms]
6. Apply the patch; restart_all.  Refresh the browser window.
7. Repeat p. 4.  You should now get the next sequence number next to
   the 'ABC' (i.e. ABC 0000000124 or similar).

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-22 12:06:50 +02:00
Lucas Gass f723c33d48
Bug 37371: Move Maskito init to onReady in dateaccessioned.pl
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-07-22 07:33:18 +01:00
Lucas Gass b89c6940cf
Bug 33703: Add Maskito to dateaccessioned.pl
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-26 17:06:10 +02:00
Janusz Kaczmarek 68f884d32f
Bug 36577: (bug 34478 follow-up) marc21_linking_section.pl not working
After applying "Bug 34478: op =~ ^cud- everywhere" the plugin
marc21_linking_section.pl stopped working properly.  Since the plugin
does not perform a CUD operation, the GET request can be used, and so
the use of CSRF token is not needed.

The patch fixes also problems with result page numbers display.

Test plan
=========
1. Configure a MARC bibliographic framework to use the plugin
   marc21_linking_section.pl (e.g. in 773 $t).
2. Start creating a new record and go to 773 $t. Activate the plugin to find
   the any record to become the host record (perform a search for any
   common word, like 'and').
3. You will get no results.
4. Apply the patch, restart plack etc.
5. Repeat p. 2 - you should now see some results, possibly more than one
   page.  You should be able to change page with Next/Previous arrows and
   also with the page numbers.

BTW, QA people - maybe it would pay to remove the commented code present there
since the very beginning (2012).

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-18 16:51:12 +02:00
Jonathan Druart f7efa5ae92
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>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-04-03 17:05:50 +02:00
Marcel de Rooy 0583deac95
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>
2023-11-14 10:32:36 -03:00
Julian Maurice 826aeaf22f
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>
2023-10-30 09:02:15 -03:00
Julian Maurice 4fa7d59c61
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>
2023-10-30 09:02:14 -03:00
Lucas Gass eec5d7e4be
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>
2023-10-20 11:02:53 -03:00
Katrin Fischer 375578014a
Bug 3007: Remove unimarc_field_700-4.pl value builder
I tried translating it, found it not working and replaced
by the qualif authorised value list with relator terms/codes.

To test:
* Make sure the unimarc_field_700-4.pl is no longer listed in
  frameworks.
* Make sure it's not used in the standard frameworks.

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>
2023-10-18 15:41:24 -03:00
Owen Leonard 9f54c1c9f0
Bug 34657: Merge cataloging plugins for UNIMARC 123d, e, f, and g
This patch removes some UNIMARC cataloging plugins which were
essentially duplicates of each other and renaming the remaining version
to reflect that it's for use with multiple subfields.

UNIMARC 123$d, e, f, and g can all be filled with
unimarc_field_123defg.pl

It's easiest to test if you have UNIMARC sample data. In KTD, run
'reset_all_unimarc'

- Apply the patch and run the database update process.
- Go to Cataloging and create or edit a bibliographic record.
- Under tab 1, look for tag 123.
- Test the plugin link for subfields d, e, f, and g
  - In each case the popup window should have the heading "UNIMARC field
    123d/e/f/g builder"
  - Fill out the form each time and confirm that the values are copied
    to the correct field in the MARC editor window.

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>
2023-10-09 11:41:18 -03:00
Phil Ringnalda 3824547e5c
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>
2023-07-14 08:59:36 -03:00
Lucas Gass fee8373410
Bug 33365: Add item type column to cn_browser results
To test:
1. Go to MARC bibliographic framework, pick a framework and go to 952, subfield "o". Turn the cn_browser plugin on.
2. Pick or create an item in that framework, edit that item.
3. TO the right of the 952$o notice the "...". Click that start the call number browser.
4. Notice there is no column for item type.
5. Apply patch, restart_all
6. Notice there is now a column for item type.

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>
2023-05-16 10:17:14 -03:00
Julian Maurice 8f84bc082b
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>
2023-05-05 09:13:37 -03:00
Julian Maurice f1a27df97e
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>
2023-04-24 10:43:34 -03:00
Julian Maurice aab0da10d8
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>
2023-04-24 10:43:33 -03:00
Julian Maurice d0d4ce0e6b
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>
2023-04-24 10:43:32 -03:00
Julian Maurice 9030a637e2
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>
2023-04-24 10:43:32 -03:00
Julian Maurice 166f13b88e
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>
2023-04-24 10:43:31 -03:00
Julian Maurice c9ddf42075
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>
2023-04-24 10:43:30 -03:00
Julian Maurice f7beb484eb
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>
2023-04-24 10:43:29 -03:00
Julian Maurice bffb4fb0f4
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>
2023-04-24 10:43:28 -03:00
Julian Maurice 8047afde13
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>
2023-04-24 10:43:27 -03:00
Julian Maurice 6454da4eda
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>
2023-04-24 10:43:27 -03:00