]> git.koha-community.org Git - koha.git/log
koha.git
6 days agoBug 37395: Fix columns visibility on Vue tables
Jonathan Druart [Tue, 24 Sep 2024 12:20:59 +0000 (14:20 +0200)]
Bug 37395: Fix columns visibility on Vue tables

On bug 33066 we reworked a lot of datatables.js to make the JS function
reusable from the Vue component (and especially the KohaTable
component). I guess the regression comes from this change, but I am
surprised that we didn't catch it when testing.

The was a mistake for _dt_visibility, we didn't pass the node. Actually
we cannot pass it as we do not have it yet.

This "node" variable is only used when bKohaColumnsUseNames is passed
(ie. we do not rely on the order of the columns but we need to rely on
their data-colname attributes).

There is then a limitation here: we cannot use bKohaColumnsUseNames from
Vue, but we do not yet.

An ideal fix would be too big for now, especially for an hypothetic use
case.

Test plan:
Confirm that the "Columns" button are now back for the tables of the Vue
apps (ERM, Preservation) and that the settings are taken into account
(hide by default, etc.)

Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 35769: Remove extra parenthesis
Jonathan Druart [Wed, 24 Jan 2024 15:20:50 +0000 (16:20 +0100)]
Bug 35769: Remove extra parenthesis

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 35769: Fix untranslatable strings in request.tt
Katrin Fischer [Fri, 12 Jan 2024 22:52:42 +0000 (22:52 +0000)]
Bug 35769: Fix untranslatable strings in request.tt

This fixes some strings in the JavaScript part of the
template that were missing from the po files.

This is one way to test:
* Apply patch
* Run gulp po:update --lang <language-code>
* Compare strings changed in the patch, with strings
  appearing in <language-code>-staff-prog.po
* Translate the strings and remove "fuzzy" line
* In k-t-d, run:
  sudo koha-translate --install <language-code> --dev <instance>
* Verify that now the translated version of the template contains
  your translated strings
* Verify the translated page works correctly, no errors

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>
6 days agoBug 38148: (QA follow-up) Code comments
Nick Clemens [Tue, 22 Oct 2024 20:06:01 +0000 (20:06 +0000)]
Bug 38148: (QA follow-up) Code comments

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 38148: Revert back to get_effective_rule
Pedro Amorim [Tue, 22 Oct 2024 10:48:14 +0000 (10:48 +0000)]
Bug 38148: Revert back to get_effective_rule

And update the first conditional logic.
This patch aims to maintain the logic behind the first patch, but restore get_effective_rule.
get_effective_rule_value is using cache and I believe that is the reason why Items.t fail when using that.

Test plan:
1) Search for 'music' on OPAC
2) Notice records have the 'place hold' link
3) Visit circulation rules on Staff:
<staff_url>/cgi-bin/koha/admin/smart-rules.pl
4) On 'Default checkout, hold and return policy' , under 'Hold policy' pick 'From any library'. Hit 'Save'.
5) Repeat 1). Notice the 'place hold' link is gone.
6) Apply patch. restart plack. Repeat 1). Notice the 'place hold' is shown again

Run:
$ prove t/db_dependent/Koha/Items.t

Signed-off-by: andrewa <andrew.auld@ptfs-europe.com>
Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 38148: Check value of holdallowed circ rule properly
Aleisha Amohia [Fri, 11 Oct 2024 01:53:11 +0000 (01:53 +0000)]
Bug 38148: Check value of holdallowed circ rule properly

It was noted on Bug 29087 that the value of circulation rules needs to be checked differently, so this follow-up addresses that.

To test:

1. Apply patch and restart services
2. Search for a record on the OPAC. Confirm you can see a link to place a hold.
3. Search for this record on the staff interface and place a hold. Go to Circulation -> Holds to pull and confirm your hold shows in the list.
4. Confirm tests still pass t/db_dependent/Koha/Holds.t

Sponsored-by: Whanganui District Council
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: andrewa <andrew.auld@ptfs-europe.com>
Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 38148: Unit tests
Nick Clemens [Tue, 22 Oct 2024 19:54:42 +0000 (19:54 +0000)]
Bug 38148: Unit tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 27919: (follow-up) Fix translations
Matt Blenkinsop [Tue, 22 Oct 2024 10:30:45 +0000 (10:30 +0000)]
Bug 27919: (follow-up) Fix translations

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 27919: (QA follow-up): Add unit tests
Matt Blenkinsop [Mon, 1 Jul 2024 10:03:50 +0000 (10:03 +0000)]
Bug 27919: (QA follow-up): Add unit tests

prove t/db_dependent/Circulation/ReturnClaims.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 27919: (QA follow-up): Add alerts to the UI to show there are return claims
Matt Blenkinsop [Mon, 1 Jul 2024 09:50:45 +0000 (09:50 +0000)]
Bug 27919: (QA follow-up): Add alerts to the UI to show there are return claims

This patch adds info to the UI to show when there is a return claim. It also reconciles the behaviour for allowing the lost status to be changed. Previously the lost status could not be changed if there was a return claim. This is now possible and a message is shown highlighting the fact that there is a return claim as well as the new lost status.

Test plan:
1) Add a return claim to an item.
2) Check the holdings table on the record page and observe that the "Status" column now shows that there is a return claim
3) Click on the barcode for that item in the table to get to the item editing page
4) Observe that the select for the item lost status is not disabled
5) Change the status and save - the form should save correctly and display both the new status as well as a message showing that there is a return claim.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 27919: Update syspref description
Matt Blenkinsop [Thu, 6 Jun 2024 08:55:58 +0000 (08:55 +0000)]
Bug 27919: Update syspref description

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 27919: Return claims shouldn't change lost status if already set
Matt Blenkinsop [Tue, 28 May 2024 13:22:44 +0000 (13:22 +0000)]
Bug 27919: Return claims shouldn't change lost status if already set

This patch prevents a return claim from changing the lost status if it has already been set.

Test plan:
1) In system preferences, set the ClaimReturnedLostValue syspref to any value
2) Checkout an item to a patron
3) Set that item as lost, using a different status to the one you set in step 1
4) Create a return claim on the item
5) Check the item's lost status, it should now have been set to the value you set in step 1
6) Apply patch
7) reset_all
8) Repeat steps 1-5, this time the status should remain at the value you set in step 3 and not be overwritten by the return claim
9) Repeat steps 1,2,4 and 5 - this time the lost status should be set to the value you set in step 1 as we didn't have a pre-existing lost status

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 38030: stocknumberAV.pl fails with CSRF protection
Janusz Kaczmarek [Mon, 30 Sep 2024 09:22:03 +0000 (09:22 +0000)]
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>
7 days agoBug 38065: (QA follow-up) Move csrf_token to POST body from URL
David Cook [Tue, 22 Oct 2024 00:31:23 +0000 (00:31 +0000)]
Bug 38065: (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>
7 days agoBug 38065: Auto control number (001) widget in advanced editor does not work under...
Janusz Kaczmarek [Wed, 2 Oct 2024 18:04:56 +0000 (18:04 +0000)]
Bug 38065: Auto control number (001) widget in advanced editor does not work under CSRF protection

Auto control number (001) widget in advanced editor does not work under
CSRF protection.  A token should be passed to POST ...
control_num_sequences call.

Test plan:
==========

1. Verify that the CONTROL_NUM_SEQUENCE category in authorized values is
   present.
3. Add a new authorized value for CONTROL_NUM_SEQUENCE:
     b) authorised value: sprLib0001
     c) in Description - a short string indicating the type of control
     number i.e. "Springfield Library"
