]> git.koha-community.org Git - koha.git/log
koha.git
6 days agoBug 37522: Logging item modification should record the original version of the item
Janusz Kaczmarek [Tue, 30 Jul 2024 11:03:54 +0000 (11:03 +0000)]
Bug 37522: Logging item modification should record the original version of the item

When modifying bibliographic record, Koha records in the log the
original version of the record.  This allows one to see what has been
changed in the record.

However, in case of item modification Koha records in the log the the
current version of the item (i.e. the version after the edit).  This is
inconsistent with the biblio modification behavior and makes it
difficult or even impossible to trace changes (especially in case of the
first modif since the initial version is not being recorded).

This patch makes the item modification logging feature work similarly to
logging modifications in bibliographic records.

Test plan:
==========
1. With CataloguingLog enabled (default in ktd) make a modification of
   an item.
2. Check the Modification log.  You should see as the recorded version
   the version of the item after the modification.
3. Apply the patch; restart_all.
4. Repeat p. 1.
5. In the Modification log you should see now the version of the item
   that existed before the recent modification.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 38125: Add a warning if privacy pulldown is changed to "never"
Kyle M Hall [Tue, 8 Oct 2024 17:39:31 +0000 (13:39 -0400)]
Bug 38125: Add a warning if privacy pulldown is changed to "never"

It is possible to interpret the language on opac-privacy.pl as only
acting on future checkins and not current historical checkouts. We
should add clarifying text to that page

Test plan:
1) Apply this patch
2) Enable opac privacy
3) Change pulldown to "never"
4) Note the warning message appears

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 37988: Use Bootstrap 5 class .visually-hidden-focusable
Owen Leonard [Tue, 24 Sep 2024 13:49:17 +0000 (13:49 +0000)]
Bug 37988: Use Bootstrap 5 class .visually-hidden-focusable

It looks to me like we can remove the visibility properties from the
home button CSS and wrap the text in a <span> with Bootstrap 5's
"visually-hidden-focusable" class:

https://getbootstrap.com/docs/5.3/getting-started/accessibility/#visually-hidden-content

That appears to give us the behavior we want: A focusable icon which
isn't obscured by the focus border.

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

In the staff interface, test some pages by using tab or shift-tab to
move between elements on the page to confirm that the home icon can be
tabbed to.

Signed-off-by: Olivier Vezina <olivier.vezina@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 37662: Improve library information text consistency
David Nind [Fri, 16 Aug 2024 22:05:49 +0000 (22:05 +0000)]
Bug 37662: Improve library information text consistency

This improves the consistency of the text between the staff
interface library information listing page, and the add,
view, and modify library pages. It also improves the text
for some field hints.

Test plan:
1. Go to Koha administration > Basic parameters > Libraries.
2. Note these inconsistencies:
   2.1 Library hours - the text if no hours are set:
       - For the table, the text is "Library hours not set"
       - For the view, add, and modify library pages the text
         is "No opening hours have been set."
   2.2 The column and field names for library hours:
       - For the table, the column name in the list of libraries
         is "Library hours".
       - For the view, add, and modify library pages the field
         label is "Opening hours".
   2.3 For the "MARC organization code" field, there is no
       colon (:) on the view, add, and modify library pages.
   2.4 For the "OPAC info" field name, "info" is not spelt
       in full.
   2.5 The hints for the Reply-To and Return-Path fields use
       this format "Default: <SystemPreferenceName> system
       preference" pattern, but the MARC organization code
       field doesn't.
3. Leave tabs open for the library listing, view, and modify
   library pages.
4. Apply the patch, then duplicate and refresh the tabs for
   the library listing, view, and modify library pages (so
   you can compare the differences).
5. Note that the inconsistencies in step 2 are now fixed.
6. Note that the hint text for these fields is changed:
   6.1 IP field: active voice
   6.2 MARC organization code: follows the pattern used for
       the Reply-To and Return-Path fields.
   6.3 Public: 'yes' to 'Yes'
7. Sign off D:

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Olivier Vezina <olivier.vezina@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 33178: (QA follow-up) Reformat js changes
Paul Derscheid [Mon, 28 Oct 2024 14:39:23 +0000 (14:39 +0000)]
Bug 33178: (QA follow-up) Reformat js changes

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 33178: Use template wrapper for authority and bibliographic subfield entry form...
Owen Leonard [Thu, 6 Jun 2024 15:10:21 +0000 (15:10 +0000)]
Bug 33178: Use template wrapper for authority and bibliographic subfield entry form tabs

This patch updates the authority and bibliographic subfield entry
forms to replace tab markup with the use of WRAPPERs. Some JS has been
modified in order to adapt to the changed Bootstrap tab markup.

The patch also updates the WRAPPER code so that a unique ID can be
added to individual tabs. This is necessary as a hook for the Sortable
JavaScript.

To test, apply the patch and go to Administration.

- Go to MARC bibliographic frameworks -> Actions -> MARC structure.
  - Click Actions -> View subfields for a tag with more than one
    subfield.
    - Click the "Edit" button for one of the subfields, not the first
      one in the list.
      - The tab for the subfield you chose should be active.
      - Confirm that all the tabs look correct and work correctly.
      - Try dragging one of the tabs into a new position. Save your
        changes and confirm that the subfield was saved in that new
        position.
- Go to Administration -> Authority types -> Actions -> MARC structure
  and repeat the same steps above with the authority record subfields.

Sponsored-By: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 38243: Remove options.query_parameters
Jonathan Druart [Wed, 23 Oct 2024 14:51:00 +0000 (16:51 +0200)]
Bug 38243: Remove options.query_parameters

