Commit graph

22600 commits

Author SHA1 Message Date
df2cad62b0
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>
2024-03-22 10:35:29 +01:00
04624f4433
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>
2024-03-22 10:35:28 +01:00
59b940300c
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>
2024-03-22 10:35:27 +01:00
9cb286e36d
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>
2024-03-22 10:35:27 +01:00
336e85c6ac
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>
2024-03-22 10:35:26 +01:00
68c3a802fc
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 6ac89ca855.

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>
2024-03-22 10:35:26 +01:00
f4960ac233
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>
2024-03-22 10:35:25 +01:00
354be012b0
Bug 36327: Update handling of item delete
This needs to be rewritten to .on('click') because the delete item link relevant to this patchset is appended to the dom, this is how we guarantee this event listener is attached to the appended link.
This also ensures the same item deletion logic is applied for both button: The delete button from the left 'Actions' dropdown and the 'Delete item' link that pops up when anywhere in the row is clicked

1) visit a biblio details view:
http://localhost:8081/cgi-bin/koha/cataloguing/additem.pl?biblionumber=230
2) Click anywhere on one of the items rows
3) Notice 2 actions show up "Edit item" and "Delete item"
4) Click "delete item"
5) Notice nothing happens in the UI
6) Notice console throws the following error:
cataloging_additem_23.1200007.js:29 Uncaught ReferenceError: confirm_deletion is not defined
    at HTMLAnchorElement.<anonymous> (cataloging_additem_23.1200007.js:29:17)
    at HTMLAnchorElement.dispatch (jquery-3.6.0.min_23.1200007.js:2:43064)
    at v.handle (jquery-3.6.0.min_23.1200007.js:2:41048)
7) Apply patches
8) Notice console error no longer shows
9) Notice delete confirmation is shown, notice clicking it deletes the correct item.
10) Notice the delete item link anywhere in the item row has the same behavior as the 'Delete' option under 'Actions' on the leftmost column of the table

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-20 18:39:45 +01:00
ce902285d2
Bug 36327: Delete link is no longer a GET href
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-20 18:39:45 +01:00
955218e55a
Bug 36327: Clean-up old unused code that results in error
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-20 18:39:44 +01:00
7bcd1203fd
Bug 36327: Preparation: Update form
Each delete form now contains the itemnumber to better unambiguosly identify the the itemnumber it refers to
The delete button now carries the itemnumber it refers to

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-20 18:39:44 +01:00
14b6580e14
Bug 36351: Pretty the api-client
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-20 18:39:43 +01:00
99911f462a
Bug 36351: Adjust saveRecord and _fromXMLStruct
Using the new API Client means we need to handle some calls differently.
the http-client is returning only the response, not the text, so we need to handle getting this out
with a new async function (or promises, but this works)

We also need to adjust _fromXMLStruct as we have reduced the levels in the response by the time it is called

This now adds a new 'update' function to the cataloguing client as well.

Eventually, this should all be using the REST API, but I think for now handling the non-standard responses gets it
working again

To test:
To test:
1 - Browse to Cataloguing->Advanced editor
2 - New Record
3 - Enter values and save - confirm it works
4 - Confirm url now ends in : editor.pl#catalog/{biblionumber} and not editor.pl#new
5 - Save the record again, confirm biblio is updated and not saved as new

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-20 18:39:43 +01:00
73179f9b04
Bug 36351: Fix http-client when response is not JSON
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-20 18:39:42 +01:00
0cbc99a373
Bug 36351: Add CSRF tokens to advanced cataloguing editor POST requests
The editor uses ajax post requests to SVC api.
Becuase these apis are XML based requests, they must be handled in the simplest way, by
embedding the token as a header

To test:
1 - Browse to Cataloguing->Advanced editor
2 - Fill out needed values and save
3 - 403 error
4 - Apply patch
5 - Reload and try agian, success!
6 - Edit and save again, success!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-20 18:39:42 +01:00
34a3c3b8f6
Bug 36302: Get rid of defer_loading in patron-search
Same test plan as the other patch, behavior is expected to be the same on both

