koha.git
3 months agoBug 35346: Update template logic to display 'Essential'
Martin Renvoize [Thu, 16 Nov 2023 13:20:58 +0000 (13:20 +0000)]
Bug 35346: Update template logic to display 'Essential'

This patch updates the cookie consent template logic to always display
the 'Accept essential cookies' button and only expose the 'Accept all
cookies' button when there are additional cookies to accept, i.e. when
JSConsents is populated.

Test plan
1) Enable CookieConsent
2) Note you see 'Accept essential cookies' in both OPAC and Staff client
   until you have accepted them
3) Add a cookie to ConsentJS
4) Note that you will now see 'Accept all cookies' as well as the 'Accept
   essential cookies' button.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35347: (QA follow-up): swap "essential" and "all" for OPAC too
Victor Grousset/tuxayo [Sun, 11 Feb 2024 05:34:53 +0000 (06:34 +0100)]
Bug 35347: (QA follow-up): swap "essential" and "all" for OPAC too

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35347: Display 'More information' button regardless of JSConsents
Martin Renvoize [Thu, 16 Nov 2023 13:14:39 +0000 (13:14 +0000)]
Bug 35347: Display 'More information' button regardless of JSConsents

This patch moves the "More informatin" button outside of the JSConsents
block so that you are able to access the information modal regardless of
whether you have tracking cookies added to your configuration or not.

Test plan
1) Enable CookieConsent
2) Note that the 'More information' button now appears in the footer on
   both staff and opac until you have accepted cookies.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 34793: (QA follow-up): forgotten 'Cookie consents'=>'Cookies policy'
Victor Grousset/tuxayo [Sun, 11 Feb 2024 06:41:01 +0000 (07:41 +0100)]
Bug 34793: (QA follow-up): forgotten 'Cookie consents'=>'Cookies policy'

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 34793: (follow-up) Add table classes to popup
Martin Renvoize [Mon, 20 Nov 2023 08:00:10 +0000 (08:00 +0000)]
Bug 34793: (follow-up) Add table classes to popup

This patch adds the appropriate table classes to the Popup html
customisation block. This ensure we have proper table display formatting
in the modal on the OPAC.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 34793: (follow-up) Rename 'Cookie consents' to 'Cookies policy'
Aude Charillon [Fri, 17 Nov 2023 15:35:58 +0000 (15:35 +0000)]
Bug 34793: (follow-up) Rename 'Cookie consents' to 'Cookies policy'

The modal is not always about consent, but rather about displaying the
libraries cookie policy. It makes sense to update the heading to reflect
that.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 34793: Add default HTML Customisations for cookie information
Aude Charillon [Fri, 17 Nov 2023 15:30:22 +0000 (15:30 +0000)]
Bug 34793: Add default HTML Customisations for cookie information

This patch adds some default html customisation content for the cookie
consent feature.

Test plan
1) Run through the installer and pick to import the sample news items
2) Confirm that after enabling the CookieConsent preference that the
   default content appears in the cookie bar at the bottom of the page
   and in the modal that appears after clicking 'More information'

Mentored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35882: (QA follow-up) Fix wrapper parameter (panelgroup_id)
Julian Maurice [Tue, 26 Mar 2024 08:38:10 +0000 (09:38 +0100)]
Bug 35882: (QA follow-up) Fix wrapper parameter (panelgroup_id)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35882: Use template wrapper for accordions: Notices
Owen Leonard [Tue, 23 Jan 2024 19:32:03 +0000 (19:32 +0000)]
Bug 35882: Use template wrapper for accordions: Notices

This patch updates the notices template so that Bootstrap
accordion markup for the notice edit view is generated by WRAPPERs.

To test, apply the patch and go to Tools -> Notices.

- Edit any notice.
- The list of message transport types (Email, Print, SMS) should be
  displayed as before: Collapsible panels where clicking the transport
  type heading expands the corresponding information.
- Confirm that changes to notices are correctly saved.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35883: Use template wrapper for accordions: Table settings administration
Owen Leonard [Tue, 23 Jan 2024 19:33:33 +0000 (19:33 +0000)]
Bug 35883: Use template wrapper for accordions: Table settings administration

This patch updates the table settings administration page so that
Bootstrap accordion markup is generated by WRAPPERs.

This patch also makes some changes to fix the automatic scroll when a
table configuration button was clicked.

To test, apply the patch and go to Administration -> Table settings.

- The list of modules should be displayed as before: Collapsible panels
  where clicking the module name heading expands the corresponding
  panel of settings.
- Test that direct links to configurable tables still work correctly:
  - Go to Administration -> Libraries.
  - Click the "Configure" button at the top of the table of libraries.
  - You should be taken to the table settings page.
    - The "Administration" panel should be expanded by default.
    - You should be scrolled down automatically to the "Libraries"
      table.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35880: Use template wrapper for accordions: Patrons requesting modifications
Owen Leonard [Tue, 23 Jan 2024 19:22:12 +0000 (19:22 +0000)]
Bug 35880: Use template wrapper for accordions: Patrons requesting modifications

This patch updates the patrons requesting modification page so that
Bootstrap accordion markup is generated by WRAPPERs.

To test, apply the patch and make sure you have the OPACPatronDetails
system preference enabled.

- Create at least two different patron modification requests:
  - Log in to the OPAC using two different patron accounts, each time
    following the sidebar link for "Personal details."
  - Make some changes to the patron records and submit them.
- In the staff interface, from the home page, click the "Patrons
  requesting modifications" link.
- You should see the list of updates in the same format as before:
  Collapsible panels where clicking the patron name heading expands the
  corresponding information.
- View the detail or checkout page for one of your updated patrons.
  - Click the "Review pending modifications" link.
  - The modifications page should open with that patron's information
    exapanded.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35877: (follow-up) Correct accordion wrapper parameter name
Owen Leonard [Fri, 22 Mar 2024 16:13:34 +0000 (16:13 +0000)]
Bug 35877: (follow-up) Correct accordion wrapper parameter name

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35877: Use template wrapper to build Bootstrap accordion components
Owen Leonard [Tue, 23 Jan 2024 18:54:02 +0000 (18:54 +0000)]
Bug 35877: Use template wrapper to build Bootstrap accordion components

This patch adds Template::Toolkit WRAPPER blocks to html_helpers.inc so
that templates can build Bootstrap accordion components while keeping
the Bootstrap structural markup separate.

Each individual component of a Bootstrap accordion interface is defined:

- Group container
  - Collapsible item
    - Item heading
    - Item content

Included is a usage example:

    [ WRAPPER accordion id="accordion container id" ]
        [ WRAPPER accordion_item ]
            [ WRAPPER accordion_heading panel_id = "panel id" ]
                [Clickable panel heading ]
            [ END ]
            [ WRAPPER accordion_panel panel_id = "panel id" ]
                [Expanding content panel]
            [ END ]
        [ END ]
    [ END ]

To test, apply this patch and one of the dependent patches.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 36347: Avoid return claims table being loaded twice
Julian Maurice [Mon, 18 Mar 2024 15:07:02 +0000 (16:07 +0100)]
Bug 36347: Avoid return claims table being loaded twice

The issue is caused by these lines in circulation.js:

$("#finesholdsissues a[data-toggle='tab']").on("shown.bs.tab", function(e){
    $(this).click();
});