This is never passed: `git grep query_parameters`

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 38243: Remove DT's header_filter custom param
Jonathan Druart [Wed, 23 Oct 2024 14:49:27 +0000 (16:49 +0200)]
Bug 38243: Remove DT's header_filter custom param

It seems to be a leftover from bug 32401, the code does not make sense:

 569                 if(options.header_filter) {
 570                     options.query_parameters = query_parameters;
 571                 } else {
 572                     dataSet.q = query_parameters;
 573                     delete options.query_parameters;
 574                 }

Then options.query_parameters is never used.

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 38234: Remove unused jszip.min.js file
Jonathan Druart [Wed, 23 Oct 2024 10:12:13 +0000 (12:12 +0200)]
Bug 38234: Remove unused jszip.min.js file

This specific file is not used since Bug 23013 ("Upgrade DataTables in the staff client")

This version is vulnerable and should not be used in the future anyway.

There is a version embedded in our DataTables bundle, which is jszip-3.10.1.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 38120: Also remove 'Remember me' - who wants to remember?
Jonathan Druart [Tue, 8 Oct 2024 13:16:44 +0000 (15:16 +0200)]
Bug 38120: Also remove 'Remember me' - who wants to remember?

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 38120: Remove commented lines in auth.tt
Jonathan Druart [Tue, 8 Oct 2024 13:14:14 +0000 (15:14 +0200)]
Bug 38120: Remove commented lines in auth.tt

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 38131: ILS-DI doc must show renewals_count
Fridolin Somers [Wed, 9 Oct 2024 12:35:11 +0000 (14:35 +0200)]
Bug 38131: ILS-DI doc must show renewals_count

Since Bug 30275 renamed issues.renewals to issues.renewals_count, the ILS-DI doc needs to be updated in :
koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt
Note that service 'RenewLoan' returns 'renewals' this has not changed.

Test plan :
1) Enable ILS-DI webservice
2) Go to opac : /cgi-bin/koha/ilsdi.pl
3) Click on 'GetRecords'
4) Check you see 'renewals_count' in 'Example response'
5) Click on 'GetPatronInfo'
6) Check you see 'renewals_count' in 'Example response'

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 37639: (follow-up) Remove redundant mappings from Koha::Item::to_api_mapping()
Tomas Cohen Arazi [Tue, 29 Oct 2024 11:09:58 +0000 (08:09 -0300)]
Bug 37639: (follow-up) Remove redundant mappings from Koha::Item::to_api_mapping()

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 37639: Add items.stack to items endpoint
Lucas Gass [Tue, 13 Aug 2024 21:01:51 +0000 (21:01 +0000)]
Bug 37639: Add items.stack to items endpoint