But this alternative removes technical debt, whereas the other patch adds.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-20 18:39:41 +01:00
Shi Yao Wang
fa444f549d
Bug 34668: pass whole waiting_holds rs
Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-19 18:09:05 +01:00
Shi Yao Wang
0c8544f348
Bug 34668: remove binding/unbinding event for one submit event
Signed-off-by: Mia Kujala <mia.kujala@xamk.fi>
Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-19 18:09:05 +01:00
Shi Yao Wang
92c17fc3cd
Bug 34668: Add popup warn librarians of waiting holds when checking out
When there are holds waiting for patrons, sometimes the librarian misses
the "Holds waiting here" display. This patch adds a modal popup warning
when checking out an item for a patron with waiting holds.

Test plan:
1) find a user (user1)
2) find a biblio (biblio1)
3) add a hold for biblio1 to user1
   (search biblio1 > Holds > find user1 > Place hold)
4) checkout biblio1 to another user if not already checked out
   and checkin through circulation page (not through the user page)
   > confirm hold
5) there should be a "Holds waiting here (1)" section added on user1 page

6) checkout any items that isn't the one on hold for user1
   -> notice it just checks out as normal
7) apply patch and update database
8) go to administration > system preferences > switch "WaitingNotifyAtCheckout" to "Notify"
9) refresh page and redo step 6
   -> notice there is now a modal to warn the librarian of a waiting hold
   click Ok to proceed with the checkout, click outside the modal to not do anything
10) additionnally, the popup shouldn't appear if we checkout any of
    user1's waiting hold

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Mia Kujala <mia.kujala@xamk.fi>
Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-19 18:09:04 +01:00
75275ec291
Bug 35328: Add a notes pop-up for authority records to authority search results
This enhancement makes authority record notes (6xx) more accessible in a special Notes pop-up, available in all authority search result lists.

To test:
1) In the staff interface, go to the Authorities module and conduct a search. Any records with 6xx fields should show with an italicised Notes link under the heading. Click on the Notes link for each record and confirm the correct notes for that record show.
2) Test this in the following staff interface pages:
- authority plugin when cataloguing a biblio record
- batch authority record modification
- batch authority record deletion
3) Test the Notes pop-up is available in the OPAC authority search
4) Confirm the Notes link does NOT show if there is no 6xx field in the record

Sponsored-by: Education Services Australia SCIS
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-19 18:09:04 +01:00
63b61e34b3
Bug 36358: Fix typo in errorpage.tt: requets
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-19 18:09:03 +01:00
28e5e49790
Bug 27595: Add new system preference PlaceHoldsOnOrdersFromSuggestions
Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-19 10:25:02 +01:00
David Gustafsson
a3beaa24fa
Bug 25539: Enable bulkmarcimport overlay context
Signed-off-by: Michał Kula <148193449+mkibp@users.noreply.github.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-18 18:03:41 +01:00
2998254f1c
Bug 31988: Remove reports/itemtypes.plugin
This "plugin system" is only used for the itemtypes report. We can
simply remove the reports/manager.pl script and this plugin in favor of
a dedicated report.

Test plan:
Same behaviour expected before and after this patch

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-18 18:03:39 +01:00
45305fe2cb
Bug 36334: (follow-up) Restore selection of previous values in sidebar
Before and after the first patch the values for category and library were not populated

To test:
1 - With nothing applied search in the top bar, clicking the 'settings' button
2 - Select a search field, search type, category, and library
3 - Perform search, note only search field and search type are populated
4 - Apply first path, repeat, same result
5 - Apply this patch, repeat
6 - Confirm all four fields now populate in sidebar

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-18 18:03:39 +01:00
41254a1b64
Bug 36334: Remove unnecessary JS code from member.tt
This was initially written to set the input/select in the form in the
left side of the main patron search page.