When the user clicks on a hidden tab, 'shown.bs.tab' is triggered and
then another click event is triggered. And because the table was loaded
on tab click, it was loaded twice.
Visually it could have caused the rows to be duplicated (it was random,
probably due to timing, network latency, ...)

I don't know why we need to trigger a click in this case, but removing
this will probably break something else, so the fix here is to load the
table on 'shown.bs.tab' event instead of 'click'

This patch also contains a small fix in refreshReturnClaimsTable which
was reloading the table right after the table initialization.

Test plan:
1. Check out an item, and in the checkouts table, click "Claim returned"
2. Open the network tab of your browser's developer tools
3. Click on the "Claims" tab, verify that only one call is made to
   svc/return_claims
4. Verify that the claims table is displayed correctly

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>
3 months agoBug 36426: Fix 'Set request as pending'
Jonathan Druart [Tue, 26 Mar 2024 07:36:40 +0000 (08:36 +0100)]
Bug 36426: Fix 'Set request as pending'

From
  commit cb64ea0c5440f5a7cf7837caafd487f35884430d
  Bug 36084: svc - article_request - POC

It's missing data-ar-id on .ar-set-pending-request

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 36035: Wrong text colour in addorderiso2709.pl
Owen Leonard [Thu, 8 Feb 2024 13:57:30 +0000 (13:57 +0000)]
Bug 36035: Wrong text colour in addorderiso2709.pl

This patch updates the "Order staged MARC records" page so that the
class which is added upon selection is more unique to avoid a collision
with some default DataTables styles. These classes are used in
JavaScript selectors, not for visual style.

The patch also adds some custom CSS variables to global.scss to override
the defaults for the DataTables "selected" style, in case this issue
crops up again.

To test, apply the patch and rebuild the staff interface CSS. Follow the
test plan from the bug report:

1) In system preferences, click Search and then select the Acquisitions
   option from the left hand menu
2) Paste the following into MarcFieldsToOrder

price: 975$p
quantity: 975$q
budget_code: 975$h

3) Paste the following into MarcItemFieldsToOrder

homebranch: 949$a
holdingbranch: 949$b
itype: 949$y
nonpublic_note: 949$x
public_note: 949$z
loc: 949$c
ccode: 949$8
notforloan: 949$7
uri: 949$u
copyno: 949$t
price: 949$g
replacementprice: 949$v
itemcallnumber: 949$o
quantity: 949$k
budget_code: 949$l

4) Save the sysprefs
5) Navigate to acquisitions and go into a basket
6) Click "Add to basket" and select "From a new file"
7) Download the file attached to this bug
8) Import the file and when the job is complete click "Add staged files
   to basket"
9) Click the checkbox next to the record to display the items.
   - The expanded form should look correct.
10) Add one or more items to the order and confirm that submitting the
    form works correctly.

To test the new default "selected" DataTables style, view a page with a
DataTable, e.g. Administration -> Libraries.

- Right-click on one of the table rows and choose "Inspect"
- Click the table row element, e.g. '<tr class="odd">'
- Double-click the class name and replace it with "selected."
- The row you inspected should now have a pale green background and text
  colors should remain the same.

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>
3 months agoBug 35107: (QA follow-up) Use TT filter
Pedro Amorim [Mon, 25 Mar 2024 10:51:13 +0000 (10:51 +0000)]
Bug 35107: (QA follow-up) Use TT filter

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35107: Add tests
Pedro Amorim [Mon, 27 Nov 2023 14:31:59 +0000 (14:31 +0000)]
Bug 35107: Add tests

prove t/db_dependent/Koha/Illrequest.t

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35107: (QA follow-up) Use extended_attributes
Pedro Amorim [Mon, 27 Nov 2023 14:31:30 +0000 (14:31 +0000)]
Bug 35107: (QA follow-up) Use extended_attributes

Addressing the warning:
illrequestattributes is DEPRECATED in favor of extended_attributes

No functional behaviour change here

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35107: Show type disclaimer value and date in request details
Pedro Amorim [Thu, 19 Oct 2023 13:53:29 +0000 (13:53 +0000)]
Bug 35107: Show type disclaimer value and date in request details

Test plan, k-t-d:
1) Install FreeForm and BLDSS backends, run:
bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev-plus.sh)
2) Set ILLModuleDisclaimerByType system preference , visit:
/cgi-bin/koha/admin/preferences.pl?tab=interlibrary_loans#interlibrary_loans_Workflow
3) Copy the example code, click the 'Click to edit' link to open the text area, and paste the example yaml:
all:
 text: |
  <h2>HTML title</h2>
  <p>This is an HTML paragraph</p>
  <p>This is another HTML paragraph</p>
 av_category_code: YES_NO
article:
 text: copyright text for all article type requests
 av_category_code: YES_NO
 bypass: 1
4) Create a new FreeForm request, visit:
/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=FreeForm
5) Set type 'Book', put'9780822370451' in ISBN, put '42' in the cardnumber, and pick a library
6) You should now be in the type disclaimer stage, click 'Submit'
7) Notice the disclaimer value and date are displayed under 'Details from supplier'
8) Click the top 'Switch provider' button and pick BLDSS
9) You should get one result, click the 'Request BLL01018665793' link to finish the migration
10) You should now be in the ILL table, click the request that was just migrated to BLDSS
11) Notice the type disclaimer information is no longer visible
12) Apply patch, restart plack: koha-plack --restart kohadev
13) Refresh the BLDSS request, the information should now be visible in the 'Request details' section

Signed-off-by: Richard Bridgen <richard.bridgen@nhs.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 36392: (bug 34219 follow-up) Fix getAll for vendors - ERM
Jonathan Druart [Fri, 22 Mar 2024 07:41:33 +0000 (08:41 +0100)]
Bug 36392: (bug 34219 follow-up) Fix getAll for vendors - ERM

In commit f1078daf8f496e1b4234acf766578c511ca8aad1
   Bug 34219: Allow getAll to receive additional URL parameters

We needed to call getAll instead of get to fetch all the vendors

Test plan:
Have more than 20 vendors and create/edit an agreement.
Notice that the vendor list contains all the vendors

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Matthias Le Gac <matthias.le-gac@inlibro.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35536: (follow-up) Fix Plugins.t for D10
Marcel de Rooy [Mon, 25 Mar 2024 11:56:15 +0000 (11:56 +0000)]
Bug 35536: (follow-up) Fix Plugins.t for D10

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35548: (follow-up) Fix mock statement for D10
Marcel de Rooy [Mon, 25 Mar 2024 08:20:09 +0000 (08:20 +0000)]
Bug 35548: (follow-up) Fix mock statement for D10

Test plan: Run t/db_dependent/Koha/Plugins/KitchenSink.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 31286: (QA follow-up): tidy up code
Victor Grousset/tuxayo [Thu, 8 Feb 2024 03:56:47 +0000 (04:56 +0100)]
Bug 31286: (QA follow-up): tidy up code

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 31286: Embed see-from headings into bibliographic records export
Fridolin Somers [Wed, 3 Aug 2022 01:17:25 +0000 (15:17 -1000)]
Bug 31286: Embed see-from headings into bibliographic records export

In misc/export_records.pl add an option to add see-from headings (from authorities 4xx) into bibliographic records export.
Like it is done during record indexing.