To test:
1. Apply patch and restart_all, and yarn api:bundle
2. Check the items endpoint for items.stack ( http://localhost:8081/api/v1/items/144 )
3. The data is there, and correct.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 38233: Add regression tests
Pedro Amorim [Tue, 29 Oct 2024 10:20:04 +0000 (10:20 +0000)]
Bug 38233: Add regression tests

prove t/db_dependent/ILSDI_Services.t

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 38233: respect OPAC visibility for ILS-DI GetRecords
David Cook [Tue, 22 Oct 2024 23:57:57 +0000 (23:57 +0000)]
Bug 38233: respect OPAC visibility for ILS-DI GetRecords

This change makes the ILS-DI GetRecords service use the OPAC
version of the MARCXML and filters items based on their OPAC visibility

Test plan:
1. Apply the patch
2. koha-plack --restart kohadev
3. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ILS-DI
and enable syspref
4. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OpacHiddenItems
and add the following:
withdrawn: [1]
5. Go to http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=hidelostitems
Change syspref to "Don't show"
6. Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=29
7. Add a withdrawn item and a lost item with barcodes of "test1" and "test2" respectively
8. Go to http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=29
9. Note the items with barcodes test1 and test2 do not appear in the "items" tree and they don't
appear in the "marcxml" tree.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 38231: Adjust CSS for search result controls in the OPAC
Owen Leonard [Tue, 22 Oct 2024 17:16:07 +0000 (17:16 +0000)]
Bug 38231: Adjust CSS for search result controls in the OPAC

This patch makes some markup and CSS changes to the OPAC so that
controls are aligned correctly in the "mobile" view's catalog search
results. The patch also removes the border from the controls... I think
the borders looks out of place.

To test apply the patch and rebuild the OPAC CSS.

- Perform a catalog search.
- Check the styling of the controls shown for each search result, e.g.
  Place hold, Add tg, Save to lists, etc.
  - Make sure the controls work well when the browser window is various
    widths, from ~600px and up.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Yanjun Li <yanjun.li@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 38273: Make sure same object is returned
Tomas Cohen Arazi [Mon, 28 Oct 2024 12:13:29 +0000 (09:13 -0300)]
Bug 38273: Make sure same object is returned

This patch adds a test to make sure the same object is returned. A code
change is also added to make sure the tests pass.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 38273: Make Koha::Object->discard_changes chainable
Jonathan Druart [Mon, 28 Oct 2024 10:49:13 +0000 (11:49 +0100)]
Bug 38273: Make Koha::Object->discard_changes chainable

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 37184: Special character encoding problem when importing MARC file from the Acqui...
Hammat Wele [Mon, 26 Aug 2024 21:21:50 +0000 (21:21 +0000)]
Bug 37184: Special character encoding problem when importing MARC file from the Acquisitions module

1. Go to Cataloging > "Stage records for import".
2. Upload the file "ExportMemento2024061010532869Marc8.mrc" or a MARC8 encoded file.
3. In the form, select the options :
   - Record type: Bibliographic
   - Character encoding: MARC8
   - Format: MARC
4. Click "Stage for import".
5. Find or create an open basket in the Acquisitions module.
6. Click "add to basket".
7. Select "From a staged file" and select the previous staged file.
9. Click "Select all" to check all records.
10. In the item information tab, choose the Document type.
11. Verify the titles of the records in the basket:
 --> Koha replaces accents with symbols �

12. Apply the patch.
13. Do the same from step 1 and notice there is no more encoding issues.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 30648: deleted_biblio_id can be null
Jonathan Druart [Tue, 29 Oct 2024 10:34:14 +0000 (11:34 +0100)]
Bug 30648: deleted_biblio_id can be null

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 33484: checkouts - Move visibility handling to table_settings
Jonathan Druart [Tue, 29 Oct 2024 09:42:22 +0000 (10:42 +0100)]
Bug 33484: checkouts - Move visibility handling to table_settings

We need to set is_hidden for the column we want to force hide (depending
on system config)

This patch fixes t/db_dependent/selenium/regressions.t

Obviously there will be incorrect behaviours if we restore from a state
and that the settings have been modified in the meanwhile.
Not sure we can deal with that properly.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
6 days agoBug 33484: Remove state settings from column level
Jonathan Druart [Tue, 29 Oct 2024 09:14:02 +0000 (10:14 +0100)]
Bug 33484: Remove state settings from column level

default_save_state and default_save_state_search were added at the
column level, it's not needed.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 35659: (QA follow-up) Fix t/db_dependent/Koha/OAIHarvester.t
David Cook [Tue, 29 Oct 2024 00:43:32 +0000 (00:43 +0000)]
Bug 35659: (QA follow-up) Fix t/db_dependent/Koha/OAIHarvester.t

Previously, this test just checked the last 1 day of bib activity,
but on a fresh test system there will be no activity, so it will always
fail.

Instead, let's just check that a number is returned for the total,
even if that total number is 0, since 0 is a valid response too.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 35659: (QA follow-up) fix t/db_dependent/TestBuilder.t
David Cook [Tue, 29 Oct 2024 00:35:45 +0000 (00:35 +0000)]
Bug 35659: (QA follow-up) fix t/db_dependent/TestBuilder.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 38013: Add classes to messages in returns.tt
Andrew Fuerste Henry [Fri, 27 Sep 2024 14:08:14 +0000 (14:08 +0000)]
Bug 38013: Add classes to messages in returns.tt

To test:
1 - enable FineNotifyAtCheckin
2 - enable AllowCheckoutNotes
3 - check out an item to a patron with fines on their account
4 - check out an item and place a checkout note on it
5 - check each item in, confirm each produces a message with the classes alert, alert-info, and alert-warning
6 - apply patch, restart_all
7 - repeat steps 3 and 4
8 - check items in, confirm messages now include issue-note and patron-fines classes

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 38041: Pass hide_main for all needsconfirm warnings in SCO
Lucas Gass [Mon, 30 Sep 2024 19:54:30 +0000 (19:54 +0000)]
Bug 38041: Pass hide_main for all needsconfirm warnings in SCO

To test:
1. APPLY PATCH and restart_all
2. Make sure the following errors when issuing in SCO show just the error, no other info. on screen:
DEBT
RENEW_ISSUE
ISSUED_TO_ANOTHER
RESERVED
TRANSFERRED
INVALID_DATE ( cant test in SCO )
TOO_MANY
RECALLED

Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 38128: (Bug 35329 follow-up) Filter ERM users to users with erm permission
Jonathan Druart [Wed, 9 Oct 2024 07:29:47 +0000 (09:29 +0200)]
Bug 38128: (Bug 35329 follow-up) Filter ERM users to users with erm permission

There was a silly mistake, we passed the TT var erm_users instead of the
string "erm_users".
It should also be passed to patron_search_modal to display the note.

Test plan:
Confirm that with this patch a patron search in the ERM module returns
only patrons with the erm permission.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 37980: Style corrections for installer and onboarding following Bootstrap 5 update
Owen Leonard [Mon, 7 Oct 2024 17:56:45 +0000 (17:56 +0000)]
Bug 37980: Style corrections for installer and onboarding following Bootstrap 5 update

This patch makes a couple of CSS updates to the installer and and
onboarding pages:

1. Add more Bootstrap imports to the installer SCSS. I included a
   pared-down selection of components to save file size. I should have
   included more.
2. Add a temporary fix for the fact that the Font Awesome checkbox icons
   aren't working correctly. According to the docs the "empty check box"
   icons should look like a square border, not a solid square. They
   don't, and I've included a temporary fix for it.

To test apply the patch and rebuild the staff interface CSS.

- Drop and recreate the Koha database. Run 'restart_all' if necessary.
- Navigate to the staff interface. You should be presented with the
  installer login. The form should be centered on the page.
- Log in. In the list of steps displayed on the "Choose your language"
  page you should see square icons resembling empty checkboxes (not
  solid black squares).
- Select your language and proceed to the next step. The "Choose your
  language" line should now have a green icon of a checked checkbox.
- Follow the rest of the installer and onboarding steps to confirm that
  there aren't other unreported style issues.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 38138: (bug 33398 follow-up) Don't display code for primary contact method
Jonathan Druart [Wed, 16 Oct 2024 08:28:47 +0000 (10:28 +0200)]
Bug 38138: (bug 33398 follow-up) Don't display code for primary contact method

We have several choices for "primary_contact_method", we don't want to
display the code but the label
phone => Primary phone
phonepro => Secondary phone
mobile => Other phone
email => Primary email
emailpro => Secondary email
fax => Fax

Bonus: it will make it translatable.

Test plan:
1. Edit a patron record to add a Main contact method
2. Place a hold for this patron
3. Check the item in
   --> Pop up says "Main contact method:" followed by the choice.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 38188: fix populating the borrowenumberlist from patron_search_selections
Johanna Räisä [Thu, 17 Oct 2024 06:15:32 +0000 (09:15 +0300)]
Bug 38188: fix populating the borrowenumberlist from patron_search_selections

This patch fixes the issue of populating the borrowernumberlist from patron_search_selections.
Adding borrowernumbers to the textarea randomly fails because the textarea is populated with the html() function.

To test:
1) Go to the patron search
2) Select a few patrons
3) Click on the "Batch patron modification" button
4) Use browsers back button to go back to the patron search
5) Find patron_batchmod_form from browser inspector, open it.
6) Check that between the <textarea> tags, there are the borrowernumbers of the selected patrons.
7) Apply the patch
8) Repeat steps 1-6
9) Check that <textarea> tags are not populated with the borrowernumbers of the selected patrons.
10) Remove the display:none from the textarea and check that the borrowernumbers are populated there.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Michelle Spinney <mspinney@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 36320: Clicking Edit items from catalogue/detail.pl leads to 'Add item' screen
Owen Leonard [Wed, 16 Oct 2024 17:24:55 +0000 (17:24 +0000)]
Bug 36320: Clicking Edit items from catalogue/detail.pl leads to 'Add item' screen