4. Create a new bib record using the advanced editor, insert a 001
   field, note that the 001 widget is there.  Click on "Assign next". There
   should be no effect (and you could see [HTTP/1.1 403 Forbidden 706ms] in
   the browser console).
5. Apply the patch ; restart_all ; reload the browser.
6. Repeat p. 4.  You should get the content of the 001 field generated
   by the widget.

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>
7 days agoBug 38082: Advanced editor does not save the selected framework
Janusz Kaczmarek [Thu, 3 Oct 2024 18:22:39 +0000 (18:22 +0000)]
Bug 38082: Advanced editor does not save the selected framework

When creating a fresh record in the advanced editor, it does not
save the framework selected from the Settings dropdown.

Test plan:
==========

1. Enable the advanced editor feature (EnableAdvancedCatalogingEditor).
2. Start editing a new record in the advanced editor.  Fill in the
   mandatory fields, select a framework (other than Default) from the
   Settings dropdown, save the record.
3. Select view -- note that the record has been saved with the Default
   framework.
4. Apply the patch; restart_all; refresh the browser window.
5. Repeat p. 2.
6. Select view -- you should now see that the record has been saved with
   the correct, selected framework.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 37505: (QA follow-up) Adjust tests
Emily Lamancusa [Mon, 21 Oct 2024 13:32:11 +0000 (09:32 -0400)]
Bug 37505: (QA follow-up) Adjust tests

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 37505: (QA follow-up) Don't log return stat if ignore_localuse and no checkout
Emily Lamancusa [Mon, 21 Oct 2024 12:52:21 +0000 (08:52 -0400)]
Bug 37505: (QA follow-up) Don't log return stat if ignore_localuse and no checkout

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 37505: Remove onloan check when checking out to stats patron
Lucas Gass [Thu, 29 Aug 2024 21:54:57 +0000 (21:54 +0000)]
Bug 37505: Remove onloan check when checking out to stats patron

To test:
1.  Create a Statistical Patron
2.  Set BlockReturnOfLostItems to Block.
3..  Mark an item as lost
4. Check it out to the Statistical Patron. You should see the message "Item was lost, cannot be returned."

5. Set BlockReturnOfWithdrawnItems to Block.
6.  Mark an item as withdrawn
7. Check it out to the Statistical Patron. You should see the message "Item was withdrawn, cannot be returned."
8. Turn off BlockReturnOfWithdrawnItems, check out the same item to the Statistical Patron. You should see a message "Item was withdrawn."

9. Place an item on hold.
10. Check it out to the Statistical Patron
11. See the message "Item on hold, please checkin."

12. Make sure  ClaimReturnedLostValue is set to a lost value
13. Claim a return, making sure it is not still checked out to the patron
14. Checkit it out to the Statistical Patron.
15. See the message "Item claimed returned, please checkin."

16. Have an item on a regular patron account that has been recalled.
17. Checkit it out to the Statistical Patron.
18. See the message "Item can fill a recall, please checkin."

Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 38211: frameworkcode must be set before read
Jonathan Druart [Mon, 21 Oct 2024 09:51:45 +0000 (11:51 +0200)]
Bug 38211: frameworkcode must be set before read

It's a stupid global variable, we MUST have this init line BEFORE we
read it!

Test plan:
See the other bugs linked with this one, confirm the test plan for all
of them still pass.

Test plan for this specific bug report:
1. Cataloging - New record -> Audio Cassettes, CDs
2. Fill in the required fields and save
3. Switch to 'Normal', Edit - Edit record
4. Note that 001 and 003 are not visible, and the Settings menu has a checkmark by Audio Cassettes, CDs
5. Click the browser Back button, then Edit - Edit record
6. Note that 001 and 003 are not visible, and the Settings menu has a checkmark by Audio Cassettes, CDs

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 38053: Change description of DefaultLongOverduePatronCategories and DefaultLongOv...
Caroline Cyr La Rose [Tue, 1 Oct 2024 15:23:48 +0000 (11:23 -0400)]
Bug 38053: Change description of DefaultLongOverduePatronCategories and DefaultLongOverdueSkipPatronCategories system preferences

This patch changes the description of the DefaultLongOverduePatronCategories
and DefaultLongOverdueSkipPatronCategories system preferences
to make it clearer it has to do with the **long overdues** process
and not just the overdues process. It also highlights the
warning by making it bold.

To test:
1. Apply patch
2. Go to Administration > System preferences > Circulation >
   Lost item policy
3. Read the description for DefaultLongOverduePatronCategories
   and DefaultLongOverdueSkipPatronCategories, make sure it
   makes sense, that the grammar and spelling is OK

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 38053: Change section of DefaultLongOverduePatronCategories and DefaultLongOverdu...
Caroline Cyr La Rose [Tue, 1 Oct 2024 15:13:59 +0000 (11:13 -0400)]
Bug 38053: Change section of DefaultLongOverduePatronCategories and DefaultLongOverdueSkipPatronCategories system preferences

This patch moves the DefaultLongOverduePatronCategories and
DefaultLongOverdueSkipPatronCategories system preferences to
the Lost item policy section of the circulation preferences,
to be with the other DefaultLongOverdue system preferences.

To test:
1. Apply patch
2. Go to Administration > System preferences > Circulation > Lost
   item policy
   --> The two system preferences should be there with the other
       ones

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36055: Simplify MARC21 Fast Add framework
Caroline Cyr La Rose [Fri, 9 Feb 2024 22:17:21 +0000 (17:17 -0500)]
Bug 36055: Simplify MARC21 Fast Add framework

This patch removes or hides a lot of unecessary fields from the
MARC21 Fast Add framework, notably subfields $6 and $8 which are
used only in advanced cataloging. Fast Add is meant to add an item
fast, while the patron is waiting, in order to check it out to them.
There is no need to enter details, only what is necessary to
identify and check out the item.

To test:
1. Go to Circulation > Fast cataloging
   --> Notice all the fields present
2. Fill out mandatory fields (000, 008, 245$a, 942$c)
3. Click 'Save'
   --> Notice all the item fields present
4. Apply patch and reset
5. Redo steps 1-3
   --> There should be a lot less fields

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 37412: Style placeholder text in the OPAC
Owen Leonard [Fri, 19 Jul 2024 13:29:34 +0000 (13:29 +0000)]
Bug 37412: Style placeholder text in the OPAC

This patch adds a custom style to input placeholder text so that it is
visibly different from the style of text entered in the input.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)