Test plan :
1) Choose a biblio record having a field (for example 650) linked to an authority with a see-form.
2) Export this record without see-from headings :
   misc/export_records.pl --starting_biblionumber=X --ending_biblionumber=X --filename /tmp/record_without.xml --format xml
3) Export this record with see-from headings :
   misc/export_records.pl --starting_biblionumber=X --ending_biblionumber=X --filename /tmp/record_with.xml --format xml --embed_see_from_headings
4) Compare /tmp/record_without.xml and /tmp/record_with.xml
=> you should see two 650, one with main heading and one with see-from heading

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 23208: DBRev 23.12.00.013
Katrin Fischer [Mon, 25 Mar 2024 08:46:56 +0000 (08:46 +0000)]
Bug 23208: DBRev 23.12.00.013

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 23208: perltidy
Lucas Gass [Fri, 26 Jan 2024 18:47:50 +0000 (18:47 +0000)]
Bug 23208: perltidy

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 23208: Add ability to set a default hold ratio value
Lucas Gass [Fri, 26 Jan 2024 18:43:06 +0000 (18:43 +0000)]
Bug 23208: Add ability to set a default hold ratio value

To test:
1. APPLY PATCH, updatedatebase, restart_all
2. Search for the system preference 'HoldRatioDefault'.
3. It should be set to 3. Change the value to something else.
4. Load the report at 'circ/reserveratios.pl'. Circulation > Hold ratios
5. The default value should be the value you set in the new system preference.
6. Run the report with the default value and make sure it works.
7. Change the value and run the report. The new value should be retained.
8. Leave the page and come back. Again the default value from the new system preference should be set.

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 23208: Add system preference HoldRatioDefault
Lucas Gass [Fri, 26 Jan 2024 18:42:14 +0000 (18:42 +0000)]
Bug 23208: Add system preference HoldRatioDefault

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35653: (QA follow-up) Perltidy
Emily Lamancusa [Fri, 2 Feb 2024 20:22:14 +0000 (15:22 -0500)]
Bug 35653: (QA follow-up) Perltidy

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35653: Log import_patrons.pl info to action logs
Lucas Gass [Wed, 27 Dec 2023 17:35:31 +0000 (17:35 +0000)]
Bug 35653: Log import_patrons.pl info to action logs

To test:
1. APPLY PATCH
2. Create a CSV file with a few lines that contain at least firstname, surname, cardnumber
3. Turn on "CronjobLog".
4. Run the import patron script. I did this: perl /kohadevbox/koha/misc/import_patrons.pl --file 'test1.csv' --matchpoint cardnumber -c
5. Check the action logs for cronjobs.
6. You should see info. about the import patron script.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 34943: (QA follow-up) Use `before_biblio_action` and an `action` param
Tomas Cohen Arazi [Mon, 11 Mar 2024 17:33:25 +0000 (14:33 -0300)]
Bug 34943: (QA follow-up) Use `before_biblio_action` and an `action` param

This patch harmonizes the hook name and parameters with the rest of the
codebase.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ qa
=> SUCCESS: All looks green, and tests still pass (i.e. they were
correctly adjusted to the new schema).
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 34943: Implement `before_biblio_metadata_store` plugin hook
Tomas Cohen Arazi [Fri, 8 Dec 2023 20:24:35 +0000 (17:24 -0300)]
Bug 34943: Implement `before_biblio_metadata_store` plugin hook

This patch implements a hook allowing record modification right before
they are written on the DB. The idea is that a plugin could be used to
add machine-generated fields/subfields.

To test:
1. Apply the unit tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t
=> FAIL: Tests fail! The hook is not implemented so the desired results
don't appear (added fields/subfields).
3. Apply this patch
4. Repeat 2
=> SUCCESS: It works!
5. Run:
  k$ qa -c 2
=> SUCCESS: All green!
6. Sign off :-D

Sponsored-by: Theke Solutions
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>
3 months agoBug 34943: Unit tests
Tomas Cohen Arazi [Fri, 8 Dec 2023 20:23:44 +0000 (17:23 -0300)]
Bug 34943: 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>
3 months agoBug 35457: Move SerialsDefaultEMailAddress and SerialsDefaultReplyTo to serials prefe...
Caroline Cyr La Rose [Fri, 26 Jan 2024 14:48:34 +0000 (09:48 -0500)]
Bug 35457: Move SerialsDefaultEMailAddress and SerialsDefaultReplyTo to serials preferences

This patch moved the SerialsDefaultEMailAddress system preference and
the SerialsDefaultReplyTo system preference to the Serials preferences.

To test:
1. Apply patch
2. Go to Administration > System preferences > Acquisitions
   --> SerialsDefaultEMailAddress and SerialsDefaultReplyTo should not
   be there
3. Go to Administration > System preferences > Serials
   --> There should be a new section called "Notifications" with
   the two system preferences

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 36030: acqui/basket: Do not place hold on deleted biblio
Marcel de Rooy [Thu, 8 Feb 2024 10:42:53 +0000 (10:42 +0000)]
Bug 36030: acqui/basket: Do not place hold on deleted biblio

Trivial fix.

Test plan:
Find a deleted biblio record in ACQ (in active orders part) and
verify that there is no Place hold option on that row.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 34663: Errors in UNIMARC default framework
Caroline Cyr La Rose [Wed, 21 Feb 2024 20:02:17 +0000 (15:02 -0500)]
Bug 34663: Errors in UNIMARC default framework

This patch corrects the default UNIMARC bibliographic framework to
place all the 4XX subfields in tab 4.

To test:
1. Go to Administration > MARC Bibliographic framework test
   --> There should be errors indicating subfields from 4XX fields
       are in tabs 3 and 4
2. Apply patch and reset_all
3. Redo step 1
   --> It should now say that all subfields for each tag are in the
       same tab (or ignored)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 36371: Check if patron attribute is defined in circ-menu.inc
Brendan Lawlor [Fri, 22 Mar 2024 17:25:20 +0000 (17:25 +0000)]
Bug 36371: Check if patron attribute is defined in circ-menu.inc

This patch changes the conditional that determines if a patron attribute is displayed in the patron brief info. Instead of checking the value of the attribute we should check if the attribute is defined.

To test:
1. Create a patron attribute, eg. party_mode, check 'display in patron's brief info' and tie to the YES_NO authorised value.
2. Find a patron and set your attribute to Yes
3. Confirm you see the attribute and its value both in the "Additional attributes and identifiers" section of the patron detail page and in the patron brief info area
4. Set your attribute to No
5. Confirm you see the attribute and its value in "Additional attributes and identifiers" but it no longer shows in the brief info
6. Apply patch and restart_all
7. Notice that your attribute now displays in the brief info, such as Party mode: No
8. Set the attribute to the first empty option
9. Check the patron record brief info to confirm that the attribute does not display when the value is empty.

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>
3 months agoBug 35850: Adjust tests to changed IDs
Katrin Fischer [Mon, 25 Mar 2024 08:29:24 +0000 (08:29 +0000)]
Bug 35850: Adjust tests to changed IDs

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35279: Add fallback to print for 'Send welcome email'
Martin Renvoize [Tue, 7 Nov 2023 14:03:00 +0000 (14:03 +0000)]
Bug 35279: Add fallback to print for 'Send welcome email'