This patch updates the catalog toolbar so that the "Edit items"
choice under the "Edit" menu is replaced with a new option: "Manage
items," which takes you to the top of the add/edit items page. The "New
item" menu item has been modified to add the anchor so that the link
jumps the user directly to add item form (past the existing items).

The patch also adds a "Jump to add item form" link at the top of the
add/edit items page.

To test, apply the patch and search for a bibliographic record in the
staff interface.

- View the detail page for the record.
- Click the "Edit" menu button in the toolbar.
- You should see the new menu item, "Manage items."
- Clicking the "Manage items" button should take you to the top
  of the add/edit items page in cataloging.
  - You should see a "Jump to add item form" limk under the page
    heading.
  - Clicking it should jump you to the "Add item" form.
- Clicking the "New item" menu item from the bibliographic detail "New"
  menu should take you directly to the add item form, scrolling down
  past the existing items.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 38066: Pop-up window footers can block page content
Owen Leonard [Mon, 21 Oct 2024 18:19:07 +0000 (18:19 +0000)]
Bug 38066: Pop-up window footers can block page content

The staff interface's default <body> padding is enough to accommmodate
the langugage-selection footer but not the taller fixed footer on pop-up
window pages. This patch adds some CSS to increase the padding on those
pages to prevent page content from being obscured by the footer
navigation.

The patch also adjusts the CSS of the "Back to top" arrow so that it
isn't hidden by fixed footer.

To test, apply the patch and rebuild the staff interface CSS.

- In the staff client, go to Cataloging -> New record.
- In tab one, click the plugin button on tag 100 subfield a.
- Perform an authority search which will return results.
- Scroll down to the bottom of the window and confirm that the last
  lines of the search results are not obscured by the footer.

This change should apply to all pop-up windows which include the same
fixed footer markup, e.g. any cataloging plugin; the transfer order
window; vendor search when adding a subscription, etc.

Sponsored-by: Athens County Public Libraries
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>
7 days agoBug 37582: Tidy write_msg
Kyle M Hall [Tue, 17 Sep 2024 18:52:22 +0000 (14:52 -0400)]
Bug 37582: Tidy write_msg

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 37582: Add ability to for SIP to convert control and separator characters to...
Kyle M Hall [Tue, 17 Sep 2024 18:28:11 +0000 (18:28 +0000)]
Bug 37582: Add ability to for SIP to convert control and separator characters to spaces

This came up with a SIP vendor recently - when reading responses they were only getting part of a patron's information.
It seemed to have been caused by patrons with multiple restrictions and a new line in the response

This patch also does minor refactoring to write_msg to pass the server variable that contains
all the previously passed parameters, and removes the never used "file" parameter.

Test Plan:
1) Add multiple debarments to a patron
2) Run a sip patron information response, note the presence of newlines
3) Apply this patch
4) Add the new option convert_control_characters to your SIP account,
   set the value to " -- "
5) Restart all the things!
7) Run a sip patron information response, note the newlines have been replaced!

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 38246: Perltidy
Emily Lamancusa [Wed, 23 Oct 2024 19:59:39 +0000 (15:59 -0400)]
Bug 38246: Perltidy

QA tool failed because the previous patch added one line to a large
block of code that was incorrectly indented. Fixed the indentation
separately on this patch.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 38246: Only check unresolved claims
Emily Lamancusa [Wed, 23 Oct 2024 19:33:51 +0000 (15:33 -0400)]
Bug 38246: Only check unresolved claims

To test:
1. Set up sysprefs:
   - Set any non-empty value for ClaimReturnedLostValue
   - Set AutoClaimReturnStatusOnCheckout to "found in library"
   - Set AutoClaimReturnStatusOnCheckin to "returned by patron"
2. Check out an item to a patron
3. On the patron's account page, click the "Claim Return" button next to
   that checkout
4. Check the item in. Note the message that the claim was auto-resolved.
5. Return to the patron's account page and open the Claims Returned tab
--> Note that the claim is resolved and hidden
6. Click the "Show all 1 claims" link to view the hidden claim. Make a
   note of the resolution code and timestamp.
7. Check the item out again
--> Note the message saying that the claim was resolved, even though it
    was already resolved previously