Go to the OPAC and check the appearance of the placeholder text in the
main search bar. Sign off if the vibes are right.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 37868: Remove C4::Reserves::ToggleSuspend
Jonathan Druart [Mon, 9 Sep 2024 12:53:05 +0000 (14:53 +0200)]
Bug 37868: Remove C4::Reserves::ToggleSuspend

We can easily replace the calls by ->suspend_hold and ->resume.

Test plan:
No behaviour changes expected.
Confirm that you can still suspend and resume holds (OPAC+staff)

Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36725: Add Current publication frequency 310$a to Elasticsearch index mappings
Alex Buckley [Sun, 12 May 2024 22:02:46 +0000 (22:02 +0000)]
Bug 36725: Add Current publication frequency 310$a to Elasticsearch index mappings

Test plan:
1. Start up KTD with Elasticsearch: ktd --es8 up

2. Apply this patch and restart all services (restart_all)

3. Reset the mappings: Administration > Catalog > Search engine configuration (Elasticsearch) > Reset mappings (at the bottom of the page)

4. Reindex: koha-elasticsearch --rebuild -d -b -a kohadev

5. Alternative to steps 3 and 4: reset_all

6. Add a new record using the default framework and put a term in 310$a, such as 'Annual'.

Sponsored-by: Education Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 27123: (QA follow-up) Tidy modborrowers.pl
Kyle M Hall [Fri, 27 Sep 2024 15:04:23 +0000 (15:04 +0000)]
Bug 27123: (QA follow-up) Tidy modborrowers.pl

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 27123: (follow-up) Add note to warn about removing all messages
Owen Leonard [Thu, 26 Sep 2024 19:36:25 +0000 (19:36 +0000)]
Bug 27123: (follow-up) Add note to warn about removing all messages

This patch adds a note to the batch patron modification form in order to
warn the user about removing multiple messages at once.

To test:

- Apply the patch and go to Tools -> Batch patron modification
- Enter or select multiple patrons and submit them for modification
- On the page previewing the list patrons for modification, scroll down
  to the form.
- Find the field for "Message" and confirm that there is a note next to
  the checkbox.

Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 27123: Add messages to batch patrons modification
jeremy breuillard [Tue, 22 Feb 2022 13:03:08 +0000 (14:03 +0100)]
Bug 27123: Add messages to batch patrons modification

With this patch you can write or delete circulation messages on the
batch patrons modification form

Test plan:
1)Go to Home > Tools > Batch patron modification
2)Write one or more card numbers to access the modification form
3)Notice the input you can interact with
4)Apply patch and repeat 1) & 2)
5)Notice the new input 'Message:' which appeared down the form
6)Write a message and choose a type (opac or intranet)
7)Save & notice the new 'Message' column filled up with what you wrote
  before
8)To delete: back on the modification form - check the checkbox beside
  the input - save again

Signed-off-by: Valerie Burnett <valerie@bywatersolutions.com>
Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36054: Don't mark MARC21 005 as mandatory in frameworks now that AddBiblio and...
Phil Ringnalda [Fri, 7 Jun 2024 20:03:16 +0000 (13:03 -0700)]
Bug 36054: Don't mark MARC21 005 as mandatory in frameworks now that AddBiblio and ModBibilio will set it no matter what

With bug 35993, both AddBiblio and ModBiblio will add a missing 005 or update
an existing 005 to the current timestamp. That makes setting it as mandatory in
bib frameworks pointless: whether you remove it, blank it, or set it, what you
do doesn't matter because it will be set, and set to something different than
what you set.

Test plan:
1. Apply patch, reset_all
2. Administration - MARC bibliographic framework
3. In the Default framework row, Actions - MARC structure
4. In the 005 row, verify the Mandatory column says No
5. 005 row, Actions - View subfields
6. For the @ subfield, verify constraints says Not mandatory

Extra credit: Set EnableAdvancedCatalogingEditor to Enable and in both editors
try to save a record without a 005 or with one set to your choice of value, and
then in the MARC preview verify that no matter what there is always a 005 with
a value other than yours. Bonus for exporting a record, editing it with an
external editor to remove the 005, reimporting it, and verifying that the
imported record has a 005.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 18273: Do not insert authority if there already are duplicates in koha
Matthias Meusburger [Wed, 15 Mar 2017 16:10:45 +0000 (16:10 +0000)]
Bug 18273: Do not insert authority if there already are duplicates in koha

Test plan:

1) Create an authority with a unique value in a searchable field, for instance a PERSO_NAME authority with 'BZ18273' in the 100$a field.

2) Create a second authority with the same value in the same field.

3) Export this second authority as iso2709 (Save -> MARC (Unicode/UTF-8))

4) Run bulkmarcimport.pl with the following parameters:
perl bulkmarcimport.pl -a --file=/kohadevbox/koha/auth-xxxx.utf8 --match='Heading,100$a' -l /kohadevbox/koha/bulk.log

5) Check in the log file and/or through search that a third authority has been added (despite using the --match option)

6) Apply the patch

7) Delete the 3 authorities and repeat step 1 to 4.

8) Check that a third authority has not been added (--match worked)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 37845: Remove C4::Members::DeleteExpiredOpacRegistrations
Jonathan Druart [Thu, 5 Sep 2024 15:06:04 +0000 (17:06 +0200)]
Bug 37845: Remove C4::Members::DeleteExpiredOpacRegistrations

This patch remove the subroutine C4::Members::DeleteExpiredOpacRegistrations.
The code is moved and adjusted to Koha::Patrons.
We now have 2 new methods:
  Koha::Patrons->filter_by_expired_opac_registrations
  Koha::Patrons->filter_by_safe_to_delete

Test plan:
Run the misc/cronjobs/cleanup_database.pl script with the
--del-exp-selfreg (as well as --verbose and --confirm) and confirm that
it behaves as expected

Note that it improve the output of the verbose mode and now tell if the something
is wrong with the config (syspref not set)

Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 37844: Remove C4::Members::DeleteUnverifiedOpacRegistrations
Jonathan Druart [Thu, 5 Sep 2024 14:52:38 +0000 (16:52 +0200)]
Bug 37844: Remove C4::Members::DeleteUnverifiedOpacRegistrations

This patch removes the subroutine
C4::Members::DeleteUnverifiedOpacRegistrations and use the
Koha::Objects->filter_by_last_update method that is used for the other
flag in this script.

Test plan:
Confirm that --del-unv-selfreg works the same before and after this
patch applied

Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 38197: Remove old version of Bootstrap JS left behind during upgrade
Owen Leonard [Thu, 17 Oct 2024 14:46:19 +0000 (14:46 +0000)]
Bug 38197: Remove old version of Bootstrap JS left behind during upgrade

This patch removes an old version of Bootstrap JS which should have been
removed by Bug 35402. The correct Bootstrap JS file is at
koha-tmpl/opac-tmpl/lib/bootstrap/js/bootstrap.bundle.min.js