We update the 'Send welcome email' button to read 'Send welcome notice'
and add a fallback to enqueue a notice for print when the user doesn't
have an email address defined.

Test plan
1) Apply patch
2) Use the 'Henry Acevedo' user who doesn't yet have a valid email
   address.
3) Click the 'Send welcome notice' button available from the 'more'
   menu.
4) Note that no notice is queued at all.
5) Copy the content of the 'email' WELCOME notice into the 'print'
   template.
5) Repeat step 3.
6) Note that this time a 'print' type notice is queued for the user.

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>
3 months agoBug 30554: Embelished MARC21 XSLT example
Martin Renvoize [Fri, 26 Jan 2024 12:44:21 +0000 (12:44 +0000)]
Bug 30554: Embelished MARC21 XSLT example

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 30554: Use XSLT (if enabled) in authority search cataloguing plugin
jeremy breuillard [Fri, 15 Apr 2022 14:51:14 +0000 (16:51 +0200)]
Bug 30554: Use XSLT (if enabled) in authority search cataloguing plugin

Test plan:
1. Set AuthorityXSLTResultsDisplay to a valid XSL file (see bug 30554
   attachments, there is an example XSL file)
2. Go to the bibliographic record editor (edit an existing one or create
   a new one)
3. Find a field linked to authorities and open the plugin
4. Start a search and verify that the results are displayed using the
   XSLT output (if using the example file it should be a link saying
   "Authority #<authid>")

Sponsored-by: Écoles nationales supérieure d'architecture (ENSA)
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>
3 months agoBug 35621: Map ÿ to y for searching (Non-ICU)
Nick Clemens [Wed, 20 Dec 2023 19:06:57 +0000 (19:06 +0000)]
Bug 35621: Map Ã¿ to y for searching (Non-ICU)

To test:
1 - Find or add a record with title: Chevilly-Larue, L'Haÿ-les-Roses, Fresnes, Rungis [par] Sté Ã©ditions et de publicité L.F.B.
2 - Search for 'L'Hay-les-Roses'
3 - No results
4 - Apply patch, copy the file:
    sudo cp /kohadevbox/koha/etc/zebradb/etc/word-phrase-utf.chr /etc/koha/zebradb/etc/word-phrase-utf.chr
5 - Restart all, Reindex
    restart_all
    sudo koha-rebuild-zebra -v -f kohadev
6 - Search again
7 - Success!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35850: Use template wrapper for tabs: Header search forms
Owen Leonard [Fri, 19 Jan 2024 12:11:43 +0000 (12:11 +0000)]
Bug 35850: Use template wrapper for tabs: Header search forms

This patch updates search header includes so that the tabs use WRAPPER
to build markup.

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

Test at least one page which uses each updated search include. Search
header tabs should look correct and work correctly.

- Acquisitions
  - Suggestions
- Administration
    - Budgets and funds
    - Cities
    - Currencies
    - Desks
    - Patron categories
    - System preferences
    - Z39.50
- Advanced search
- Authorities
- Bibliographic detail page
- Cataloging home page
- Check in
- Check out
- Acquisitions -> Vendor -> Contracts
- ERM
- Staff interface home page
- Serials
- Tool -> Notices

Signed-off-by: Martin AUBEUT <martin.aubeut@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35576: Add classes to hq-callnumber column in holds report
Lucas Gass [Thu, 14 Dec 2023 22:39:00 +0000 (22:39 +0000)]
Bug 35576: Add classes to hq-callnumber column in holds report

To test:
1. APPLY PATCH
2. Make sure you have item.itemcallnumber data.
3. Have some holds and build the holds queue: perl /kohadevbox/koha/misc/cronjobs/holds/build_holds_queue.pl
4. To make testing easier add the following to IntranetUserCSS:
    .hq-callnumber .location { background: lightblue; }
    .hq-callnumber .itemcallnumber { background: lightgoldenrodyellow; }
5. Run the holds queue and notice that the data in the 'Call number' column has a lightblue (location) and lightgoldenrodyellow (call number) background.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35564: Add homebranch to the holds queue report
Lucas Gass [Wed, 13 Dec 2023 20:58:01 +0000 (20:58 +0000)]
Bug 35564: Add homebranch to the holds queue report

To test:
1 - Place some holds in your system
2 - perl misc/cronjobs/holds/build_holdsqueue.pl
3 - View the holds queue
4 - Note there is no holding branch column
5 - APPLY PATCH
6 - Reload and try again
7 - Note the column is not there
8 - Click column setting gear to expose the column
9 - Go to Admin -> Table settings and make sure you can expose the column via Table settings

Signed-off-by: Michelle <mspinney@clamsnet.org>
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>
3 months agoBug 35034: Add parameter that links titles to their records
Laura Escamilla [Tue, 5 Dec 2023 14:57:58 +0000 (14:57 +0000)]
Bug 35034: Add parameter that links titles to their records

To recreate:
1.  Select two items from the catalog and begin a merge.
2. Notice that the title of the items, their biblionumber and a
   hyperlink to their MARC record is available.
3. Apply the patch and refresh the page. The biblionumber for each title
   is now hyperlinked and leads to the item’s bib records.
4. Sign off and have a great day :)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35444: Add hidden span with information about the loggedinuser categorycode
Lucas Gass [Wed, 29 Nov 2023 23:19:12 +0000 (23:19 +0000)]
Bug 35444: Add hidden span with information about the loggedinuser categorycode

To test:
1. APPLY PATCH
2. Log into the staff interface and use the browser's dev tools to look
   for the HTML class 'loggedincategorycode'. It should match the
   current logged in user's categorycode.
3. You could also use a console.log like so:

console.log( $('.loggedincategorycode').text() );

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 36139: Bug 35518 Follow-up to fix AutoSwitchPatron - clear variables
Michael Hafen [Tue, 20 Feb 2024 21:18:59 +0000 (14:18 -0700)]
Bug 36139: Bug 35518 Follow-up to fix AutoSwitchPatron - clear variables

Bug 35518 moved some code blocks to after the call to
get_user_and_template() so that userenv would be populated before it
was needed.  This caused a couple variables to be set before the
AutoSwitchPatron block could prevent them from being set.  Which broke
AutoSwitchPatron functionality.  This clears two variable so that
AuthSwitchPatron works again.

The AutoSwitchPatron clears the $borrowernumber variable to switch
patrons. With the AuthSwitchPatron block moved, the $patron variable
still gets set, and the patron doesn't get switched.  The clears the
$patron variable too.

Also clear the barcode list.
The AutoSwitchPatron block got moved, and now the @$barcodes variable
gets filled and not cleared.  Leading to a 'Barcode not found' error
when the patron is auto switched.

Test plan:
1. Ensure AutoSwitchPatron is turned on.
2. Select the card number of two patron accounts.
3. Find the first patron in circulation.
4. Enter the second patron's card number in the item barcode field to
   switch patrons.
5. Observe the error about item barcode not existing, and the patron did
   not switch.
6. Apply patch and restart services.
7. Enter the second patron's card number in the item barcode field
   again.
8. Observe that the patron was switched with no error about an invalid
   barcode.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 36331: (follow-up) Ignore non_priority holds when checking renewability
Nick Clemens [Fri, 22 Mar 2024 13:54:03 +0000 (13:54 +0000)]
Bug 36331: (follow-up) Ignore non_priority holds when checking renewability