8. View the return claim again
--> Note that the timestamp and resolution code have changed
9. Apply patch and restart_all
10. Repeat steps 2-8 with a new item
--> Note you do not get a claim resolved message on checkout this time
--> Note that the timestamp and resolution code remain the same before
    and after the checkout

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 30648: (QA follow-up) Terminology: reserve => hold
Katrin Fischer [Mon, 28 Oct 2024 18:56:08 +0000 (18:56 +0000)]
Bug 30648: (QA follow-up) Terminology: reserve => hold

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 30648: DBIC schema update
Katrin Fischer [Mon, 28 Oct 2024 18:52:03 +0000 (18:52 +0000)]
Bug 30648: DBIC schema update

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 30648: DBRev 24.06.00.050
Katrin Fischer [Mon, 28 Oct 2024 18:46:21 +0000 (18:46 +0000)]
Bug 30648: DBRev 24.06.00.050

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 30648: Tidy
Nick Clemens [Fri, 11 Oct 2024 13:11:10 +0000 (13:11 +0000)]
Bug 30648: Tidy

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 30648: Add new field to REST API
Nick Clemens [Fri, 11 Oct 2024 12:51:52 +0000 (12:51 +0000)]
Bug 30648: Add new field to REST API

Maybe we just undef it since ti will always be null except for old_hold obecjts
and we don't have that route yet

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 30648: Unit tests
Nick Clemens [Fri, 11 Oct 2024 12:49:23 +0000 (12:49 +0000)]
Bug 30648: Unit tests

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 30648: Record deleted_biblionumber in holds
Nick Clemens [Fri, 11 Oct 2024 12:28:48 +0000 (12:28 +0000)]
Bug 30648: Record deleted_biblionumber in holds

This patch ensures the deleted biblionumber is recorded in current and previous holds
before the record is deleted

To test:
1 - Place and fill a few holds on a biblio, completing checkout to patron
2 - Place a few holds on the biblio and do not fulfill them
3 - Delete the items from the biblio via the DB (otherwise you cannot delete last item when there are holds)
    DELETE FROM items WHERE biblionumber={biblionumber}
4 - Delete the biblio
5 - Check the DB and confirm the deleted_biblionumber column has been filled
    SELECT reserve_id,deleted_biblionumber,biblionumber FROM old_reserves WHERE deleted_biblionumber = {biblionumber};
6 - Sign off!

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 30648: Add deleted_biblionumber column for reserves
Nick Clemens [Fri, 11 Oct 2024 12:05:11 +0000 (12:05 +0000)]
Bug 30648: Add deleted_biblionumber column for reserves

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 38274: DBRev 24.06.00.049
Katrin Fischer [Mon, 28 Oct 2024 18:26:41 +0000 (18:26 +0000)]
Bug 38274: DBRev 24.06.00.049

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 38274: Fix typo in arabic language description
Fridolin Somers [Fri, 25 Oct 2024 14:25:10 +0000 (16:25 +0200)]
Bug 38274: Fix typo in arabic language description

In installer/data/mysql/mandatory/subtag_registry.sql we see a missing
char in arabic language description.

Wee see this was correct before Bug 12250 :
&#1575;&#1604;&#1593;&#1585;&#1576;&#1610;&#1577;

Test plan :
1) Install a fresh Koha with this patch
2) Look in database :
   SELECT * FROM language_descriptions WHERE subtag='ar' AND type='language' AND lang='ar'
=> Check description is correct
3) On a old existing Koha
4) Install patch and run update database
=> Look in database and check description is correct

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>
7 days agoBug 37795: Adjust job-progress.inc for Bootstrap 5 changes
Phil Ringnalda [Fri, 11 Oct 2024 22:54:50 +0000 (15:54 -0700)]
Bug 37795: Adjust job-progress.inc for Bootstrap 5 changes

Four main changes:

The color classes progress-bar-success and progress-bar-danger are now named
bg-success and bg-danger.

The aria attributes have moved from the progress-bar to the progress wrapper.
Having them on the progress-bar is still supported for BS5, but won't be in
BS6, so we might as well move them now rather than forgetting to move them
later.

Having the percentage number in a span, the % symbol in text, and the label
for "Not started" "Started" "Finished" "Failed" in another span no longer
works because the progress-bar content is in a column flexbox. Just setting
all of it at once in the content of the progress-bar works fine.

Before, overflow from the label being longer than the progress-bar happened
by wrapping the "%" and "Started" invisibly down below the progress-bar.
Now it is cropped off by overflow: hidden, so we have to deal with showing
"2% Star" rather than showing "2%" and dropping the whole "Started" like
we did before. The best solution seems to be making the background of the
progress div, which is what shows to the right of the filled part of the
progress-bar, a little darker grey so white text is readable if you squint.

Test plan:
 1. You need enough records to import so that you can at least see a bit of
    progress before it finishes. Ideally, you would have a file of 10K or
    so bibs, but with ktd, you can have 400-odd: Cataloging - Export catalog
    data, change the Output format to XML and the filename to koha.marcxml
    and export.
 2. Cataloging - Stage records for import, Browse to your file, Upload file.
    Since you named it koha.marcxml, it's recognized as MARCXML and you can
    just click Stage for import
 3. Without the patch, at this point you get an orange full-width bar, with
    a white "%" in the middle, which doesn't change even after the "View
    batch" link appears signalling it's done. With the patch, you start with
    an orange bar labelled "0% Not started" which changes to a green "0.00%
    Started" that animates too quickly to read to "100% Finished". Right
    click the bar, Inspect, double-click the "width: 100%" to edit it, click
    past the 100 and delete the 00 and press Enter to see a static 1%. You
    should be able to read the "100% Finished" even spread across the green
    and dark gray, at least by selecting the text if no other way.

Sponsored-by: Chetco Community Public Library
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>
7 days agoBug 38251: Make 'Remove selected items' button work when there is one item
Phil Ringnalda [Thu, 24 Oct 2024 21:16:45 +0000 (14:16 -0700)]
Bug 38251: Make 'Remove selected items' button work when there is one item