This patch should have no effect on any OPAC functionality.
Bootstrap-related features should still work: Dropdown menus, modals,
etc.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 38056: Search term after deleting an authority shouldn't be URI encoded
Phil Ringnalda [Wed, 2 Oct 2024 02:01:39 +0000 (19:01 -0700)]
Bug 38056: Search term after deleting an authority shouldn't be URI encoded

Now that deleting an authority record uses a form, rather than building up a
URL in JavaScript, using the filter | uri on the value (confusingly named
value) which passes along the search terms to reload after deleting results
in a bad search. It should instead use the filter | html.

Test plan:
 1. Without the patch, top menu - Authorities
 2. The default search, Main heading ($a only), Authority type Default,
    Operator contains, Order by Heading A-Z will work fine. You need to a
    search which will return more than one of the same thing (not hard in
    ktd) - for MARC21 search for a professional
 3. You should get five results. For one of them, Actions - Delete - Confirm
    that you meant to click it
 4. You now have a%20professional in the search box, and search results for
    whatever ElasticSearch thinks a% means. It's certainly not professional -
    you can change that term to any random string and get the same results
 5. Apply patch, top menu - Authorities
 6. Repeat steps 2 and 3, but this time after deleting another result,
    you will get a professional without the %20 in the search box, and
    your results will be the remaining Addison-Wesley professional computing
    series authorities

Sponsored-by: Chetco Community Public Library
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 37850: Add branchillemail to libraries public REST endpoint
Pedro Amorim [Thu, 5 Sep 2024 18:47:20 +0000 (18:47 +0000)]
Bug 37850: Add branchillemail to libraries public REST endpoint

To test, before applying patch:
1) Visit <opac_url>/api/v1/public/libraries
2) Notice illemail is not shown for each library
3) Apply patch. Restart plack
4) Repeat 1). Notice illemail is now shown for each library

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36315: ILSDI GetRecords use AuthorisedValues cache for items.location
Didier Gautheron [Thu, 14 Mar 2024 13:51:35 +0000 (14:51 +0100)]
Bug 36315: ILSDI GetRecords use AuthorisedValues cache for items.location

Speedup GetRecords by using Koha cache for items.location authorised value.

Test plan
1) Enable ILS-DI http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ILS-DI
2) Download a record   http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=1
3) Note location_description
4) Apply patch
5) Re download the same record
6) Verify location_description are the same

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36798: DBRev 24.06.00.037
Katrin Fischer [Mon, 21 Oct 2024 10:25:37 +0000 (10:25 +0000)]
Bug 36798: DBRev 24.06.00.037

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36798: Unit tests
Janusz Kaczmarek [Thu, 16 May 2024 13:29:10 +0000 (13:29 +0000)]
Bug 36798: Unit tests

Added unit tests.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36798: Add ability to search across all ISBNs using the ISBN-search
Janusz Kaczmarek [Thu, 16 May 2024 11:29:04 +0000 (11:29 +0000)]
Bug 36798: Add ability to search across all ISBNs using the ISBN-search

With the Bug 36574 we added a new ES search field isbn-all which makes it
possible to find records with the content of the subfield 020 $z
(invalid/cancelled ISBN) in general search (by keyword).  But still, when
performing a search with ISBN-search these records will not be found.
Since some libraries deliberately want to find records with only 020 $a
with ISBN-search, a system preference would be needed here to be able to
customize the ISBN search.

The same for ISSNs, with one system preference.

Test plan:
==========
(ISBN)
------
1. Have the ktd with with ES enabled.
2. With standard ktd test data, try to perform a ISBN search from Advanced
   search for 9780141930848.  You should get no results.
   In the general search input field (on the main page) try a search
   nb:9780141930848 and/or isbn:9780141930848 - you should get no results.
3. Apply the patch, restart_all.
4. Repeat p. 2 -- you should still get no results.
5. Enable SearchCancelledAndInvalidISBNandISSN syspref.
6. Repeat p. 2 -- now you should get one record (having 9780141930848
   in 020 $z).

(ISSN)
------
0. Return to main, delete the bug branch, reset_all == start from fresh.
1. Have the ktd with with ES enabled.
2. With standard ktd test data, try to perform a ISSN search from Advanced
   search for 1089-6891.  You should get no results.
   In the general search input field (on the main page) try a search
   ns:1089-6891 and/or issn:1089-6891 - you should get no results.
3. Apply the patch, restart_all.
   If you have had to apply also the bug 36727, reindex ES with:
   koha-elasticsearch --rebuild -r -d kohadev
   (there is a modification of mappings.yaml)
4. Repeat p. 2 -- you should still get no results.
5. Enable SearchCancelledAndInvalidISBNandISSN syspref.
6. Repeat p. 2 -- now you should get one record (having 1089-6891
   in 022 $y).

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36798: Add 'SearchCancelledAndInvalidISBNandISSN' system preference
Janusz Kaczmarek [Tue, 14 May 2024 13:06:05 +0000 (13:06 +0000)]
Bug 36798: Add 'SearchCancelledAndInvalidISBNandISSN' system preference

This patch adds a new system preference SearchCancelledAndInvalidISBNandISSN:
whether to search for cancelled / invalid forms of ISBN/ISSN
when performing ISBN/ISSN search. (By default, with ES, only valid forms,
i.e.  020 $a / 022 $a are considered).

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 37023: Update timestamp when filling a hold
Johanna Raisa [Tue, 4 Jun 2024 11:44:56 +0000 (14:44 +0300)]
Bug 37023: Update timestamp when filling a hold

This patch updates the timestamp of the hold when it is filled and moved to old_reserves.

Test plan:
1) Apply the patch
2) prove t/db_dependent/Koha/Hold.t

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 37972: (QA follow-up) Add missing filter
Lucas Gass [Mon, 23 Sep 2024 22:11:06 +0000 (22:11 +0000)]
Bug 37972: (QA follow-up) Add missing filter

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 37972: (follow-up) Correct syntax error in opac/opac-user.pl
Paul Derscheid [Mon, 23 Sep 2024 10:14:48 +0000 (10:14 +0000)]
Bug 37972: (follow-up) Correct syntax error in opac/opac-user.pl

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 37972: Allow selection of tab in patron's summary table by query param
Paul Derscheid [Fri, 20 Sep 2024 13:41:26 +0000 (13:41 +0000)]
Bug 37972: Allow selection of tab in patron's summary table by query param

To test:
1) Apply the patch
2) Place a hold on any biblio with the 'koha' patron for example
3) Authenticate in the OPAC with the patron you picked in step 1
4) Open opac-user.pl with the query param 'tab': /cgi-bin/koha/opac-user.pl?tab=opac-user-holds
5) Note that the holds tab in the patron's user summary is automatically selected
6) Sign-off

I'm totally open to renaming the query param, so if you have a suggestion that's more consistent
with the rest of koha, I'm all ears.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36694: Remove HC sticky from js/results-list.js
Victor Grousset/tuxayo [Thu, 18 Jul 2024 00:37:27 +0000 (02:37 +0200)]
Bug 36694: Remove HC sticky from js/results-list.js