When changing the fetch of holds, the check for non-priority was lost - added a loop to pull those out
so the totals and checks are correct

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Tidied (tcohen)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35386: DBRev 23.12.00.012
Katrin Fischer [Fri, 22 Mar 2024 13:51:51 +0000 (13:51 +0000)]
Bug 35386: DBRev 23.12.00.012

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35386: Add RESTAPIRenewalBranch system preference
Nick Clemens [Mon, 27 Nov 2023 16:31:41 +0000 (16:31 +0000)]
Bug 35386: Add RESTAPIRenewalBranch system preference

This patch adds a new system prefernce, RESTAPIRenewalBranch, analogous to the existing OpacRenewalBranch system preference.

The preference allows choosing how the renewal branch is recorded in the statistics table.
In order ot preserve existing behaviour, the default is to use the api user's branch.

To test:
1 - Checkout some items to a patron
2 - Add an API user account with circulation permissions and a different homebranch
3 - POST a renewal to: http://localhost:8080/api/v1/checkouts/{checkout_id}/renewal
4 - Check statistics table and confirm the api users branch was used
5 - Apply patches, restart all
6 - Repeat API renewal, confirm same branch used
7 - Change the RESTAPIRenewal syspref
8 - Repeat API renewal and confirm specified branch is used
9 - Confirm the syspref works for all settings

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>
3 months agoBug 35531: Add context for translating gender option "Other"
Katrin Fischer [Sun, 10 Dec 2023 15:45:28 +0000 (15:45 +0000)]
Bug 35531: Add context for translating gender option "Other"

To test:
* Apply patch
* Verify the option "Other" for gender is correctly displayed when:
  * Editing a patron record in the staff interface
  * Viewing the 'Details' tab of a patron in staff interface
  * Triggering a "duplicate" patron warning and looking at the details
    of the existing patron record
  * Self registering a patron in the OPAC
  * Viewing 'Personal details' tab in the OPAC for a registered patron
* If you are using ktd, run: gulp po:update --lang de-DE
* Verify string "gender" appears with the occurences of "Other"and
  "Other:" in
  misc/translator/Koha-messages.pot

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>
3 months agoBug 35097: Use country-list.inc to display choices for UsageStatsCountry preference
Owen Leonard [Wed, 18 Oct 2023 16:00:45 +0000 (16:00 +0000)]
Bug 35097: Use country-list.inc to display choices for UsageStatsCountry preference

This patch updates the system preferences interface so that it uses
country-list.inc for the selection of countries for the
UsageStatsCountry preference.

To test, apply the patch and restart services.

- Go to Administration -> System preferences and search for
  "UsageStatsCountry"
- The dropdown of countries should look correct.
- Select a country, save, and confirm that your choice is saved
  correctly.

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>
3 months agoBug 35316: Fix column settings for holds history
Marcel de Rooy [Mon, 13 Nov 2023 14:26:37 +0000 (14:26 +0000)]
Bug 35316: Fix column settings for holds history

Test plan:
Verify that you are able to toggle the column on the holdshistory
form.
Verify that you are able to hide the column via Table settings
by default.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35316: Add callnumber to holdshistory
Marcel de Rooy [Mon, 13 Nov 2023 10:07:16 +0000 (10:07 +0000)]
Bug 35316: Add callnumber to holdshistory

Test plan:
Verify that column Call number now shows on the form.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 36012: Extend cypress's requestTimeout value
Jonathan Druart [Tue, 12 Mar 2024 10:03:43 +0000 (11:03 +0100)]
Bug 36012: Extend cypress's requestTimeout value

default to 5000 but tests are failing because of slow Jenkins's nodes.
We could try and extend to 10000 (10s) and see if it gets better.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Tests pass with and without the patch on my computer. Tested with:

yarn cypress run --env KOHA_USER=koha,KOHA_PASS=koha \
        --spec t/cypress/integration/ERM/Agreements_spec.ts

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35133: Don't lazily define accessor methods when invoked through SUPER
David Gustafsson [Mon, 23 Oct 2023 15:49:06 +0000 (17:49 +0200)]
Bug 35133: Don't lazily define accessor methods when invoked through SUPER

To test:
  1) Apply Bug 32476
  2) Run tests in t/db_dependent/Patrons.t
  3) This should produce multiple "Subroutine Koha::Patron::SUPER::dateexpiry redefined at ..." warnings
  4) Apply patch
  5) Run tests in t/db_dependent/Patrons.t again
  6) The warnings in 3) should now no longer appear

Signed-off-by: matthias le gac <matthias@babel.inlibro.net>
Signed-off-by: Phan Tung Bui <phan-tung.bui@inlibro.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 34431: (QA follow-up) Fix duplicate backend options
Pedro Amorim [Thu, 31 Aug 2023 08:57:20 +0000 (08:57 +0000)]
Bug 34431: (QA follow-up) Fix duplicate backend options

Prevent adding backend option if the option already exists

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 34431: Add status and status_alias filters to clear
Pedro Amorim [Mon, 7 Aug 2023 10:04:25 +0000 (10:04 +0000)]
Bug 34431: Add status and status_alias filters to clear

Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 34431: Update tests
Pedro Amorim [Fri, 4 Aug 2023 16:06:40 +0000 (16:06 +0000)]
Bug 34431: Update tests

Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 34431: Add a status_alias filter input, if any status_alias exist
Pedro Amorim [Fri, 4 Aug 2023 16:06:11 +0000 (16:06 +0000)]
Bug 34431: Add a status_alias filter input, if any status_alias exist

This patch also makes it so that the status input filter is enabled by default, and shows all existing statuses by default, or all existing statuses for a specific backend, if and when selected.

Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 34431: Show both status and status_alias - if exists - in table column
Pedro Amorim [Fri, 4 Aug 2023 16:02:40 +0000 (16:02 +0000)]
Bug 34431: Show both status and status_alias - if exists - in table column

Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 34431: Allow for x-koha-embed in ill/backends endpoint
Pedro Amorim [Fri, 4 Aug 2023 16:01:33 +0000 (16:01 +0000)]
Bug 34431: Allow for x-koha-embed in ill/backends endpoint

Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 34431: Add 'type' to existing_statuses method
Pedro Amorim [Fri, 28 Jul 2023 09:59:08 +0000 (09:59 +0000)]
Bug 34431: Add 'type' to existing_statuses method

Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35536: (follow-up) Add missing koha_object(s)_class definitions
Tomas Cohen Arazi [Fri, 22 Mar 2024 13:06:29 +0000 (13:06 +0000)]
Bug 35536: (follow-up) Add missing koha_object(s)_class definitions

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 25813: Enhance patron expiration in SIP display
Matthias Meusburger [Tue, 10 Sep 2019 14:59:30 +0000 (16:59 +0200)]
Bug 25813: Enhance patron expiration in SIP display

 Currently, the patron information returned by SIP only shows
 "PATRON EXPIRED" when the patron card has expired.

 This patch makes the display more consistant with the Opac display
 and also complies with the NotifyBorrowerDeparture system preference.

 Test plan:

  - apply the patch

  - set NotifyBorrowerDeparture to 0

  - check that nothing is ever displayed about the card expiration

  - set NotifyBorrowerDeparture to a value greater than 0

  - check that the following message will be displayed for a card that will
    expire within NotifyBorrowerDeparture days:
    "Your card will expire on {correctly formatted date}"

  - check that the following message will be displayed for a card that has
    expired:
    "Your account has expired as of {correctly formatted date}"

 You can use src/C4/SIP/interactive_patron_dump.pl for easier testing.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35793: Remove now obsolete unit test file