There are two ways to remove items from a list: you can remove a single item
by clicking a 'Remove from this list' button below the item, or you can
remove one or more items by checking the checkboxes for them and clicking the
'Remove selected items' button.

Bug 37150 needed to fix 'Remove from this list' for CSRF, because in the wild
old days it just triggered a GET to delete, and instead it needed to POST.
The first patch to do that defined the JS var single_bib, checked the
checkbox for that bib and submitted the form, as though you had used the
checkbox yourself. But if you cancelled the confirmation prompt, it would
need to uncheck the checkbox it checked, so it added a function to do that
if (single_bib). That patch didn't land.

What landed instead was a patch with a separate hidden form that could be
populated with the single biblionumber from 'Remove from this list', but
without single_bib to define that state, it used selected_titles.size() == 1
as the condition to use the hidden form, forgetting that when the user checks
a single checkbox, selected_titles.size() is also 1. The right condition is
the same one used to tell where to get the titles for the confirmation dialog:
if the click event passed along a biblionumber, it's 'Remove from this list.'
Since checking that sets var biblionumber, we can just use that being truthy
as the condition.

Test plan:
 1. Without the patch, open the OPAC and log in
 2. Add any two biblios to a new list
 3. Lists - {your list name}
 4. Click the checkbox for one of the items, click 'Remove selected items'
    and click 'Yes, remove from list' in the confirmation dialog
 5. Note that it wasn't removed
 6. Click the checkboxes for both items, click 'Remove selected items' and
    click 'Yes, remove from list' in the confirmation dialog
 7. Note that both were removed
 8. Apply patch, restart_all
 9. Add any four items to your list
10. Lists - {your list name}
11. For the first item, click the 'Remove from this list' button below the
    details for the item, confirm, make sure it was deleted
12. Click the checkbox for what's now the first item, click 'Remove from
    this list,' confirm, make sure it was deleted
13. Click the checkboxes for what are now the first two items, click 'Remove
    from this list,' confirm, make sure both were deleted

Sponsored-by: Chetco Community Public Library
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>
7 days agoBug 38271: (QA follow-up) Fix testcritic
Matt Blenkinsop [Mon, 28 Oct 2024 09:35:04 +0000 (09:35 +0000)]
Bug 38271: (QA follow-up) Fix testcritic

testcritic was failing due to a 'return undef' so this commit amends that

Test plan:
1) prove t/00-testcritic.t

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 38271: (QA follow-up) Tidy code
Kyle M Hall [Fri, 25 Oct 2024 13:06:11 +0000 (09:06 -0400)]
Bug 38271: (QA follow-up) Tidy code

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 38271: Handle missing 008 fields in EDI
Matt Blenkinsop [Fri, 25 Oct 2024 11:19:24 +0000 (11:19 +0000)]
Bug 38271: Handle missing 008 fields in EDI

This patch adds handling to create a default 008 field on MARC records that are missing one when created through EDI.

Test plan:
1) prove t/db_dependent/Koha/EDI.t

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 38275: Fix patron card creator image delete
David Cook [Sun, 27 Oct 2024 23:19:45 +0000 (23:19 +0000)]
Bug 38275: Fix patron card creator image delete

This change changes the patron card creator image delete from a
GET to a POST, and supports single delete and multi-delete.

Test plan:
1. Apply the patch (and refresh browser JS cache)
2. Go to http://localhost:8081/cgi-bin/koha/patroncards/image-manage.pl
3. Upload multiple images
4. Select all the images using the checkboxes
5. Delete one image using the "Delete" button in the row
6. Note that only the image selected using the "Delete" button is
deleted and the other images are de-selected
7. Delete multiple images using the "Delete selected" button
8. Note that the correct images are noted in the confirm message,
and the correct images are deleted

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>
7 days agoBug 36317: Koha::Biblio->host_items must use me.itemnumber
Fridolin Somers [Thu, 14 Mar 2024 10:24:54 +0000 (11:24 +0100)]
Bug 36317: Koha::Biblio->host_items must use me.itemnumber

Koha::Biblio->host_items fails with search_ordered() because of ambiguous column 'itemnumber' in where clause.
It must use me.itemnumber like in Koha::Biblio->items

Test plan :
prove t/db_dependent/Koha/Biblio.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 36317: Add unit test
Fridolin Somers [Mon, 18 Mar 2024 14:18:27 +0000 (15:18 +0100)]
Bug 36317: Add unit test

If fails it shows :
DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'itemnumber' in where clause is ambiguous at /kohadevbox/koha/Koha/Objects.pm line 399

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 37869: Tidy code
Kyle M Hall [Mon, 9 Sep 2024 14:32:52 +0000 (10:32 -0400)]
Bug 37869: Tidy code

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>
7 days agoBug 37869: Move plugin hook before_send_messages to SendQueuedMessages
Kyle M Hall [Mon, 9 Sep 2024 14:18:07 +0000 (14:18 +0000)]
Bug 37869: Move plugin hook before_send_messages to SendQueuedMessages

Most messages in Koha are handled by process_message_queue.pl. This script calls before_send_messages which calls the plugin hook before_send_messages. This works for nearly all messages, but some messages like WELCOME notices are triggered immediately and do not way to for process_message_queue.pl to run. We should move the triggering of before_send_messages into SendQueuedMessages so it is always handled.

Test Plan:
1) Install version 2.5.1 of the kitchen sink plugin
2) Run process_messsage_queue.pl and also trigger a WELCOME notice
3) Note the "Plugin hook before_send_message called with the params" message in the logs for the former but not the latter
4) Apply this patch
5) Repeat step 2, note there the message also shows in the logs for the WELCOME notice!

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>
7 days agoBug 37869: Add unit tests
Kyle M Hall [Wed, 2 Oct 2024 16:59:53 +0000 (12:59 -0400)]
Bug 37869: Add unit tests

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>
7 days agoBug 35659: Adjust DT's option names
Jonathan Druart [Mon, 28 Oct 2024 15:34:50 +0000 (16:34 +0100)]
Bug 35659: Adjust DT's option names