It got moved there by bug-36557 after the patches here were written.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36694: (follow-up) Remove some missed instances
Owen Leonard [Thu, 6 Jun 2024 12:13:38 +0000 (12:13 +0000)]
Bug 36694: (follow-up) Remove some missed instances

This patch removes some missed HCSticky code/mentions as well as the
entry on the About page.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36694: (follow-up) Remove Sticky JS from member-flags.tt
Lucas Gass [Mon, 20 May 2024 17:12:27 +0000 (17:12 +0000)]
Bug 36694: (follow-up) Remove Sticky JS from member-flags.tt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36694: (follow-up): fix pages where toolbar was not sticky
Lucas Gass [Tue, 14 May 2024 16:39:36 +0000 (16:39 +0000)]
Bug 36694: (follow-up): fix pages where toolbar was not sticky

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36694: Remove remaining HC stick assets
Lucas Gass [Fri, 26 Apr 2024 17:43:35 +0000 (17:43 +0000)]
Bug 36694: Remove remaining HC stick assets

To test:
1. Apply patch and regenrate CSS
   (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface)
2. You'll need to check that the 'sticky' header still sticks on each of
   these pages.
3. Do a patron search, the toolbar should stick as you scroll down.
4. In Acquisitions, Add a vendor. The toolbar should stick as you scroll
   down.
5. In Acquisitions, Add a basket. The toolbar should stick as you scroll
   down.
6. Search for a system pref, or go directly to the OPAC category (
   http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=opac ).
   The toolbar should stick as you scroll down.
7. Do an authorties search. The toolbar should stick as you scroll down.
8. Go to advanced search. Without doing a search the toolbard should
   stick as you scroll down.
9. Go to item search. Without doing a search the toolbard should stick
   as you scroll down.
10. Do a catlog search. The toolbar should stick as you scroll down.
11. Add a bibliographic record, or edit one. The toolbar should stick
    as you scroll down.
12. Find a patron and go to the permissions page. The toolbar should
    stick as you scroll down.
13. Try each of the other members pages like memberentry.pl,
    moremember.pl, circulation.pl. On each of the pages the toolbar
    should stick.
14. Place multiple holds on a record. From reserve/request.pl the
    toolbar underneath 'Existing holds' should stick.
15. Edit a HTML customization, new item, and page. The toolbar should
    stick.
16. Cataloging >  Automatic item modifications by age > Edit rules. The
    toolbar should stick.
17. Edit a notice, the toolbar should stick.
18. Tools > Log viewer > Submit. UNder Log entries, the toolbar should
    stick.
19. Create some lists and make sure the toolbar sticks.

OPAC:
20. Add many items to an OPAC cart. Make sure the toolbar sticks.
21. Try the OPAC results, the toolbar should stick
22. Add many items to a list, on the OPAC list display the toolbar
    should stick.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36694: Remove HC sticky from OPAC pages
Lucas Gass [Fri, 26 Apr 2024 17:37:52 +0000 (17:37 +0000)]
Bug 36694: Remove HC sticky from OPAC pages

Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36694: Remove HC sticky from remaining staff pages
Lucas Gass [Fri, 26 Apr 2024 17:01:06 +0000 (17:01 +0000)]
Bug 36694: Remove HC sticky from remaining staff pages

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36694: Remove HC sticky from members/ pages
Lucas Gass [Fri, 26 Apr 2024 16:27:59 +0000 (16:27 +0000)]
Bug 36694: Remove HC sticky from members/ pages

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36694: Remove HC stikcy from cataloguing/ pages
Lucas Gass [Fri, 26 Apr 2024 16:18:13 +0000 (16:18 +0000)]
Bug 36694: Remove HC stikcy from cataloguing/ pages

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36694: Remove HC sticky from catalogue/ pages
Lucas Gass [Thu, 25 Apr 2024 19:58:59 +0000 (19:58 +0000)]
Bug 36694: Remove HC sticky from catalogue/ pages

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36694: Remove HC sticky from preferences.tt/authorities.tt
Lucas Gass [Thu, 25 Apr 2024 19:27:24 +0000 (19:27 +0000)]
Bug 36694: Remove HC sticky from preferences.tt/authorities.tt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36694: Remove HC sticky from acqui/supplier.tt
Lucas Gass [Thu, 25 Apr 2024 19:18:36 +0000 (19:18 +0000)]
Bug 36694: Remove HC sticky from acqui/supplier.tt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36694: Set sticky element top to -1px
Lucas Gass [Thu, 25 Apr 2024 16:44:43 +0000 (16:44 +0000)]
Bug 36694: Set sticky element top to -1px

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36694: Add JS observer to detect stuck sticky element
Lucas Gass [Wed, 24 Apr 2024 23:18:15 +0000 (23:18 +0000)]
Bug 36694: Add JS observer to detect stuck sticky element

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36694: Remove HC sticky from acqui/basket.tt
Lucas Gass [Wed, 24 Apr 2024 22:45:50 +0000 (22:45 +0000)]
Bug 36694: Remove HC sticky from acqui/basket.tt

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36694: Remove HC sticky from patron search searchbar
Lucas Gass [Wed, 24 Apr 2024 22:30:33 +0000 (22:30 +0000)]
Bug 36694: Remove HC sticky from patron search searchbar

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36454: (follow-up) Tweak CSS and add restricted status output
Owen Leonard [Tue, 17 Sep 2024 15:40:57 +0000 (15:40 +0000)]
Bug 36454: (follow-up) Tweak CSS and add restricted status output

This patch makes some tweaks to the style of the new information: We can
use the Bootstrap 5 "badge" class and "warning" style to get the
appearance we want.

This patch also adds output of the patron's restricted status if
present.

To test, apply the patch and rebuild the staff interface CSS. Perform a
patron search (from the checkout header search form for instance) and
confirm that a "restricted" badge appears alongside the branch and
expired badge.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 36454: Add 'expired' information on patron auto complete results
Pedro Amorim [Mon, 16 Sep 2024 08:53:33 +0000 (08:53 +0000)]
Bug 36454: Add 'expired' information on patron auto complete results

Test plan:
1) Alter the 'Expiry date' of any patron.
2) Search for that patron on any search input that provides auto
   complete results (e.g. top 'Search patrons' input)
3) Notice the expired patron has a 'expired' indication. Those who
   aren't do not.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 35466: (follow-up) document skip_indexing parameter to bulkmarciport.pl
Thomas Klausner [Sat, 19 Oct 2024 12:32:34 +0000 (12:32 +0000)]
Bug 35466: (follow-up) document skip_indexing parameter to bulkmarciport.pl

Add documentation for the new -si, --skip_indexing parameter

Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 35466: (follow-up) Go to next if error, add to indexing call if not
Nick Clemens [Fri, 23 Aug 2024 13:14:58 +0000 (13:14 +0000)]
Bug 35466: (follow-up) Go to next if error, add to indexing call if not

Before the previous patch we were indexing with every AddAuthority/ModAuthority call and I assumed
we were also indexing during the commity, however, it appears we were not. This patch ensures we push
the record and ids into the arrays for indexing during commit.