Katrin Fischer [Fri, 22 Mar 2024 12:53:26 +0000 (12:53 +0000)]
Bug 35793: Remove now obsolete unit test file

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35943: Fix group/subgroup filtering of saved reports
Julian Maurice [Tue, 30 Jan 2024 14:13:47 +0000 (15:13 +0100)]
Bug 35943: Fix group/subgroup filtering of saved reports

Use code instead of name for filtering and escape regexp special
characters.

This patch also disables datatables' smart filtering as it is not
recommended to use with regexp filtering

https://datatables.net/reference/api/search()

Test plan:
1. Create a report in a group named "Foo + Bar" and in a subgroup named
   "Baz + Quux"
2. Create other reports in group "Foo + Bar" but in other subgroups, as
   well as in other groups. This is useful to see the effect of
   filtering
3. Go to the saved reports page and verify that navigating between tabs
   have the desired result. Same for the subgroup select

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>
3 months agoBug 35790: Remove Koha::Template::Plugin::Biblio::CanArticleRequest
Jonathan Druart [Fri, 12 Jan 2024 13:42:46 +0000 (14:42 +0100)]
Bug 35790: Remove Koha::Template::Plugin::Biblio::CanArticleRequest

It is no longer used anywhere.

Test plan:
  % git grep CanArticleRequest
should not return any results

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35793: Remove Koha::Template::Plugin::Cache
Jonathan Druart [Fri, 12 Jan 2024 14:39:35 +0000 (15:39 +0100)]
Bug 35793: Remove Koha::Template::Plugin::Cache

Introduced in 2011 by bug 7387 but has never been used.
Removing it.

Test plan:
 git grep Cache **/*.tt **/*.inc
should not return relevant results.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35789: Remove Koha::Template::Plugin::Biblio::ArticleRequestsActiveCount
Jonathan Druart [Fri, 12 Jan 2024 13:34:18 +0000 (14:34 +0100)]
Bug 35789: Remove Koha::Template::Plugin::Biblio::ArticleRequestsActiveCount

Can be replaced with biblio.article_requests.filter_by_current.count

Test plan:
Turn on article requests (syspref + circ rule)
Request an article (detail page of a bib record)
On the left you see "Article requests" tab with the number of current
article requests.

It should show the correct number (same as before this patch).

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35548: Test KitchenSink plugin
Marcel de Rooy [Thu, 14 Dec 2023 12:25:23 +0000 (12:25 +0000)]
Bug 35548: Test KitchenSink plugin

Removed from Plugins.t on bug 35507.
Restoring it here on its own.
Simplified a bit.

NOTE: The CREATE IF NOT EXISTS seems to commit even when the
table already exists. Therefore mocking install too.

Test plan:
Check number of records in plugin_data/methods.
Run t/db_dependent/Koha/Plugins/KitchenSink.t
Check again number of records in plugin_data/methods. Same?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35768: Show 'Used in' records link for results in cataloguing authority plugin...
Aleisha Amohia [Fri, 5 Mar 2021 01:05:09 +0000 (14:05 +1300)]
Bug 35768: Show 'Used in' records link for results in cataloguing authority plugin search

To test:

1. Edit a biblio record
2. Go to the 100 tab and click the plugin launcher icon for an author
   tag i.e. next to 100$a
3. Search for an authority and observe the results
4. Notice that the number of times this authority has been "Used" in a
   record is now a link, and clicking it does a search showing those
   records.

Sponsored-by: Education Services Australia SCIS
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35857: Update authority search pop-up windows with consistent footer markup
Owen Leonard [Fri, 26 Jan 2024 18:35:50 +0000 (18:35 +0000)]
Bug 35857: Update authority search pop-up windows with consistent footer markup

This patch updates the cataloging authority finder template in order to
style submission and close buttons in a fixed footer at the bottom of
the pop-up window, with markup consistent with other pop-up windows.

Some inline CSS has been removed in favor of styling the "Clear" button
like a default button. Unrelated, "No results found" message has been
wrapped in a "dialog message" div for consistency's sake.

To test, apply the patch and go to Cataloging -> New record.

- In the "Add MARC record" form, locate a tag which is linked to an
  authority type, e.g. 100$a.
- Click the icon to the right of the field to trigger the authority
  search window.
- There should be a fixed footer in the pop-up window with buttons for
  "Submit," "Clear form," and "Close window." Test that each behave
  correctly.
  - The search results view should have the same footer.
  - Clicking "Choose" from the search results should close the window
    and populate the MARC tag with the correct authority data.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35536: Remove last two references to resultset PluginData
Marcel de Rooy [Tue, 19 Dec 2023 15:29:35 +0000 (15:29 +0000)]
Bug 35536: Remove last two references to resultset PluginData

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

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35536: Silence tests when run from koha-qa.pl
Marcel de Rooy [Tue, 19 Dec 2023 14:59:36 +0000 (14:59 +0000)]
Bug 35536: Silence tests when run from koha-qa.pl

Extending the regex in Plugins::_verbose.

Test plan:
Run qa tools on patch set.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35536: Refine verbose handling in some Koha::Plugins calls
Marcel de Rooy [Mon, 18 Dec 2023 08:52:20 +0000 (08:52 +0000)]
Bug 35536: Refine verbose handling in some Koha::Plugins calls

Three routines in Plugins got the verbose parameter on 35507.
We can refine this a bit further.
The idea here is report when you are installing plugins but not
report when just calling plugins (flooding logs).

[1] GetPlugins: Most callers do not expect (or check) results for
    failing plugins. This patch makes GetPlugins only return
    errors when passing the *errors* flag (in 2 cases).
    [a] The misc/devel script prints warnings now using verbose,
        so does not need the errors flag anymore.
    [b] plugins/plugins-home is the only case left. Tiny adjustment
        to keep current behavior. Fixed colspan in template.
        Does not need verbose in favor of 'errors' (passed to
        template).
    [c] For most calls we do not want verbose. New default is 0.

[2] InstallPlugins
    [a] Disabled verbose in plugin-upload. Not really needed.
        Added a FIXME; we need to improve individual install.
    [b] misc/devel: No warnings anymore when calling InstallPlugins
        after GetPlugins.

[3] get_enabled_plugins
    [a] Plugins->call does not need verbose.
    [b] Plugins->feature_enabled does not need it too.

Test plan:

[1] See previous plan. With TestMR data but without patch, run
misc script and go to plugins-home. Do you see load errors on
commandline or form?

[2] Run plugins/plugins-upload (uploading just some file is good
enough); verify that you do not see TestMR lines in logfile.

[3] Run t/db_dependent/Koha/Plugins/Plugins.t for the additional
test on verbose and errors flag.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35536: Reorder rollbacks
Marcel de Rooy [Thu, 14 Dec 2023 07:54:22 +0000 (07:54 +0000)]
Bug 35536: Reorder rollbacks

Time to move all RemovePlugins calls BEFORE rollbacks.
Broken.t did not even include a transaction! Some modules
are removed there as well.