See bug 34913

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Do not redirect if loaded from state
Jonathan Druart [Mon, 28 Oct 2024 14:50:01 +0000 (15:50 +0100)]
Bug 33484: Do not redirect if loaded from state

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: (QA follow-up) Fix patrons_search.t selenium test
Katrin Fischer [Mon, 28 Oct 2024 14:51:37 +0000 (14:51 +0000)]
Bug 33484: (QA follow-up) Fix patrons_search.t selenium test

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: DBRev 24.06.00.48
Katrin Fischer [Mon, 28 Oct 2024 13:16:19 +0000 (13:16 +0000)]
Bug 33484: DBRev 24.06.00.48

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Do not consider we loaded from state if search was not saved
Jonathan Druart [Thu, 24 Oct 2024 08:44:40 +0000 (10:44 +0200)]
Bug 33484: Do not consider we loaded from state if search was not saved

The loaded_from_state flag is used to know if we defer the loading of
the table or not.
We should not display the result (ie not defer loading) if only the
configuration has been retrieved from localStorage.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Include patron search code if no patron selected yet
Jonathan Druart [Thu, 24 Oct 2024 08:37:59 +0000 (10:37 +0200)]
Bug 33484: Include patron search code if no patron selected yet

When placing a hold we should not display the patron search code
(html+js) if we have picked a patron already, otherwise a get a JS error
  Uncaught TypeError: table_dt.settings()[0] is undefined

koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc
781             let table_dt = patrons_table.DataTable();
782             let loaded_from_state = table_dt.settings()[0].loaded_from_state;

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Pass external filters only if exists
Jonathan Druart [Thu, 24 Oct 2024 08:26:52 +0000 (10:26 +0200)]
Bug 33484: Pass external filters only if exists

The external_filter_nodes object should only be passed if the filters
block on the left actually exists. So only for the main patron search,
not the other ones.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: (follow-up) Fix category select
Jonathan Druart [Wed, 23 Oct 2024 12:26:34 +0000 (14:26 +0200)]
Bug 33484: (follow-up) Fix category select

Lower everything or broken for library

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Fix selenium/patrons_search.t
Jonathan Druart [Mon, 21 Oct 2024 12:56:48 +0000 (14:56 +0200)]
Bug 33484: Fix selenium/patrons_search.t

Filters are saved, we need to clear the form when needed.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: External filter into state - ill requests
Jonathan Druart [Mon, 21 Oct 2024 12:18:18 +0000 (14:18 +0200)]
Bug 33484: External filter into state - ill requests

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: External filter into state - support flatpickr
Jonathan Druart [Mon, 21 Oct 2024 12:17:55 +0000 (14:17 +0200)]
Bug 33484: External filter into state - support flatpickr

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: External filter into state - catalogue concerns
Jonathan Druart [Thu, 17 Oct 2024 13:55:05 +0000 (15:55 +0200)]
Bug 33484: External filter into state - catalogue concerns

Use a checkbox to store the state. It does not make the code better but
make possible to keep and restore and state of the filter.

Not sure it's working correct on the cataloguing/concerns.pl page but
the behaviour was already not good before.
At least I think it fixes the filter/include icon in some situation.
On main I managed to get the "include resolved" link with the "filter"
icon and the resolved concerns were already displayed...

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: External filter into state - support checkboxes
Jonathan Druart [Thu, 17 Oct 2024 13:24:24 +0000 (15:24 +0200)]
Bug 33484: External filter into state - support checkboxes

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: External filter into state - patron search
Jonathan Druart [Thu, 17 Oct 2024 12:41:23 +0000 (14:41 +0200)]
Bug 33484: External filter into state - patron search

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Store external filters into state
Jonathan Druart [Thu, 17 Oct 2024 10:59:58 +0000 (12:59 +0200)]
Bug 33484: Store external filters into state

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Fix for suggestions
Jonathan Druart [Thu, 17 Oct 2024 07:50:56 +0000 (09:50 +0200)]
Bug 33484: Fix for suggestions

This ugly fix is retrieving all CGI params and consider them attributes
for suggestions. So we need to exclude other ones...

There is more to make it works properly on this table.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Allow several tables using the same table settings - columns_settings
Jonathan Druart [Thu, 17 Oct 2024 10:32:34 +0000 (12:32 +0200)]
Bug 33484: Allow several tables using the same table settings - columns_settings

In some cases (at least on the suggestions page) we display several
pages using the same settings.
In that case the key "DataTables_acqui_suggestions_suggestions" is not
specific enough, we need to add the id of the table as well.

This patch does not modify koha-tmpl/intranet-tmpl/prog/js/datatables.js
/ REST API wrapper as I don't think we have occurrences that need this.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Add 'Copied!' tooltip when the button is clicked
Jonathan Druart [Thu, 17 Oct 2024 08:00:34 +0000 (10:00 +0200)]
Bug 33484: Add 'Copied!' tooltip when the button is clicked

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Rename 'Copy conditions' => 'Copy shareable link'
Jonathan Druart [Thu, 17 Oct 2024 07:56:40 +0000 (09:56 +0200)]
Bug 33484: Rename 'Copy conditions' => 'Copy shareable link'

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Fix TablesSettings.t
Jonathan Druart [Thu, 17 Oct 2024 07:39:24 +0000 (09:39 +0200)]
Bug 33484: Fix TablesSettings.t

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Add new columns as boolean in schema file
Jonathan Druart [Thu, 17 Oct 2024 07:21:10 +0000 (09:21 +0200)]
Bug 33484: Add new columns as boolean in schema file

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Fix libraries table
Jonathan Druart [Wed, 16 Oct 2024 07:54:50 +0000 (09:54 +0200)]
Bug 33484: Fix libraries table