Additionally I add a skip to next record on error, to match biblio behaviour.
I also correct a log referring to biblios during authority importing

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
8 days agoBug 35466: Add skip_indexing parameter to bulkmarcimport.pl
Nick Clemens [Mon, 5 Aug 2024 12:48:04 +0000 (12:48 +0000)]
Bug 35466: Add skip_indexing parameter to bulkmarcimport.pl

This patch adds a new optoin to skip indexing to bulkmarcimport.
It also fixes a bug where authorities were being indexed multiple times
during import.

To test:
 1 - Apply patch
 2 - Download the sample files on this bug
 3 - Perform asearch engine search that should retrieve all records( 'a' in Zebra, '*' in ES)
 4 - Note the total (435 in KTD)
 5 - perl misc/migration_tools/bulkmarcimport.pl -b -v --file=bug_35466_b.mrc
 6 - Search again, note increaed by 100
 7 - perl misc/migration_tools/bulkmarcimport.pl -b -v --file=bug_35466_b.mrc --skip_indexing
 8 - Search again, no increase
 9 - perl misc/search_tools/rebuild_elasticsearch.pl -v
10 - Search again, increase, records were added but not initially indexed
11 - Browse to authorities and search as for biblios
12 - perl misc/migration_tools/bulkmarcimport.pl -a -v --file=bug_35466_a.mrc
13 - Search again, note increase
14 - perl misc/migration_tools/bulkmarcimport.pl -a -v --file=bug_35466_a.mrc --skip_indexing
15 - Search again, no increase
16 - perl misc/search_tools/rebuild_elasticsearch.pl -v
17 - Search again, increase, records were added but not initially indexed
18 - Sign off! Hi5!

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37103: (QA follow-up) Added space between Acquisitions and its icon
Laura_Escamilla [Thu, 19 Sep 2024 15:35:29 +0000 (15:35 +0000)]
Bug 37103: (QA follow-up) Added space between Acquisitions and its icon

Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37103: Link log viewer options to corresponding system preference
Owen Leonard [Mon, 17 Jun 2024 15:41:53 +0000 (15:41 +0000)]
Bug 37103: Link log viewer options to corresponding system preference

This patch updates the log viewer interface so that users with the
correct permissions can click a module's "Log not enabled" icon to go
directly to the corresponding system preference for enabling the log.

To test, apply the patch and go to Tools -> Log viewer (must have
"view_system_logs" permission).

- You should see an icon next to each module for which logging is
  disabled. Hovering over the icon should give a tooltip: "Log not
  enabled."
- If you are logged in as a user with "manage_sysprefs" permission,
  clicking the icon should take you directly to the system preference
  for enabling or disabling that module's logs.
- If your user does not have "manage_sysprefs" permission the icon
  should not be a link.

Sponsored-By: Athens County Public Libraries
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 35508: (QA follow-up) Fix qa script issues
Kyle M Hall [Fri, 18 Oct 2024 10:31:32 +0000 (10:31 +0000)]
Bug 35508: (QA follow-up) Fix qa script issues

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 35508: Don't update patron attributes if new list of attributes matches list...
Kyle M Hall [Tue, 28 May 2024 17:26:03 +0000 (13:26 -0400)]
Bug 35508: Don't update patron attributes if new list of attributes matches list of existing attributes

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 35508: Move logic to Koha::Patron::Attribute::store()
Kyle M Hall [Wed, 17 Apr 2024 13:29:29 +0000 (09:29 -0400)]
Bug 35508: Move logic to Koha::Patron::Attribute::store()

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 35508: Update borrowers.updated_on when modifying a patron's attribute
Hammat Wele [Thu, 14 Dec 2023 13:59:42 +0000 (13:59 +0000)]
Bug 35508: Update borrowers.updated_on when modifying a patron's attribute

Currently, if you have patron attributes and modify the values in a patron's account, the patron's updated_on date is not updated. This patch makes the "Updated on" change when a patron attribute is updated.

To test:

1. Create a patron attribute type
   1.1. Go to Administration > Patron attribute types
   1.2. Click New patron attribute
   1.3. Fill out the code and description
   1.4. Click Save

2. Edit a patron (normal)
   2.1. Go to Patrons and find a patron account
   2.2. Click Edit
   2.3. Change a regular field (e.g. Middle name)
   2.4. Click Save

--> Notice the "Updated on" date in the left column has been updated to now

3. Edit a patron attribute
   3.1. In another patron account*, click Edit
   3.2. Change the value of an attribute
   3.3. Click Save

--> Notice the "Updated on" date did not change

4. Apply the patch
   4.1 Repeat step 3.1, 3.2, 3.3

--> Notice the "Updated on" date has now changed

Signed-off-by: Esther <esther@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 38164: Skip fuzzy translations
Tomas Cohen Arazi [Mon, 14 Oct 2024 12:52:14 +0000 (09:52 -0300)]
Bug 38164: Skip fuzzy translations

This patch was envisioned by Julian Maurice.

Test plan:
0. Apply the 1st patch (the revert)
1. Go to `misc/translator/po`
2. es-ES-messages-js.po
3. Mark "Edit" string as fuzzy (around line 48). It should look like:

```
msgid "Edit"
msgstr "Editar"
```

4. Edit ./intranet-main.tt and add the following lines at the bottom,
   inside the `$(document).ready` block:

```javascript
  console.log(_("Edit"));
  console.log(__("Edit"));
```

5. Install the templates
  k$ koha-translate --install es-ES --dev kohadev && restart_all
6. Enable *es-ES* by searching for `language` in the sysprefs and switch
   to it for the staff interface.