Test plan:
Search for wrong order with:
  grep -Pzo "txn_rollback;\n.*RemovePlugins" $(git grep -l RemovePlugins)
  No occurrences left? Think of another grep :)
Check number of records in plugin_data/methods.
Repeat: prove $(git grep -l Koha::Plugin | grep -P "^t\/db")
And check number of records again. Same?

Bonus: Apply TestMR plugin patch (marked DO NOT PUSH).
Run perl -MKoha::Plugins -e"Koha::Plugins->new->InstallPlugins".
Check plugin records in database.
Keep those records but remove last patch from git.
Run previous prove and verify no data changes since last check.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35536: Add RemovePlugins calls in plugin unit tests
Marcel de Rooy [Thu, 14 Dec 2023 08:02:01 +0000 (08:02 +0000)]
Bug 35536: Add RemovePlugins calls in plugin unit tests

[1] Replace Methods->delete by RemovePlugins.
    git grep -l "Plugins::Methods->delete" | xargs sed -i -e's/Plugins::Methods->delete/Plugins->RemovePlugins/g'
[2] Replace $schema->resultset('PluginData')->delete by destructive parameter.
[3] Add RemovePlugins too in Handler->delete too. Note that this call
    might be better off with disable? Added a comment.

Test plan:
prove $(git grep -l Koha::Plugin | grep -P "^t\/db")

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35536: Add Koha::Plugins->RemovePlugins class method
Marcel de Rooy [Wed, 13 Dec 2023 15:12:30 +0000 (15:12 +0000)]
Bug 35536: Add Koha::Plugins->RemovePlugins class method

Test plan:
Run t/db_dependent/Koha/Plugins/Plugins.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: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35536: Add Koha object classes for plugin_data
Marcel de Rooy [Wed, 13 Dec 2023 15:03:39 +0000 (15:03 +0000)]
Bug 35536: Add Koha object classes for plugin_data

Test plan:
Read the patch.
The objects will be used in subsequent patches, and tested there.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35536: Reorganize Plugins.t
Marcel de Rooy [Wed, 13 Dec 2023 15:20:19 +0000 (15:20 +0000)]
Bug 35536: Reorganize Plugins.t

Move stuff in the middle into new subtest.
Add transaction around second set of subtests.

Test plan:
t/db_dependent/Koha/Plugins/Plugins.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: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 36397: Quick fix for Koha/Plugins/authority_hooks.t
Marcel de Rooy [Fri, 22 Mar 2024 09:48:14 +0000 (09:48 +0000)]
Bug 36397: Quick fix for Koha/Plugins/authority_hooks.t

Lazy approach for now: just ignore the other warnings that are
logical when passing blank records to SearchEngine. Elastic is
a bit more sensitive than Zebra here..

Test plan:
Run t/db_dependent/Koha/Plugins/authority_hooks.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 18885: Specify due date behavior according to on-site checkbox
Thibaud Guillot [Tue, 31 Oct 2023 12:57:00 +0000 (13:57 +0100)]
Bug 18885: Specify due date behavior according to on-site checkbox

When a on-site checkout is performed a date is automatically added but
if you unchecked the date remains. Even with OnSiteCheckoutAutoCheck
syspref

Test plan:
1) Do an on-site checkout by clicking on checkbox and see date added
2) Unchecked and see that the date remains on input
3) Do another test with OnSiteCheckoutAutoCheck enabled
4) Apply this patch and repeat actions

Normally now its works correctly

Signed-off-by: tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 36331: Don't check reserves that an item cannot fill when checking if it can...
Nick Clemens [Fri, 15 Mar 2024 13:45:58 +0000 (13:45 +0000)]
Bug 36331: Don't check reserves that an item cannot fill when checking if it can be renewed

Before this patch we get all holds on a record and see if we can fill them with available items.
This means we check to fill holds that the item in questoion may not be able to fill, especially
in the case where no holds are allowed on the item type, this is wrong

To test:
1 - Find or create a biblio with two items of different item types
2 - Make sure one item type allows holds, and the other has:
    "Default holds policy by item type"
    Set to "No holds allowed"