But this is now done in patron-search.inc:
koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc:
  <input type="text" class="search_patron_filter" value="[% search_filter | html %]" class="focus" />

I don't see how/when this code is still used.

Additionally:
 #searchmember_filter
 => does not exist, it's .search_patron_filter

 $("searchfieldstype_filter").val("[% searchfieldstype | html %]");
 => Not a valid selector

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-18 18:03:38 +01:00
1e295fac47
Bug 35643: Upgrade HC Sticky library from v2.2.3 to v2.2.7
This patch upgrades the HC Sticky library in the OPAC and staff
interface to the latest version, 2.2.7. The file is moved to its own
directory for consistency's sake.

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

Test pages in the OPAC and staff interface which use the "sticky"
heading feature. As you scroll down the header should "stick" to the top
of the viewport. For example:

- Administration -> System preferences
- Catalog -> Search results
- Cataloging -> Basic MARC editor
- Patrons -> Add or edit patron
- Lists -> List contents

In the OPAC:

- Catalog search results
- Lists -> List contents

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-18 11:03:48 +01:00
4a6cf13021
Bug 33171: Add coded_location_qualifier, barcode, and enumchron to MarcItemFieldsToOrder
Some libraries would like to use the following item fields with the MarcItemFieldsToOrder system preference:
* coded_location_qualifier
* barcode
* enumchron

Test Plan:
1) Set up MarcItemFieldsToOrder, verify it is functioning
2) Test coded_location_qualifier, barcode, and enumchron
3) Note the fields are imported and set for the items

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-18 11:03:36 +01:00
bb6ce70399
Bug 35331: (QA follow-up): Patron ILL history
With the previous patches applied and successfull test plans, access the users ILL history page, visit:
/cgi-bin/koha/members/ill-requests.pl?borrowernumber=51

Notice you get an error.
Apply this patch, and try again, notice the error is gone and the custom plugin action is also in the patron's ILL history table

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>
2024-03-18 11:03:35 +01:00
d337541353
Bug 35331: Add table actions hook to ILL table
Test plan, k-t-d, apply patches:
1) Install FreeForm backend, enable ILLModule sys pref, run:
   bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Navigate to ILL requests, visit:
   /cgi-bin/koha/ill/ill-requests.pl
3) Click '+New ILL request', select a type, enter an existing cardnumber (e.g. '42') and pick a library. Click 'Create'.
4) Visit ILL requests again, repeat 2)
5) Notice the row for the created request has the already existing action button 'Manage request'
6) Install the ILL actions plugin, located at:
   https://github.com/PTFS-Europe/koha-plugin-ill-actions/releases/tag/v1.0.0
7) Restart plack, run:
   koha-plack --restart kohadev
8) Repeat 4) and 5). Notice the row for the created request now has a new custom action in addition to the already existing core one.

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>
2024-03-18 11:03:33 +01:00
Emily-Rose Francoeur
d94bf8a5d5
Bug 26597: Update the description of the PrefillGuaranteeField system preference
I updated the system preference description so that we now know this option is working from both the guarantee and guarantor forms.

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-18 11:03:33 +01:00
Hammat Wele
ab61a934a4
Bug 26597: (QA follow-up) Add missing filters
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-18 11:03:32 +01:00
Hammat Wele
9ee8d21b26
Bug 26597: (Fix) remove REST API call and retrieve the patron's data from borrower_data input
This patch remove the REST API call in select_user function and retrieve the patron's data from borrower_data

To test:
1) Apply patch
2) Search PrefillGuaranteeField preference and make sure some fields are selected
3) Select a user that can have a guarantor
4) In the edit form, click on "Search to add" in "Patron guarantor" fieldset
5) Choose a patron who has at least one of the fields in 1) set
6) Click Select
7) Confirm guarantee's information is filled from the guarantor's record
8) Check that any preexisting information is not overwritten

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-18 11:03:32 +01:00
Hammat Wele
0b789bbc96
Bug 26597: (follow-up) Add disabling / enabled the save button while waiting from api to respond
I've updated the test plan since the REST API route takes a little time to respond