7. Go to the Koha home page, open the browser console
=> FAIL: Notice that the second log in the console is displaying the
fuzzy string (i.e. is being translated when it shouldn't)
8. Apply this patch
9. Re-install the translated templates:
  k$ koha-translate --update es-ES --dev kohadev && restart_all
10. Repeat 7
=> SUCCESS: With this patch applied both logs show the English version of the
string.
11. Remove the fuzzy flag on `es-ES-messages-js.po`
12. Repeat 9 and 10
=> SUCCESS: The results are similar to step 7, but in this case they are
expected as the string is not marked fuzzy.
13. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 38164: Revert "Bug 37303: Replace po2json with a JS version"
Tomas Cohen Arazi [Mon, 14 Oct 2024 12:50:23 +0000 (09:50 -0300)]
Bug 38164: Revert "Bug 37303: Replace po2json with a JS version"

This reverts commit 4eb981635453871fa2a33396391f3f75a6baa8b1.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37403: Wrong progress quantity in job details
Hinemoea Viault [Wed, 24 Jul 2024 16:35:28 +0000 (12:35 -0400)]
Bug 37403: Wrong progress quantity in job details

In fact the system adds a previous value to the progress. As if the system keeps a previous value and adds the correct count of records in addition.
This patch removes the previously stored value.

To test:
1. Go to Cataloging > Stage records for import
2. Choose a file with bibliographic records and click Upload file
3. In "Look for existing records in catalog?" choose a record matching rule (e.g. ISBN)
4. Click Stage for import
5. Click View detail of the enqueued job
   --> Progress show 2/1
6. Apply the patch
7. Repeat steps 1 to 4
8. Click View detail of the enqueued job
   --> Progress show 1/1

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
qa script:
Commit title does not start with 'Bug XXXXX: ' - d1bebb34d7

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Fixed patch subject line
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37304: Fix created by filter in Acquisitions advanced search
Brendan Lawlor [Mon, 22 Jul 2024 20:07:18 +0000 (20:07 +0000)]
Bug 37304: Fix created by filter in Acquisitions advanced search

This patch updates the field for the created by filter from
ui.item.borrowernumber to ui.item.patron_id

Test plan:
1. Add a vendor and a basket
2. Use advanced order search to search for created by 'koha'
3. Use the autofill dropdown to make the selection and click 'Search'
4. Your search returned no results.
5. Apply patch and repeat steps 2 and 3
6. Confirm the search returns the basket you created earlier

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37836: Prevent submitting empty barcodes in Self check-in
Bo Gustavsson [Wed, 4 Sep 2024 19:49:47 +0000 (21:49 +0200)]
Bug 37836: Prevent submitting empty barcodes in Self check-in

This patch disbles the "Submit" button when the barcode field is empty.

To test this patch:

Add the patch to your koha clone
Enable the "SelfCheckInModule".
Open the page and the "Submit" button should be disabled when the barcode field is empty.

Signed-off-by: Sam Sowanick <sam.sowanick@corvallisoregon.gov>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37070: (QA follow-up) Fix qa script issues
Kyle M Hall [Fri, 4 Oct 2024 17:00:26 +0000 (13:00 -0400)]
Bug 37070: (QA follow-up) Fix qa script issues

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37070: Incorrect barcode generation when adding orders to basket
Hammat Wele [Tue, 11 Jun 2024 14:08:45 +0000 (14:08 +0000)]
Bug 37070: Incorrect barcode generation when adding orders to basket

When the autoBarcode preference is set to « generated in the form 1, 2, 3 » and the maximum barcode is length 16 (ex 1000000000000000),
when adding orders to the basket,the numbers generated are in the hexadecimal form.

to reproduce:

1- Set the system preference autoBarcode to « generated in the form 1, 2, 3 »
2- Search for a biblio record
3- In the record details, click on New -> New item
4- fill the Barcode field to a number with length 16 (1000000000000000) and add the item
5- Create a suggestion
    5-1- Go to Acquisitions and click on suggestions
    5-2- Create a suggestion and accept it
6- Add a new order to a basket
    6-1- Go to Acquisitions and find a vendor
    6-2- Create a new Basket
    6-3- on the Basket click on 'Add to basket' and select 'From a suggestion'
    6-4- Add the order created on 5-2- to the basket
    6-5- On the item form click on Add item
    6-6- Select a Fund and save the order
7- In the orders table click on the record and check the item Barcode
    ---> the Barcode is in hexadecimal form
8- Cancel order and delete the catalog record
9- Apply the patch
10- Repeat step 6-4, 6-5, 6-6
11- Check the item Barcode
    ---> the Barcode is not in hexadecimal form
12- run prove t/db_dependent/Barcodes.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37606: Fix framework export module to escape double quotes
Baptiste Wojtkowski [Fri, 9 Aug 2024 14:33:37 +0000 (16:33 +0200)]
Bug 37606: Fix framework export module to escape double quotes

When exporting a framework as csv, the exporter does not check the presence of double quote in the fields. Hence, if there is one double quote, the csv is broken.

TEST PLAN:
1 - Change a framework to add a field containing double quote in name
2 - Export it in csv
3 - Create a new framework
4 - Import the csv in the new framework -> every fields after the one
containing double quotes should be broke. Every other fields should have
no subfield
5 - APPLY PATCH
6 - Repeat 2-5 -> everything should be correctly exported

Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 38012: Remove ispermanent from returns and branchtransfers
Andrew Fuerste Henry [Fri, 4 Oct 2024 15:11:49 +0000 (15:11 +0000)]
Bug 38012: Remove ispermanent from returns and branchtransfers

To test:
There should be no change in behavior, as this code is not referred to elsewhere in Koha. Make sure you can still do checkeckins and transfers.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37977: Fix some issues with labels in inventory form
Phil Ringnalda [Fri, 20 Sep 2024 21:43:35 +0000 (14:43 -0700)]
Bug 37977: Fix some issues with labels in inventory form

The inventory form has several issues with labels with a for attribute that
doesn't match the id of the input, so the label doesn't actually get linked
to anything.

Test plan:
 1. Without the patch, go to Cataloging - Inventory
 2. In the section for "Item location filters" click the label for "Shelving
    location (items.location) is", which will focus the select menu, then
    press the down arrow on the keyboard to see that it's focused by opening
    the select menu.
 3. Click in a blank spot to close the select menu, then click the label for
    "Collection" and press the down arrow key, which will scroll the page
    since the label didn't focus the menu, and repeat with "Call number
    classification scheme" which also will scroll the page when you press
    down arrow.
 4. In the section for "Optional filters for inventory list or comparing
    barcodes" click any of the labels below items.notforloan - clicking a
    checkbox label should toggle whether the checkbox is checked, but it
    will not
 5. Apply patch, refresh page
 6. Repeat steps 3 and 4, but this time you will get the proper behavior,
    focusing the select menus and toggling the checkboxes

Sponsored-by: Chetco Community Public Library
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37905: Fix parameter name
Jonathan Druart [Wed, 4 Sep 2024 12:24:45 +0000 (14:24 +0200)]
Bug 37905: Fix parameter name

It's named enqueued_date on the API side, not enqueued_on (which is the DB
column's name)

No behaviour change expected here.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37905: Use correct RFC3339 formatted date to the server
Jonathan Druart [Wed, 4 Sep 2024 12:20:33 +0000 (14:20 +0200)]
Bug 37905: Use correct RFC3339 formatted date to the server

This patch suggests to revert the previous attempt to fix this problem.
The date was using the client-side's tz and so the "last hour" was not
matching the one from the server.

With bug 37831 with simply need to pass a rfc3339-formatted date and the
filtering will be done as expected.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoRevert "Bug 36217: Fix background jobs page's include_last_hour filter"
Jonathan Druart [Thu, 12 Sep 2024 12:27:02 +0000 (14:27 +0200)]
Revert "Bug 36217: Fix background jobs page's include_last_hour filter"

This reverts commit f5c839348091d129bb7100af2c9e64e486d0ea1d.

https://bugs.koha-community.org/show_bug.cgi?id=37905
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37902: (QA follow-up) Tidy Query.pm & Object.t
Kyle M Hall [Fri, 27 Sep 2024 13:23:21 +0000 (13:23 +0000)]
Bug 37902: (QA follow-up) Tidy Query.pm & Object.t

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37902: Apply exact match for datetime
Jonathan Druart [Wed, 18 Sep 2024 07:49:50 +0000 (09:49 +0200)]
Bug 37902: Apply exact match for datetime

We do not want to apply "like" and do a "contains" search if a correctly
formatted date is passed (ie. starting with "YYYY-MM-DD HH:MM:SS")

It causes underlying problems if we add '%' characters to this string as
it will then become an invalid date.

There are several ways of dealing with this problem. This patch is
suggesting the easiest path: Apply an exact search (ie. do not add '%')
if the value appears to be a datetime.

Certainly not the best looking patch but it seems to be quite effective:
  * no need to change the client
  * no need to rework build_query_params, merge_q_params, attributes_from_api

We could (to confirm) pass the result set, but it seems a lot of additional processing
(that is done later already, in attributes_from_api)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37902: Add tests
Jonathan Druart [Thu, 12 Sep 2024 10:01:58 +0000 (12:01 +0200)]
Bug 37902: Add tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37902: Do not convert a date if it has like markers
Jonathan Druart [Mon, 16 Sep 2024 08:43:13 +0000 (10:43 +0200)]
Bug 37902: Do not convert a date if it has like markers

If we pass a datetime parameter we are adding "like" operator and % at
the beginning and ending of the attribute value.
For instance:
  attributes=2024-09-16 10:11:12
  attributes:{ like => '%2024-09-16 10:11:12%' }

We do not want to reach the fixup code and raise an exception.

However I don't think we should add the like for datetime attributes
actually. But can we modify this behaviour now?

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37902: Adjust timezone
Jonathan Druart [Thu, 12 Sep 2024 14:06:36 +0000 (16:06 +0200)]
Bug 37902: Adjust timezone

We didn't take into account the server's timezone.

This does not feel right, we are not supposed to deal with time zone
outside of Koha::DateUtils.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37902: TODOs
Jonathan Druart [Thu, 12 Sep 2024 10:35:33 +0000 (12:35 +0200)]
Bug 37902: TODOs

There are still different structures we won't handle properly.
This patch adds conditionals to prevent failures or warnings.

Should be done, but later.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37902: Make sure we loop over if a structure is passed
Jonathan Druart [Thu, 12 Sep 2024 09:19:36 +0000 (11:19 +0200)]
Bug 37902: Make sure we loop over if a structure is passed

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37902: Make sure filtered_params are converted
Jonathan Druart [Thu, 12 Sep 2024 08:41:18 +0000 (10:41 +0200)]
Bug 37902: Make sure filtered_params are converted

Previously we only adjusted the attributes that were passed directly,
not the ones in 'q' (which is the recommended way now)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37728: Adjust test to catch more missing 'op' in POSTed forms
Jonathan Druart [Mon, 26 Aug 2024 09:03:05 +0000 (11:03 +0200)]
Bug 37728: Adjust test to catch more missing 'op' in POSTed forms

The test is not catching missing op in forms that are not the first POST
form of the template.

Found when fixing the test for bug 37309. It was not catching the
missing op in the second form.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37728: (follow-up) Tell the test that opac-illrequests.tt has an op
Phil Ringnalda [Tue, 24 Sep 2024 02:40:32 +0000 (19:40 -0700)]
Bug 37728: (follow-up) Tell the test that opac-illrequests.tt has an op

xt/find-missing-op-in-forms.t wants to see name="op" value="cud-..." in any
form with method="post", but opac-illrequests.tt inserts its op input by
passing around whole and unpack and repacking whole.keys which includes
the op. We just need to tell the test that it really exists.

At first, I thought of this approach as a joke, faking out the test, but
when I tried to be more responsible and put a whole <input type="hidden" etc.
in the comment, I realized that would be more likely to confuse someone
who thought that was uncommented and that they were making real changes than
it would be to future-proof against changes in the test's approach.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37786: members/cancel-charge.pl needs CSRF protection
Phil Ringnalda [Fri, 6 Sep 2024 21:33:17 +0000 (14:33 -0700)]
Bug 37786: members/cancel-charge.pl needs CSRF protection

members/cancel-charge.pl will take either a POST or a GET, and as long as the
accountline_id it is passed can be cancelled, will cancel it. That means any
link you click anywhere while logged in to Koha might cancel a charge. It also
takes a borrowernumber which isn't used for the cancelling, only to determine
what account to show after a charge is cancelled, letting a malicious link
show an account other than the one whose charge was just cancelled.

Test plan:
 1. Without the patch, Circulation - Checkout - search for the 'koha' patron
    you log in as
 2. Accounting - Create manual invoice - Make it a Manual fee of 100.00 and
    Save
 3. Pretending it's a well-disguised link in a spear-phishing email, load
    http://localhost:8081/cgi-bin/koha/members/cancel-charge.pl?borrowernumber=5&accountlines_id=1
 4. You are now looking at charges for the patron Acosta, Edna rather than for
    the patron koha, but if you look at the patron koha, its 100.00 charge
    has been cancelled.
 5. Apply patch and reset_all (or if you don't, you'll have to manually adjust
    the link to reflect the charge being accountlines_id 3 rather than 1)
 6. Circulation - Checkout - search for the 'koha' patron you log in as
 7. Accounting - Create manual invoice - Make it a Manual fee of 100.00 and
    Save
 8. Click the link http://localhost:8081/cgi-bin/koha/members/cancel-charge.pl?borrowernumber=5&accountlines_id=1
 9. You got a 403 because you didn't pass the op cud-cancel, but if you did
    pass that op, you would also get a 403 for having a cud- op in a GET (and
    if you POST, you won't have a csrf_token)
10. Checkout - search for koha - Accounting - Cancel charge
11. Having done it the right way, you're now on koha's list of transactions,
    where you can see you just cancelled it

Sponsored-by: Chetco Community Public Library
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 38190: Remove JS error on suggestion page
Jonathan Druart [Thu, 17 Oct 2024 09:11:26 +0000 (11:11 +0200)]
Bug 38190: Remove JS error on suggestion page

This code could appear several time as we include it in modals

Test plan:
Go on http://localhost:8081/cgi-bin/koha/suggestion/suggestion.pl
Open the console
Notice that without this patch you see a JS error
  Uncaught SyntaxError: redeclaration of const av_bsort1
With this patch applied the error is gone.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37528: (QA follow-up) Slight rephrase of system preference and warning message
Katrin Fischer [Fri, 18 Oct 2024 11:41:01 +0000 (11:41 +0000)]
Bug 37528: (QA follow-up) Slight rephrase of system preference and warning message

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37892: (QA follow-up) Fix condition in memberentry
Marcel de Rooy [Fri, 20 Sep 2024 09:07:42 +0000 (09:07 +0000)]
Bug 37892: (QA follow-up) Fix condition in memberentry

Patron may be undefined. So the test may crash.
Also there is an issue with operator precedence.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
11 days agoBug 37892: (QA follow-up) Add tests for ->is_guarantor/ee
Marcel de Rooy [Fri, 20 Sep 2024 08:44:30 +0000 (08:44 +0000)]
Bug 37892: (QA follow-up) Add tests for ->is_guarantor/ee

Test plan:
Run t/db_dependent/Koha/Patron.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>