3 - Set system preference "AllowRenewalIfOtherItemsAvailable" to "Don't allow"
4 - Check out the unholdable item to a patron
5 - Set a hold for a different patron on the next available item
6 - Confirm the checked out item can be renewed (don't renew, just view the checkouts page)
7 - Checkout the other item to a third patron
8 - Confirm the first item can still be renewed
9 - Set system preference "AllowRenewalIfOtherItemsAvailable" to "Allow"
10 - Confirm the item cannot be renewed now
11 - Apply patch, restart all
12 - Confirm the item can be renewed
13 - Set the item type to a type that allows holds
14 - Confirm the item can no longer be renewed
15 - Restore the item type
16 - Set system preference "AllowRenewalIfOtherItemsAvailable" to "Don't allow"
17 - Confirm the item can be renewed
18 - Check in the item from the third patron
19 - Confirm the item can still be renewed
20 - prove -v t/db_dependent/Circulation.t - test still pass

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 36326: Fix batch item mod/del access from biblio detail page
Jonathan Druart [Fri, 15 Mar 2024 12:51:02 +0000 (13:51 +0100)]
Bug 36326: Fix batch item mod/del access from biblio detail page

Allow both $op eq "show" and "cud-show".
We need to keep the POST when we upload a file, but we can simply allow
GET with "show".

Test plan:
Go to the biblio detail page, select an item and test both tools via the links
"Delete selected items" and "Modify selected items"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35783: DBRev 23.12.00.011
Katrin Fischer [Fri, 22 Mar 2024 09:29:10 +0000 (09:29 +0000)]
Bug 35783: DBRev 23.12.00.011

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35783: Replace TT plugin's method Biblio::RecallsCount
Jonathan Druart [Fri, 12 Jan 2024 08:41:21 +0000 (09:41 +0100)]
Bug 35783: Replace TT plugin's method Biblio::RecallsCount

We can use biblio.recalls.search( completed => 0 ).count instead.

Test plan:
1. Go to the biblio detail view, click on the different entries in the menu
on the left. Confirm that the "Recalls" tab always has the correct number
of current recalls display in the parenthesis.

2. Run a search and confirm that the number of current recalls are still displayed
for each result.

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>
3 months agoBug 35062: Add class plugin-blocks-submit in addbiblio
Marcel de Rooy [Mon, 16 Oct 2023 10:08:25 +0000 (12:08 +0200)]
Bug 35062: Add class plugin-blocks-submit in addbiblio

Adding this condition in Check() allows you to prevent form submittal
during e.g. an ajax call in a framework plugin.
The plugin adds and removes the class on the corresponding html
element during processing.

Test plan:
Since we do not have a plugin using this class yet, nothing changes now.
Verify that you can still click Save in addbiblio while using standard
plugins. In other words: no change in behavior.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
3 months agoBug 35638: Upgrade Enquire JS library from v2.0.1 to v2.1.6
Owen Leonard [Fri, 22 Dec 2023 12:28:38 +0000 (12:28 +0000)]
Bug 35638: Upgrade Enquire JS library from v2.0.1 to v2.1.6

This patch upgrades enquire.js in the OPAC to the latest version,
v.2.1.6. The patch also moves the file (enquire.min.js) into its own
directory for consistency's sake.

Enquire.js lets us use CSS-like "breakpoints" to trigger JS actions. We
use it to in "mobile" views (narrower browser widths): Collapsing the
facets menu and triggering automatic scroll to "main content."

The patch also removes media.match.js which should have been removed in
Bug 29960. At that time Enquire.js required that we used Modernizr to
load media.match.js as a polyfill for older browsers.

To test, apply the patch and clear your browser cache if necessary.

- In the OPAC, perform a catalog search which will return results.
- At wider browser widths the facets menu will appear in the left-hand
  sidebar.
- When you narrow your browser until the viewport is less than 992
  pixels wide* the facets menu should collapse into a "Refine your
  search" button above the search results.
- If you narrow your browser width to below 600 pixels wide and reload
  the search results page, the browser should automatically scroll down
  so that the "Your search..." heading is at the top of the viewport.

* Use Firefox's Responsive Design Mode to get pixel-level control over
  viewport width: https://firefox-source-docs.mozilla.org/devtools-user/responsive_design_mode/
  In Chrome it's called "Device Mode."

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>
3 months agoBug 35640: Upgrade FileSaver JS library to v2.0.4
Owen Leonard [Fri, 22 Dec 2023 13:19:15 +0000 (13:19 +0000)]
Bug 35640: Upgrade FileSaver JS library to v2.0.4

This patch upgrades filesaver.js from an unknown version added in 2015
to v2.0.4 which was released in 2020. The patch also moves the asset to
its own directory for consistency's sake.

To test, apply the patch and clear your browser cache if necessary.

- Locate a bibliographic record in the staff interface and edit it.
- Switch to the advanced editor.
- Click the dropdown menu next to the "Save to catalog" button, and test
  both the "Save as MARC" and "Save as MARCXML" controls.
- In both cases the record should be downloaded correctly.

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>
3 months agoBug 35642: Upgrade Font Face Observer library from v2.0.3 to v2.3.0
Owen Leonard [Fri, 22 Dec 2023 15:15:20 +0000 (15:15 +0000)]
Bug 35642: Upgrade Font Face Observer library from v2.0.3 to v2.3.0

This patch upgrades the Font Face Observer library from v2.0.3 to the
latest release, v2.3.0. The file is moved to its own directory for
consistency's sake.

To test, apply the patch and clear your browser cache.

- Load any page in the OPAC.
- The custom font we supply for the OPAC (Noto Sans) should load
  correctly.
- If you want to see more about the functionality of the library, use
  your browser's developer tools to simulate a slow connection.
  - The page should load with a default sans-serif font first, and then
    the downloaded font will be applied.
  Note: If you throttle your connection speed *too* much, the loading of
  the custom font will time out and you'll only see the default
  sans-serif font.

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>
3 months agoBug 35540: Separate StaffListsHome block from the table block
Owen Leonard [Mon, 18 Dec 2023 18:39:36 +0000 (18:39 +0000)]
Bug 35540: Separate StaffListsHome block from the table block

This patch makes some minor changes to template markup and CSS so that
"page-section" divs have consistent margins.

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

- Go to Tools -> HTML customizations and create a new entry in
  StaffListsHome, StaffPatronsHome, and StaffPOSHome regions.
- Confirm that those customizations are displayed well on each of those
  corresponding pages: The lists home page, the patrons home page, and
  the Point of Sale home page.
- Confirm that other pages affected by the CSS change still display
  correctly. These pages have an added bottom margin on the main
  "container" of content. For example:
  - Patrons -> Patron search results
  - Catalog -> Catalog search results (especially results with multiple
    pages)
  - Circulation -> Circulation history
  - Reports -> Saved SQL reports

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35633: (follow-up) Custom style updates
Owen Leonard [Thu, 21 Dec 2023 19:07:00 +0000 (19:07 +0000)]
Bug 35633: (follow-up) Custom style updates

This patch adds custom CSS to the OPAC and staff interface to override
the default style of Chocolat controls (for left arrow, right arrow,
loading, and close window). These controls are given a green color
matching Koha's color scheme.

The bibliographic detail pages in the OPAC and staff interface have been
revised so that the inclusion of Chocolat CSS comes before the inclusion
of Koha's global CSS. We should do this with third-party CSS so that it
can be more easily overridden by ours.

The patch also makes a minor change to chocolat.js to correct a bug. See
commit 6ac89ca8558.

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

- Go to Administration -> System preferences and enable the
  AllowMultipleCovers, OPACLocalCoverImages, and LocalCoverImages
  system preferences.
- Add a local cover image to a bibliographic record:
  - Locate a bibliographic record.
  - From the detail page, click the "Images" tab and then "Upload."
  - Upload an image to attach to the record.
  - Upload another image.
- Return to the bibliographic detail page fro that record, and click the
  image you uploaded.
  - The full-page image viewer should appear, and the controls should
    look correct, with green matching Koha's color scheme:
    - The close button in the upper-right
    - The right-arrow, and then when you click through to the second
      image, the left-arrow.
    - In the footer, the "edit" link should work correctly.
    - Test that the "Full screen" control works too.
- Click the "OPAC view" link to load the record in the OPAC, and perform
  the same tests.

Signed-off-by: Phan Tung Bui <phan-tung.bui@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 35633: Upgrade Chocolat JS library from v1.1.0 to v1.1.2
Owen Leonard [Thu, 21 Dec 2023 19:04:47 +0000 (19:04 +0000)]
Bug 35633: Upgrade Chocolat JS library from v1.1.0 to v1.1.2

This patch updates Chocolat JS library assets from v1.1.0 to v1.1.2 in
both the OPAC and staff interface. The new version uses SVG images
encoded as data-uris in CSS, so default images can now be overridden in
our CSS. For that reason the Chocolat-related images files are removed
by this patch.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 27291: Reformat Zebra output logs
David Cook [Tue, 22 Dec 2020 00:15:02 +0000 (00:15 +0000)]
Bug 27291: Reformat Zebra output logs

This patch changes the Zebra output log time format from
the default "hh:mm:ss-DD/MM" to the more standard ISO 8601
"%FT%T".

This change makes the logs easier to read for both
humans and machines. One benefit includes easy searching
and sorting.

Test plan:

1. cp debian/scripts/koha-zebra /usr/sbin/koha-zebra
2. koha-zebra --stop kohadev
3. koha-zebra --start kohadev
4. ps -efww | grep "zebrasrv"
5. Note "-m %FT%T" in the grep output
6. tail -f /var/log/koha/kohadev/zebra-output.log
7. Run a few searches like http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=ccl%3Dargawarga%3D1 or http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=e
8. Note that the timestamp in the Zebra log is formatted "2020-12-22T00:13:42" instead of like "00:13:42-22/12"

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>
3 months agoBug 30349: Add missing double dash (--delete) to POD
Jonathan Druart [Fri, 12 Jan 2024 10:06:48 +0000 (11:06 +0100)]
Bug 30349: Add missing double dash (--delete) to POD

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 30349: More double dashes
David Schmidt [Thu, 24 Mar 2022 12:02:16 +0000 (13:02 +0100)]
Bug 30349: More double dashes

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
3 months agoBug 30349: Use double dash for multi character option names
David Schmidt [Thu, 24 Mar 2022 11:33:43 +0000 (12:33 +0100)]
Bug 30349: Use double dash for multi character option names

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