To test:
1) Apply patch
2) Search PrefillGuaranteeField preference and make sure some fields are selected
3) Select a user that can have a guarantor
4) In the edit form, click on "Search to add" in "Patron guarantor" fieldset
5) Choose a patron who has at least one of the fields in 1) set
6) Click Select
7) Wait until save button is enabled
8) Confirm guarantee's information is filled from the guarantor's record
9) Check that any preexisting information is not overwritten

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-18 11:03:31 +01:00
Hammat Wele
b9e4b88d32
Bug 26597: Fixing the populate of fields when using the REST API route
This attachment correct the populate of fields by using the api mapping.
Now All fields are populated following the selected PrefillGuaranteeField options

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-18 11:03:31 +01:00
Hammat Wele
d3822c7d86
Bug 26597: Transfer informations from guarantor when adding a guarantor to an existing patron
When creating a new guarantee from the guarantor, the preference PrefillGuaranteeField dictates some fields to be transfered from guarantor to guarantee. This patch makes it so those informations are also transfered when adding a new guarantor relationship to an existing patron.

To test:
1) Apply patch
2) Search PrefillGuaranteeField preference and make sure some fields are selected
3) Select a user that can have a guarantor
4) In the edit form, click on 'Search to add' in 'Patron guarantor' fieldset
5) Choose a patron who has at least one of the fields in 1) set
6) Click 'Select'
7) Confirm guarantee's information is filled from the guarantor's record
8) Check that any preexisting information is not overwritten

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-18 11:03:30 +01:00
2cbf174897
Bug 35944: Add link to 'booked' biblio in checkouts table
This patch updates the checkouts table so handle 'booked' items
including linking to the biblio booking details page.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-15 15:39:13 +01:00
Emily Lamancusa
687963b016
Bug 35934: Correct missed case of switching items.transfer to transfer in detail.tt
To test:
1. Put an item with no holds/recalls in transit (manually or by checking
  it in at a branch other than its homebranch to trigger a ReturnToHome)
2. Go to the item's bib record
--> Note that the item's status will display as something like,
    "In transit from X to Y since 01/29/2024 Available"
3. Apply patch and refresh the page
--> Note that item now shows only the transit status, but not "Available"

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-15 15:39:10 +01:00
e07c6d0729
Bug 36224: Remove unused spsuggest from templates
To test:
-APPLY PATCH
-Review the OPAC results and staff interface results pages.
-Nothing should change, it would be impossible to end up inside of the [% IF koha_spsuggest %] condition because there is nothing like that in the scripts!

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>
2024-03-15 15:39:09 +01:00
Laura Escamilla
e2d54b1279
Bug 36292: Fixed 'See all charges' hyperlink for guarantees/guarantor linked charges
To test:
1. Add a guarantee / guarantor relationship for two patrons.
2. Add a manual fee to the guarantees' account.
3. Go to the guarantor's account and view the 'Details' tab. Under contact information there should be a Guarantees section. There you will see the charges for your guarantee. Click on ‘See all charges’. The link leads you no where.
4. Apply the patch and restart_all
5. Refresh the guarantor’s page and click on ‘See all charges’ again. This time it will take you down to the ‘Guarantees’ Charges’ panel.
6. Sign off and have a great day! :D

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>
2024-03-15 15:39:09 +01:00
3c0ac4cb9a
Bug 36298: In patrons search fix road type with authorized value
In new patrons search via API, the road type code is displayed in patron address instead of authorized value description.

Also road type is missing a space separator in DE and FR format.

Test plan :
1) Create two entries in authorized value category "ROADTYPE" :
   R1 "Road"
   R2 "Street"
