Nick Clemens [Thu, 28 Sep 2023 13:14:54 +0000 (13:14 +0000)]
Bug 34886: Adjust other opac detail scripts
Same chanegs as before, but for MARC and ISBD details pages
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>
Nick Clemens [Thu, 28 Sep 2023 12:27:21 +0000 (12:27 +0000)]
Bug 34886: Adjust holdability checks on opac details page
This patch tries to simplify some of the logic here to match that on the search results. When we don't have a patron, we fallback to determining if an item can be held buy determining whether there are any items that don't have holds disallowed at the all libraries level. We also remove items with non-holdable statuses like withdrawn etc (and check some system preferences)
If we don't have a patron, then we are done, however, if we do, then we need to check each item against the policies related to that patron.
This patch also removes two checks at the end:
CountItemsIssued($biblionumber)
$biblio->has_items_waiting_or_intransit
These seem to be from bug 4319 - however, those rules are checked by IsAvailableForItemLevelRequest and are only relevant when we have a patron. These checks essentially assumed 'onshelfholds' policy of 'If any unavailable' For consistency sake I think we should follow the same logic as the results page.
To test:
1 - Find a record with two items, of different types, set a 'Default checkout, hold and return policy' of 'No holds allowed'
2 - Search opac, not logged in, and verify neither the results page or details page shows the place hold button
3 - Delete that rule, make both items withdrawn
4 - Search opac, not logged in, and verify neither the results page or details page shows the place hold button
5 - Mark one item as not withdrawn
6 - Search opac, not logged in, and verify both the results page or details page shows the place hold button
7 - Log in to opac
8 - Search opac, logged in, and verify both the results page or details page shows the place hold button
9 - Place an 'On shelf holds policy' rule for that patron category of 'If any unavailable'
10 - Search opac, logged in, and verify the results and details page shows the place hold button
11 - Set the other item to not withdrawn
12 - Search opac, logged in, and verify the results page shows the place hold button, but details does not
13 - Try various other scenarios - details page should be more correct, results page is always an approximation
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>
Lucas Gass [Thu, 28 Mar 2024 15:13:59 +0000 (15:13 +0000)]
Bug 36418: Catch more cases where header response should be application/json
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Lucas Gass [Mon, 25 Mar 2024 16:30:51 +0000 (16:30 +0000)]
Bug 36418: Explicitly set response to json
To test:
1. Add some checkouts and load the issues-table
2. Select 'Check in' checkbox for that item and click "Check in selected items"
3. The row becomes read and reads "Unable to check in"
4. Reload the page, the item has actually checked in
5. Try the 'Renew' checkbox and click "Renew selected items"
6. It just spins and spins.
7. Reload the page, the item has actually renewed.
8. APPLY PATCH and restart_all
9. Try the steps again and this time everything should work properly.
10. tests these URLs
http://localhost:8081/cgi-bin/koha/svc/recall
http://localhost:8080/cgi-bin/koha/svc/club/enroll
http://localhost:8081/cgi-bin/koha/svc/mana/increment : empty response
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Jonathan Druart [Wed, 27 Mar 2024 07:33:56 +0000 (08:33 +0100)]
Bug 36302: Restore passing deferLoading to DT
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
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>
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>
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>
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>
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>
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>
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>
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>
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:
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>")
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>