We added columns to the table but never displayed them, and they were
not part of the columns settings.
I am not sure what was the purpose of that but it looks completely
wrong. If we want to restore them it should be done correctly (ie. add
them back to the column list and add the new ones to the columns
settings).

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Fix bookings
Jonathan Druart [Tue, 15 Oct 2024 12:07:40 +0000 (14:07 +0200)]
Bug 33484: Fix bookings

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Fix Vue tables
Jonathan Druart [Tue, 8 Oct 2024 12:58:16 +0000 (14:58 +0200)]
Bug 33484: Fix Vue tables

datatables.net-vue3 does not use a specific id, and does not let us pass
one. It is generated, like: DataTables_Table_0 (and increment when a new
table is created).
So it's not possible to use this id: it can change and so is not
reliable.

I have tried to pass "data-koha-table-id" with a specific id
(KohaTable_agreements). Which was working, but actually we could simply
use the table settings key to identify the tables in the URL.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Fix pending orders
Jonathan Druart [Tue, 8 Oct 2024 11:49:59 +0000 (13:49 +0200)]
Bug 33484: Fix pending orders

Sometimes 'this' is the DOM element, for instance on the pending orders
table.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Adjust columns_settings.inc
Jonathan Druart [Tue, 8 Oct 2024 10:45:43 +0000 (12:45 +0200)]
Bug 33484: Adjust columns_settings.inc

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Early return in add_filters if node does not exist
Jonathan Druart [Tue, 8 Oct 2024 09:45:58 +0000 (11:45 +0200)]
Bug 33484: Early return in add_filters if node does not exist

Maybe we could even return early from kohaTable?

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Do not defer loading if state is loaded from localStorage
Jonathan Druart [Tue, 8 Oct 2024 09:35:08 +0000 (11:35 +0200)]
Bug 33484: Do not defer loading if state is loaded from localStorage

Squashing
Revert "Bug 33484: (Bug 27467) Fix patrons search"
This reverts commit 0d21ff768b97bc8393a01b0ad881961a3252f2cf.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Fix category select
Jonathan Druart [Wed, 9 Oct 2024 09:43:08 +0000 (11:43 +0200)]
Bug 33484: Fix category select

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Fix patron search form
Jonathan Druart [Tue, 8 Oct 2024 08:52:23 +0000 (10:52 +0200)]
Bug 33484: Fix patron search form

Reset DT's filters if we are searching again using the search form.

If you use the form on the left we need to reset the different filters
that could have been set from a previous state we loaded.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Fix patrons search
Jonathan Druart [Tue, 8 Oct 2024 08:40:17 +0000 (10:40 +0200)]
Bug 33484: Fix patrons search

Setting a DT's custom setting to know if we loaded an existing state, so
that we do not pick the value of the selects from the form (on the
left).

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Redraw columns filters when column visibility is modified
Jonathan Druart [Mon, 7 Oct 2024 10:11:56 +0000 (12:11 +0200)]
Bug 33484: Redraw columns filters when column visibility is modified

This seems to be the most sensible approach, we redraw the whole th when
the column visibility is modified.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Remove localStorage on logout
Jonathan Druart [Thu, 3 Oct 2024 13:30:06 +0000 (15:30 +0200)]
Bug 33484: Remove localStorage on logout

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: (Bug 27467) Fix patrons search
Jonathan Druart [Wed, 2 Oct 2024 14:16:09 +0000 (16:16 +0200)]
Bug 33484: (Bug 27467) Fix patrons search

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: (Bug 27467) Ability to share a link
Jonathan Druart [Thu, 3 Oct 2024 13:02:58 +0000 (15:02 +0200)]
Bug 33484: (Bug 27467) Ability to share a link

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Always save but restore on demand only
Jonathan Druart [Thu, 3 Oct 2024 11:35:34 +0000 (13:35 +0200)]
Bug 33484: Always save but restore on demand only

And remove get_columns_saved_state. I am not sure this what really
helpful, maybe in case the yml or config in the DB changed, but I don't
think we should complicate the code. If something is wrong, logout to
clear localStorage...
We will see later if we really need it.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Implement Vue KohaTable
Jonathan Druart [Thu, 3 Oct 2024 09:59:08 +0000 (11:59 +0200)]
Bug 33484: Implement Vue KohaTable

Move up as beforeMount was called too late to init DT's options

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: DBIC Schema change
Jonathan Druart [Thu, 3 Oct 2024 09:24:22 +0000 (11:24 +0200)]
Bug 33484: DBIC Schema change

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Add tables_settings.default_save_state_search
Jonathan Druart [Thu, 3 Oct 2024 08:44:01 +0000 (10:44 +0200)]
Bug 33484: Add tables_settings.default_save_state_search

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Clearly separate search and configuration
Jonathan Druart [Thu, 3 Oct 2024 08:24:50 +0000 (10:24 +0200)]
Bug 33484: Clearly separate search and configuration

We want to make distinguish the search terms and the
configuration/option of the table (number of entries, column visibility,
etc.)

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Add table settings to pending orders
Jonathan Druart [Thu, 3 Oct 2024 08:50:57 +0000 (10:50 +0200)]
Bug 33484: Add table settings to pending orders

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
7 days agoBug 33484: Make default_save_state default to 1
Jonathan Druart [Thu, 3 Oct 2024 07:06:55 +0000 (09:06 +0200)]
Bug 33484: Make default_save_state default to 1

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>