2) Edit a patron (ie Delgado, Floyd) to set road type to "Road"
3) Perform a search on patrons (click on letter D)
4) Check you see in address "Road" and not "R1"
5) Edit authorized value category "ROADTYPE" to delete entry "R1"
6) Perform a search on patrons (click on letter D)
7) Check you see in address "R1"

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>
2024-03-15 15:39:08 +01:00
23b05e812a
Bug 36332: Add missing semicolon in moremember.tt
It's fixing a JS error
Uncaught ReferenceError: script is not defined

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-15 15:39:06 +01:00
60dcb2b077
Bug 35796: Properly set patron_expiration value
To test:
1) Set an expiration on the password in a patron account and save.
2) Go to patron details (moremember.pl) and confirm the password has an expiration.
3) Edit the patron account without touching anything and save the account.
4) Go back to patron details (moremember.pl) and note that the expiration on the password has been removed.
5) APPLY PATCH
6) Try 1 - 4 again except this time password expiration is not removed.

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>
2024-03-15 09:38:56 +01:00
9a6a0611f8
Bug 36274: Correct links leading to purchase suggestion page
To test:
1. APPLY PATCH
2. As a logged in OPAC user go to 'Your account' > Purchase suggestion. The form should display.
3. Make a suggestion and confirm it works.
4. Try to make a suggestion using title, author, isbn information from an item that already exists.
5. See the "A similar document already exists:" warning. Confirm the suggestion anyways.
6. Set MaxTotalSuggestions to 4 and NumberOfSuggestionDays to 2. Make sure you can still navigate to the purchase suggestion form.
7. Do an OPAC search that will yield no results as a logged in user.
8. Click the "Make a purchase suggestion" link, making sure it works.
9. Turn on AnonSuggestions and log out of the OPAC.
10. Do an OPAC search that will yield no results. Again click the "Make a purchase suggestion", confirm it works.

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>
2024-03-15 09:38:56 +01:00
21eb80cc66
Bug 36305: Implement op paramters
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>
2024-03-15 09:38:55 +01:00
10d0c4ccab
Bug 36305: Tidy forms
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>
2024-03-15 09:38:54 +01:00
e701926442
Bug 36190: Fix problems found by test
opac-shelves           - forms were stateless - changed to GET
sco-main               - forms stateless - changed to GET
                         ** untested because sco + auth is broken
smart-rules.tt         - JS form template - added placeholder 'cud-' op
ill-requests           - added cud- tp ops
                         ** tested comments, but not checkout, simple changes
boraccount             - removed repeated op - updated script
patroncards/edit-batch - add placeholder 'cud-' op
patroncards/manage     - add placheholder 'cud-' op
elasticsearch/mappings - separate forms - this could use a style follow-up, but makes more sense separate I think
reports/dictionary      - stateless - changed to GET
guided_reports_start    - stateless - changed to GET
suggestion/suggestion   - add placeholder 'cud-' op
inventory               - filed bug 36305, needs more handling

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>
2024-03-15 09:38:54 +01:00
93b1cbd69a
Bug 35788: Remove Koha::Template::Plugin::Biblio::BookingsCount
We need a new method filter_by_future in Koha::Bookings.

Additionally this TT plugin's method was not covered by tests. Neither
is the whole Koha::Booking[s] objects btw.

Test plan:
Confirm that the number of bookings is displayed in the "Bookings" tab
in the left menu of the bibliographic record detail page.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-15 09:38:42 +01:00
bd987c7046
Bug 35787: Remove Koha::Template::Plugin::Biblio::CanBook
We can replace it with biblio.items.filter_by_bookable, no need to have this TT method.

Additionally there was no test for it.

Test plan:
Make sure the Bookings tab on the left of the biblio detail page is
displayed when needed.

Note that there is also a "Place booking" button that should appear in
the toolbar.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-03-15 09:38:41 +01:00
10ac7876d6
Bug 35782: Fix scoping problem with "biblio"
The "biblio" Koha::Biblio object we send from the controller needs to be
accessible from the include files.
To avoid a clash we rename it biblio_info

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>
2024-03-15 09:38:40 +01:00