Owen Leonard [Fri, 20 Jan 2023 11:56:55 +0000 (11:56 +0000)]
Bug 32688: Convert recalls awaiting pickup tabs to Bootstrap
This patch updates the recalls awaiting pickup template
(recalls_waiting.tt) to replace a set of jQueryUI tabs. They are
converted to Bootstrap in order to complete Bug 29226.
To test, apply the patch and make sure the "UseRecalls" system
preference is enabled.
- Go to Circulation -> Recalls awaiting pickup.
- You should see two tabs, "Recalls waiting" and "Recalls waiting over X
days."
- The tabs should look correct and work correctly.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch adds the mentioned endpoint. The controller relies on
Koha::Item->safe_to_delete for checks and uses `safe_delete` as
additem.pl does.
The required permissions are edit_catalogue.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/items.t
=> SUCCESS: Tests pass!
3. Play with item deletion using a REST tool like Postman
=> SUCCESS: All works as expected
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Fri, 20 Jan 2023 15:29:49 +0000 (16:29 +0100)]
Bug 16522: Move 773 entries in result lists before 856 entries
This moves the display of 773 In: displays to right before the
856 Online resource: as suggested by Heather in order to make it
more consistent with the display in the detail pages.
Everything should be unchanged, but the position of the
In: line :)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Aleisha Amohia [Mon, 17 Oct 2022 22:38:44 +0000 (22:38 +0000)]
Bug 16522: (follow-up) If no 773$w, try to return host record
Use host biblionumber or host itemnumber to return a host record if
EasyAnalyticalRecords is enabled, or return an undef record and a string
of host information when get_marc_host is called in list context.
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Wed, 28 Sep 2022 14:11:45 +0000 (14:11 +0000)]
Bug 16522: (follow-up) Remove HTML links from email
The emails sent for cart and list are plain text and any
<a> tag will be scrubbed by HtmlToText. So we can remove
those links.
This also solves an issue with the original patch set,
where the error below would appear on sending a cart or
list email from the staff interface:
Template process failed: file error - biblio_a_href: not found at /kohadevbox/koha/C4/Templates.pm line 127
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Wed, 28 Sep 2022 13:00:25 +0000 (13:00 +0000)]
Bug 16522: (follow-up) Fix variable in OPAC cart brief display
Without this change records 773 entries with links in $w would
not display the title information, but just "No title".
With the variable fixed, now the host's title displays.
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Wed, 28 Sep 2022 12:50:45 +0000 (12:50 +0000)]
Bug 16522: (follow-up) Rename "Host item entry" to "In"
We already use In: as label for 773 on the result lists and
detail pages and it's also recommended in the MARC documentation.
With this patch the label is the same everywhere.
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Fri, 26 Aug 2022 16:57:19 +0000 (16:57 +0000)]
Bug 16522: (follow-up) Add missing TT filters
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Aleisha Amohia [Thu, 30 Jun 2022 22:28:31 +0000 (10:28 +1200)]
Bug 16522: (follow-up) MARC display templates and get_marc_host fixes
Also:
- Show related parts 773$g
- Normalise using 'Host item entry' as title
- Remove 'foreach' because non-xslt views only return first
- If no $w, use $atg, and related tests in
t/db_dependent/Koha/Biblio/host_record.t
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Aleisha Amohia [Fri, 4 Dec 2020 03:00:31 +0000 (16:00 +1300)]
Bug 16522: Adding 773 to cart and list displays and emails
This enhancement adds information from a host item entry and a link if
applicable to the host record in the following places:
- staff client list
- staff client cart
- staff client send list email
- staff client send cart email
- staff client search results
- staff client detail page
- opac list
- opac cart
- opac send list email email
- opac send cart email
- opac search results
- opac detail page
To test:
1. apply patch, restart services
2. log into the staff client and enable the syspref EasyAnalyticalRecords
3. find a record with an item. take note of the barcode.
4. go to another record (biblio 2). click Edit -> Link to host record
5. enter the barcode in the input and submit.
6. click the MARC tab and confirm the host record has been linked under
MARC field 773.
7. add biblio 2 to your cart, and to a list.
8. go to your cart. confirm you see the 'host item entry' link.
9. click on 'more details' and confirm you see the 'host item entries'
link.
10. click 'send' to email the cart. confirm the email contains the host
item entry and the link sends you to the catalogue page for the record
in the OPAC.
11. go to the list you added the record to. confirm you see the 'source'
link for the host item entry.
12. click 'send list' to email the list. confirm the email contains the
host item entry and the link sends you to the catalogue page for the
record in the OPAC.
13. log into the OPAC. repeat steps 7 to 12 on the OPAC and confirm they
all pass as expected.
14. Confirm host item info also shows correctly on the
OPAC and staff client search results, and the OPAC and staff client
detail pages (where XSLT is used)
15. Delete the 773$w and confirm host item info still shows correctly
but no longer links to biblio
16. confirm tests pass t/db_dependent/Koha/Biblio/host_record.t
Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ) Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Fri, 20 Jan 2023 20:18:27 +0000 (20:18 +0000)]
Bug 32694: Fix value of 'Keep current' option in receiving
This patch restores missing template toolkit markers around the variable
To test:
1 - Order an item in a basket
2 - Close the basket
3 - Attempt to receive the item, leaving budget as 'Keep current'
4 - 500 Error:
C4::Acquisition::ModReceiveOrder(): DBI Exception: DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (koha_cclsny.aqorders, CONSTRAINT aqorders_budget_id_fk FOREIGN KEY (budget_id) REFERENCES aqbudgets (budget_id) ON DELETE CASCADE ON UPDATE CASCADE) at /usr/share/koha/intranet/cgi-bin/acqui/finishreceive.pl line 120
5 - Apply patch
6 - Receive order successfully!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Wed, 11 May 2022 14:47:58 +0000 (15:47 +0100)]
Bug 29021: RenewAccruingItemWhenPaid renewals are not seen
This patch updates the call to AddRewewal from Koha::Accounts to makr
the renewal as unseen.
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Tue, 1 Nov 2022 10:19:45 +0000 (10:19 +0000)]
Bug 30254: (QA follow-up) Remove warn from tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Mon, 31 Oct 2022 18:38:04 +0000 (18:38 +0000)]
Bug 30254: Don't charge overdue fines unless some fine exists
We need to determine if a book was lost by a patron, the clues we have
are previous charges. If we don't find any, we shouldn't charge a new fine
To test:
1 - set Lost item fee refund on return policy to "Refund lost item charge and charge new overdue fine", turn on FinesMode, make sure your circ rules charge fines
2 - have an itemtype / patron combo that charges an overdue fine
3 - check item out (with a due date in the future) and then right back in again
4 - confirm patron doesn't have a fine because the item was not late
5 - set the item to Lost
6 - in the database, edit the date_due of your checkout to a date in the past
7 - check the item in, it is marked found
8 - confirm your patron now has a fine
9 - Apply patch
10 - Repeat with a new item and patron
11 - Confirm no charges
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Mon, 31 Oct 2022 18:37:18 +0000 (18:37 +0000)]
Bug 30254: Unit tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Michael Hafen [Fri, 13 Jan 2023 17:49:46 +0000 (10:49 -0700)]
Bug 32583: Restore display of only one item in catalogue/moredetails
Bug 31315 (Remove GetItemsInfo from moredetail) removed the code that limits
the items displayed to only one item if the itemnumber was passed as a
parameter to the page.
This restores that code.
Test plan:
1. find a title with multple items.
2. click on an items barcode in the holdings table on the title details page.
3. observe that all items are shown on the catalogue/moredetails page.
4. apply patch.
5. refresh (catalogue/moredetails) page.
6. observe that only the item for the barcode clicked on is shown.
Signed-off-by: Amaury GAU <amaury.gau@bulac.fr> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Fri, 23 Dec 2022 11:32:12 +0000 (11:32 +0000)]
Bug 32520: Use DefaultPatronSearchFields in patron_autocomplete
This patch updates js_includes.inc to set a new global js variable
`defaultPatronSearchFields` with the content of the corresponding system
preference.
We then update the patron_autocomplete function to use this new global
variable and iterate in the same way as
koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc.
NOTE: This changes the behaviour of the autocomplete from always
searching using contains on surname or firstname or starts with on
cardnumber to searching using 'contains' on any of the fields listed in
the DefaultPatronSearchFields system preference of defaulting to
'firstname,middle_name,surname,othernames,cardnumber,userid'.
Test plan
1. Ensure autocomplete still works everywhere
2. Confirm the system preference fields are being used.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Fri, 18 Nov 2022 07:23:25 +0000 (07:23 +0000)]
Bug 32251: Add a fallback for when language cookie was removed
Since we remove cookies after logout now, the language cookie
might not be there yet. It is friendlier to add the template
language fallback here now too before switching to 'default' in
the Additional contents (AC)-context.
Note: The cookie will not be removed when you added it to the list
in koha-conf.xml.
Note2: This only pertains to the use of opac-page with code param.
Test plan:
[1] Create a CMS page with AC. Add two languages (say en, nl-NL).
Add different text to default and both languages.
[2] Remove the KohaOPACLanguage cookie from your browser (via
dev console).
[3] Without this patch, copy the Current language URL from the AC
overview page. (Note that the Default URL always refers you to
'default'.)
[4] Go to that page with the selected (Current..) URL. Observe that
you still see the 'default' text.
[5] Remove the cookie again if it might be there already.
[6] With this patch, observe that you get the language of the
interface now on the CMS page using the same URL.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Pascal <pascal.uphaus@gwdg.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Fri, 13 Jan 2023 15:00:25 +0000 (15:00 +0000)]
Bug 32631: Error when previewing record during batch record modification
This patch corrects an error in the script which outputs MARC data for
preview during batch record modification.
To test, apply the patch and restart services. You will need at least
one MARC modification template in your system.
- Go to Cataloging -> Batch record modification
- Submit a batch of bibliographic records
- In the table of records that follows, click any "Show MARC" button. A
modal window should appear with a preview of the modified record.
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Tue, 3 Jan 2023 20:25:31 +0000 (20:25 +0000)]
Bug 32562: (follow-up) Add markup comments
This patch adds comments to the template to highlight the markup
structure.
This patch should have no effect on the page's appearance or
functionality.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Tue, 3 Jan 2023 19:49:44 +0000 (19:49 +0000)]
Bug 32562: Reindent the about page template
This patch reindents the about page template so that it has consistent
indentation. These changes should have no visible effect on the page.
To test, apply the patch and view the about page. Everything should look
normal. All tabs should work correctly.
Viewing the diff while ignoring whitespace changes should show only
places where a line break was added.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Alex Buckley [Mon, 8 Aug 2022 23:59:20 +0000 (23:59 +0000)]
Bug 18247: Remove SQL queries from branch_transfer_limit.pl
1. Visit Administration > Patrons and circulation > Limit transfer limits
2. Observe collection codes are displayed as tabs on the Limit transfer
limits page when the BranchTransferLimitsType syspref = 'Collection
code'
3. Switch the BranchTransferLimitsType syspref = 'item type'. Refresh
the Limit transfer limits page and observe the tabs have changed to item
type codes
4. Apply patchset and restart services
5. Reload the Limit transfer limits page and confirm it displays
correctly with the BranchTransferLimitsType = 'collection code' and
'item type'
6. Confirm you can successfully save transfer policies
Sponsored-by: Catalyst IT Signed-off-by: Jacob Omara <jacob.omara@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Wed, 7 Dec 2022 13:02:33 +0000 (13:02 +0000)]
Bug 32416: Add a warning to the file
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Wed, 7 Dec 2022 12:56:02 +0000 (12:56 +0000)]
Bug 32416: Update attribute number for arp search to 9015
Bug 20078 updated the attribute for arp to 2014 to avoid conflict with 9013 not-on-loan-count
Bug 28830 then added Control-number-identifier as 2014, breaking arp again
This patch updates the number to 9015
To test:
1 - Apply first patch
2 - Attempt searching by arp, no results (add a unique 526$d to a record to ease searching)
3 - Apply this patch
4 - Copy bib1.att and ccl.properties to the correct locations
cp etc/zebradb/biblios/etc/bib1.att /etc/koha/zebradb/biblios/etc/bib1.att
cp etc/zebradb/ccl.properties /etc/koha/zebradb/ccl.properties
5 - Restart zebra
6 - Rebuild indexes
7 - Search again, success!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Thu, 26 Jan 2023 12:12:34 +0000 (12:12 +0000)]
Bug 32733: (follow-up) Reorganize classification of information
If we're dividing the sections into labeled "Information" and
"Settings," I propose that we try to put under "Information" lines
which are just for display, and under "Settings" lines which allow the
user to change things: Managed by, managing library, basket group, etc.
This patch moves a few lines to accomplish this. The only other change
is to remove a "float:left" inline style from the "Change library" form
to make it display better.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Thu, 26 Jan 2023 11:38:53 +0000 (11:38 +0000)]
Bug 32733: Add page-section cards to basket summary
This patch adds two new page-section divs to the basket summary page.
One for each column of details in the top area of the summary page.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Wed, 25 Jan 2023 16:38:01 +0000 (16:38 +0000)]
Bug 31932: (follow-up) Markup comments
This patch adds comments to the template to highlight the markup
structure.
This patch should have no effect on the page's appearance or
functionality.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Mon, 23 Jan 2023 17:23:36 +0000 (17:23 +0000)]
Bug 31932: The basket summary page template needs a cleanup
This patch reindents the Acquisitions basket template so that it has
consistent indentation. These changes should have no visible effect on
the page.
To test, apply the patch and go to Acquisitions.
Locate a vendor and add a basket and some orders if necessary.
Test as much of the page's functionality as possible, e.g. toolbar
controls, in-table controls, managed-by and managing library controls,
etc. Try adding an internal note, adding a vendor note, and deleting the
basket.
Everything should look correct and work correctly.
Viewing the diff while ignoring whitespace changes should show only
places where a line break was added.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Tue, 10 Jan 2023 18:10:43 +0000 (18:10 +0000)]
Bug 32204: Check for hash before setting focus
1. Search the catalog and view a record detail page of a record with items
2. Click 'Edit items'
3. Choose one item from the list and click 'Edit'
4. The URL fragment or in-page anchor (#edititem) is appended to the end of the URL but you are not placed on it. Instead you are placed at the top of the page and must scroll down to edit the particular item.
5. Apply patch
6. Try steps 1 - 3 again, now you should be placed in the correct location (#edititem) when editing an item.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch corrects the capitalization of the "Display order" column heading
in the item groups table.
To test:
0. Apply patch
1. Enable the EnableItemGroups system preference
1.1. Go to Administration > Global system preferences
1.2. Search for EnableItemGroups
1.3. Change the value to "Enable"
1.4. Click "Save all Circulation preferences"
2. Go to any bibliographic record
3. Click the "Item groups" tab at the bottom
--> First column should be "Display order"
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 32229: Typo: Items missing from bundle at checking for %s
This patch corrects a typo in the missing items from bundle pop-up
header.
To test:
I created a MARC21 file of records to use as an example. It assumes
you have the sample branches and itemtypes that come with Koha. You
can use any record you have in your database, you need at least three
records each with at least one item.
0. Apply patch
1. If using the example records, import the records
1.1. Download the attached earlyliteracy.mrc file
1.2. Go to Cataloging > Stage records for import
1.3. Click the button and select the file on your computer
1.4. Click 'Upload file'
1.5. Click 'Stage for import'
1.6. Click 'View detail of the enqueued job'
1.7. Click 'View batch'
1.8. Click 'Import this batch into the catalog'
2. If using the example records, bundle the books into the 'My first
books bundle' record
2.1. Click 'Manage imported batch'
2.2. Click 'View' next to 'My first books bundle'
2.3. Click 'Manage bundle' on the right of the item
2.4. Click 'Add to bundle'
2.5. Enter the following barcodes, followed by 'Submit' (or press
enter) after each
- 001229
- 001230
- 001231
- 001232
- 001233
2.6. Click 'Close'
Alternate step 2, if using own records: find a record with an item,
change the leader/position 7 to c, click 'Manage bundle', then 'Add
to bundle' and enter a few existing barcodes (at least 2).
3. Check out bundle
3.1. Go to Patrons
3.2. Click 'Search' to find a patron
3.3. Click 'Checkout' next to a patron
3.4. If using example records, enter the following barcode into the
checkout box and click 'Checkout' (or press enter)
- 001234
Alternate step 3.4, if using own records: checkout the 'main'
record in which you bundled all the other records
4. Check in bundle, 'losing' at least one item
4.1. In the bar at the top of the screen, select 'Check in'
4.2. If using the example records, enter the following barcode and
click the arrow (or press enter)
- 001234
Alternate step 4.2, check in the same barcode you just checked
out
4.3. In the 'Barcodes' box, enter the following barcodes, pressing
enter between each
- 001229
- 001230
- 001231
Alternate step 4.3, enter only some of the bundled barcodes
4.4. Click 'Confirm checkin and mark missing items as lost'
4.5. Click 'View list of missing items'
--> Items missing from bundle at checkin for (barcode)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 4 Jan 2023 09:08:06 +0000 (10:08 +0100)]
Bug 32561: Prevent worker to run with unecessary modules in memory
Regression of bug 28413, bug 30410 added a "use Koha::Plugins" statement at the top of Koha::BackgroundJob, and so all Koha module are loaded by the worker on startup.
See bug 28413 for more info
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Nick Clemens [Tue, 22 Nov 2022 14:05:08 +0000 (14:05 +0000)]
Bug 32321: Pre-populate material type for 006 in advanced cataloging editor
To test"
1 - Edit a record in advanced cataloging editor with field helpers enabled
2 - Choose a material type, not BKS, from dropdown
3 - Set the first position to something
4 - Save the record
5 - 006 shows 'BKS'
6 - Apply patch
7 - Reload
8 - Record should show correct value
9 - Edit 006 and confirm the first position correctly determines material type
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 30 Nov 2022 07:32:20 +0000 (08:32 +0100)]
Bug 32376: Remove creation of selenium_failure_2.png
This was for debugging purpose.
Test plan:
Run the tests and confirm that the screenshot is not generated when the
patch is applied
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
David Nind [Fri, 20 Jan 2023 18:42:01 +0000 (18:42 +0000)]
Bug 32692: Terminology - use staff interface for MARC framework subfield editor
For the visibility options in the advanced constraints section of the
MARC framework subfield editor, use 'Staff interface' instead
of 'Intranet'.
This makes it consistent with the terminology list (see
https://wiki.koha-community.org/wiki/Terminology#I).
Test plan:
1. Go to Administration > Catalog > MARC bibliographic framework.
2. Select Actions > MARC structure for any framework.
3. For any tag select Actions > Edit subfields.
4. Note that in the advanced constraints section for the visibility
field that 'Intranet' is used as an option.
5. Apply the patch.
6. Refresh the page and note that 'Staff interface' is now used, which
is consistent with the terminology list (see
https://wiki.koha-community.org/wiki/Terminology#I).
7. Sign off D:
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Amaury GAU <amaury.gau@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 11 Jan 2023 11:36:42 +0000 (12:36 +0100)]
Bug 32393: Split into 2 try catch blocks
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Fri, 2 Dec 2022 13:23:38 +0000 (14:23 +0100)]
Bug 32393: Prevent invalid job to block the job queue
I have faced a problem when testing an incorrect version of bug 32370.
The frame sent to the message broker was not a correct JSON encoded
string, and its decoding was obviously failing, exploding the worker
script.
Additionally, as we don't send a ack for this frame, the next pull will
result in processing the same message, and so in the same explosion.
No more messages can be processed!
This patch is logging the error and ack the message to the broker, in
order to not get stuck.
Test plan:
0. Dont' apply this patch
1. Enqueue a bad message
a. Apply 32370
b. Comment the following line in Koha::BackgroundJob::enqueue
$self->set_encoded_json_field( { data => $job_args, field => 'data' } );
c. restart_all
d. Use the batch item modification tool to enqueue a new job
=> Notice the error in the log
=> Note that the status of the job is "new"
=> Inspect rabbitmq queue:
% rabbitmq-plugins enable rabbitmq_management
% rabbitmqadmin get queue=koha_kohadev-long_tasks
You will notice there is a message in the "long_tasks" queue
2. Enqueue a good message
a. Remove the change from 1.b
b. restart_all
c. Enqueue another job
=> Same error in the log
=> Both jobs are new
=> Inspect rabbitmq, there are 2 messages
3. Apply this patch
4. restart_all
=> Second (good) job is finished
=> rabbitmq long_tasks queue is empty
We cannot mark the first job as done, we have no idea which job it was!
QA: Note that this patch is dealing with another problem, not tested in
this test plan. If an exception is not correctly caught by the ->process
method of the job, we won't crash the worker. The job will be marked as
failed.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Kyle Hall [Thu, 5 Jan 2023 16:35:42 +0000 (11:35 -0500)]
Bug 32573: Send ACK message to RabbitMQ before handling the job
Splitting off this functionality from bug 32558. This is the comment that started this discussion: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32558#c15
From the O'Reilly book Mobile and Web Messaging:
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
To test:
0 - Apply patch
1 - Place some holds for a patron
2 - From patron page, confirm you can suspend all
3 - confirm you can delete marked holds
4 - Edit a course in course-reserves
5 - Make a chaneg to personal details via OPAC
6 - Confirm change can be approved on staff side
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Matt Blenkinsop [Mon, 28 Nov 2022 14:35:37 +0000 (14:35 +0000)]
Bug 32221: Borrowers.password should no longer be an option
When creating a notice template the user has the option to add the borrower's
password to the template. This should be removed as the password should not be
an option to be added to a notice.
Test plan:
1) Navigate to Tools > Notices and slips
2) Either create a new notice or edit an existing notice
3) Observe that in the list of fields available to insert into the message body,
there is the option for "borrowers.password"
4) Apply patch
5) Navigate to the same menu
6) Observe that the "borrowers.password" option is now no longer visible
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Kyle Hall [Tue, 17 Jan 2023 17:18:00 +0000 (12:18 -0500)]
Bug 32656: Script delete_records_via_leader.pl no longer deletes items
Bug 29788 inadvertantly replaced a call to safe_delete() with safe_to_delete()
such that any time the script should delete an item it only checks to see if
the item is delectable, after which deletion of the record fails because the
items were not deleted.
Test Plan:
1) Mark a record with items to be deleted via the record leader
2) Run delete_records_via_leader.pl -i -b -v
3) Note the script says it is deleting the items but then the record
deletion fails. Note the items remain in the items table of the
database.
4) Apply this patch
5) Repeat step 2
6) This time the items and record should be deleted!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 18 Jan 2023 14:45:34 +0000 (15:45 +0100)]
Bug 32650: Prevent Koha/Holds.t to fail randomly
22:25:51 koha_1 | # Failed test 'Items 1, 2, and 5 are available for filling the holds'
22:25:51 koha_1 | # at t/db_dependent/Koha/Holds.t line 531.
22:25:51 koha_1 | # Structures begin differing at:
22:25:51 koha_1 | # $got->[0] = '1000'
22:25:51 koha_1 | # $expected->[0] = '996'
22:25:51 koha_1 | # Looks like you failed 1 test of 6.
22:25:51 koha_1 |
22:25:51 koha_1 | # Failed test 'get_items_that_can_fill'
22:25:51 koha_1 | # at t/db_dependent/Koha/Holds.t line 539.
We need to use a numeric sort, or 1000 is before 996...
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 18 Jan 2023 14:55:26 +0000 (15:55 +0100)]
Bug 28670: Prevent api/v1/patrons_holds.t to fail randomly
12:01:12 koha_1 | # Failed test 'Holds retrieved'
12:01:12 koha_1 | # at t/db_dependent/api/v1/patrons_holds.t line 56.
12:01:12 koha_1 | # Structures begin differing at:
12:01:12 koha_1 | # $got->[0]{hold_id} = '256'
12:01:12 koha_1 | # $expected->[0]{hold_id} = '255'
12:01:12 koha_1 | # Looks like you failed 1 test of 9.
12:01:12 koha_1 |
12:01:12 koha_1 | # Failed test 'list() tests'
12:01:12 koha_1 | # at t/db_dependent/api/v1/patrons_holds.t line 70.
This is a weird one, and the only solution I see it to force the order
we want to receive the holds.
I guess we should not rely on an order if no order by clause is passed
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 3 Jan 2023 12:59:07 +0000 (13:59 +0100)]
Bug 32550: (bug 28445 follow-up) Fix 'Clear on loan' link on item batch mod
The 'Clear on loan' link displayed at the top of the batch item
modification tool has been broken by bug 28445.
data-is-onloan attribute is supposed to be 1 or 0, but we passed the
checkout (Koha::Checkout=HASH)
Test plan:
1. Enter a checked-out barcode in the 'Batch item modification' page
2. Click 'Continue'
3. Notice a table is loaded displaying the on-loan item with a ticked checkbox 4. Click the 'Clear on loan' link above the table
5. Notice the on-loan item is no longer selected
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Mon, 31 Oct 2022 17:56:23 +0000 (17:56 +0000)]
Bug 32054: Add get_import_record_matches object method and use it
Thispatch adds the new method and alters addorderiso2907.pl to use this
rather than GetRecordImportMatches
To test:
1 - Import the attached record several times
2 - Set up a matching rule:
TitleAuthor threshold: 100
Matchpoint:
search index: title, score: 100, tag: 245$a
search index: author, score: 100, tag:100$a
3 - Edit one of the imported records to have a different author
4 - Stage the file again. and match using the matchpoint above
5 - Note that matches are found and listed on batch management, with the lowest scored match last
6 - Choose that match
7 - In acquisitions, add to a basket from the staged file
8 - Check the box for the record
9 - Note the match lists the biblionumber for the highest scoring match, not the chosen one
10 - Add an order and note it is for the wrong biblio
11 - Appy patch
12 - Restart_all
13 - Stage the file again and choose a lower scoring match
14 - Confirm when adding to basket this match is preserved
15 - Complete order and verify correct biblio ordered
16 - Stage again, select no match
17 - Confirm no match listed when adding to basket, and choose 'Do not look for matching records' while adding
18 - Confirm order is created on a new biblio
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Thu, 22 Dec 2022 15:18:20 +0000 (15:18 +0000)]
Bug 32517: lowercase category codes to avoid mismatch
To test:
1 - sudo koha-mysql kohadev
2 - UPDATE borrowers SET categorycode = LCASE(categorycode)
3 - Try to search for patrons:
Uncaught TypeError: categories_map[data] is undefined
4 - Apply patch
5 - Search for patrons
6 - Success!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 21 Nov 2022 09:20:22 +0000 (10:20 +0100)]
Bug 32272: Restore last and previous borrowers on moredetail
GetItemsInfo added a card0, card1 and card2 info with the cardnumbers of
the last 3 borrowers.
But 31315 forgot to adjust the code when it has been moved to using
Koha::Items
Test plan:
Check an item in and out to several patrons
Go to the moredetail page (items) and confirm that the "last borrowers"
info is displayed
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 2 Jan 2023 16:12:40 +0000 (17:12 +0100)]
Bug 32505: Restore patron search by formatted dob
Prior to the rewrite of the patron searches (bug 30063 and friends) it
was possible to search for a patron using their date of birth, formatted
following the dateformat syspref.
Now it only works if the date is iso formatted.
This patch is providing a fix to restore the behaviour, but does not
make it consistent. Only searching patrons by date of birth is fixed
here, when we actually want to fix the problem for the REST API DT
wrapper instead.
Test plan:
Search for patrons given their date of birth. You need to select "date
of birth" in the "Search field" dropdown, or set it in
DefaultPatronSearchFields.
Note that the column filtering is still not working, but I guess it was
the case already in older versions. Ideally we will need to have a
"datatype" attribute passed to the the 'th' and retrieved from
datatables.js to add this same trick and build the query appropriately.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Wed, 28 Dec 2022 20:36:33 +0000 (20:36 +0000)]
Bug 32535: Exclude flags from BorrowerUnwantedField system preference
The system preference BorrowerUnwantedField includes a checkbox
for "System permissions (flags)." Checking it has no apparent effect;
one is still able to edit patron permissions with the box checked.
This patch excludes the field from the selectable fields.
To test:
* Search for the BorrowerUnwantedField system prefernce
* Verify that you can check/uncheck System permissions (flags)
* Verify it doesn't have any effect, as permissions are not set
from the patron edit form, but separately
* Apply patch
* Verify you no longer can check/uncheck the field in the
system preference
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Lucas Gass [Fri, 13 Jan 2023 19:01:55 +0000 (19:01 +0000)]
Bug 31492: Set CSRF token in circulation.pl
To test:
* Turn on patronimages system preferences
* Go to any patron account
* Hover over the 'dummy image' for the Add button
* Browse and select an image for upload
* Saving results in the following error:
The form submission failed (Wrong CSRF token). Try to come back, refresh the page, then try again.
Apply patch and try again. You shouldn't need to try twice, it should work on the first attempt now.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Lucas Gass [Mon, 9 Jan 2023 18:12:33 +0000 (18:12 +0000)]
Bug 32597: Fix table display of OPAC article requests
To test:
1. Enable ArticleRequests
2. Make some requests (two or more) on the OPAC and go to the user
summary.
3. The table rows display horizontally.
4. Apply patch
5. Try step 2 again, the table should display correctly.
Note: I made some whitespace changes to make the markup look correct.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Fri, 8 Apr 2022 18:52:09 +0000 (18:52 +0000)]
Bug 22042: Block all return actions when BlockReturnOfWithdrawn items is set to block
Currently this syspref only bokcs the literal 'return' from a patron, i.e. the checkin
It still processes transfers, refunds lost items, updates NotForLoan status etc.
We should block all of these things
To test:
1 - Set BlockReturnOfWithdrawn to block
2 - Set an item as lost and withdrawn
3 - Check it in
4 - Item is found
5 - Apply patch
6 - Repeat 1-3
7 - Checkin is blocked, item still lost
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Wed, 14 Dec 2022 15:44:28 +0000 (15:44 +0000)]
Bug 32465: Add 'queue' to koha-worker help documentation
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Shi Yao Wang [Mon, 13 Jun 2022 18:05:53 +0000 (14:05 -0400)]
Bug 14784: Fix checkin message for restricted patrons
Test plan:
Before
1) Select a user with active indefinite or definite restrictions (manual restriction works)
2) Make sure finedays=0 for the user category. See [1]
3) Checkout and return an item (not overdue)
A previous restriction reminder will appear
4) Checkout and return an overdue item (change the date at checkout)
No previous restriction reminder will appear
After applying patch:
Same steps, but a reminder should appear for step 4)
[1] The "finedays" setting is called "Suspension in days" in the web interface, if you're searching for it like I did...
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jacob O'Mara [Thu, 15 Dec 2022 19:04:51 +0000 (19:04 +0000)]
Bug 31950: Amend page-section width and alignment
Test Plan:
Navigate to Admin -> Libraries and click on a Library
Observe that the page-section is too wide and not aligned
Apply Patch
Observe that page-section is now the correct width
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Fri, 6 Jan 2023 21:28:14 +0000 (22:28 +0100)]
Bug 32582: Fix error in .mailmap
The .mailmap had the addresses in the wrong
sequence. The .83 address is actually the correct
one.
How this works is easiest to see in git:
* Apply one of my patches, like bug 31962
* Do a git log
* You'll see the email address without .83 as author
* Apply this patch
* You should see the correct email now in both,
matching the one in the patch file on bugzilla
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Fri, 13 Jan 2023 14:07:41 +0000 (14:07 +0000)]
Bug 32628: Add 'page-section' to various serials pages
This patch adds a "page-section" container div around the main section
of serials pages which lack it.
This patch contains indentation changes, so please ignore whitespace
when looking at the diff.
To test you must have at least one subscription in your system. Apply
the patch and view the following pages to confirm that the main content
is contained in a white box:
- Subscription batch edit:
- Go to Serials -> Search subscriptions -> Results
- Check the box next to one or more search results and click "Edit
selected serials."
- Subscription frequencies:
- Serials -> Manage frequencies
- View subscription alerts:
- Log in to the OPAC and search for a subscription.
- On the subscription detail page click the "Subscribe to to email
notification on new issues."
- In the staff interface, locate that subscription and view its
details.
- Click the "subscribers" link under "Patron notification."
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Thu, 12 Jan 2023 12:51:44 +0000 (12:51 +0000)]
Bug 32616: Add 'page-section' to various acquisitions pages
This patch adds a "page-section" container div around the main section
of acquisitions page which lack it.
This patch contains indentation changes, so please ignore whitespace
when looking at the diff.
To test, apply the patch and view the following pages to confirm that
the main content is contained in a white box:
- Acquisitions -> Vendor -> Basket -> Create EDIFACT order
- Acquisitions -> EDIFACT messages
- Acquisitions -> Orders search -> Results
- Acquisitions -> Late orders
- Acquisitions -> Vendor -> Add to basket -> From a subscription
- Acquisitions -> Vendor -> Add to basket -> From a suggestion
- Acquisitions -> All available funds -> Ordered
- Acquisitions -> All available funds -> Spent
- Acquisitions -> Vendor -> Add to basket -> From an external source ->
Results
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Fri, 13 Jan 2023 15:34:42 +0000 (15:34 +0000)]
Bug 32632: Add 'page-section' to some tools pages
This patch adds a "page-section" container div around the main section
of some tools pages which lack it.
This patch contains indentation changes, so please ignore whitespace
when looking at the diff.
Apply the patch and view the following pages to confirm that the main
content is contained in a white box:
- From the cataloging home page: Item modifications by age. If
necessary, add at least one rule to see the table listing all rules.
- Go to Tools -> Batch extend due dates, and submit values which will
return one or more results, keeping the "Preview results" checkbox
checked. Confirm that the page previewing the results looks
correct.
- Go to Tools -> Quote editor. If necessary, add at least one quote in
order to see the table of quotes.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Fri, 13 Jan 2023 11:15:15 +0000 (12:15 +0100)]
Bug 32622: Fix Auth.t on D10
It's caused by a version mismatch of Test::MockModule with D10,
which does not have this commit: https://github.com/geofffranks/test-mockmodule/commit/fef9e742e45e2437e3449eea9970d70555d44bff
We should remove the chaining here.
Test plan:
Confirm that Auth.t still pass, and is fixed on D10
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Mon, 9 Jan 2023 14:09:29 +0000 (14:09 +0000)]
Bug 32596: Filter jobs by enqueued on, not started on
To test:
1 - Do a bunch of stuff in the staff interface the will generate background jobs
2 - Wait a bit to make sure all the jobs are done
3 - Visit Admin->Jobs
4 - Note there is nothing shown
5 - uncheck 'Current jobs only' and 'Only include jobs started in the last hour'
6 - Note that nothing is shown, but header says '(filtered from X jobs)'
7 - Apply patch
8 - Reload table
9 - Confirm you can see the finished jobs now
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Fri, 6 Jan 2023 23:46:20 +0000 (00:46 +0100)]
Bug 32400: (follow-up) Add page-section to table of moved orders
To test:
* Make sure you have at least one open order, basket closed
* Go to Administration > budgets
* Clone the budget
* Close the budget
* Choose your new budget and save
* Confirm 'can't undo later...' question
* Verify the table of moved orders has the white background
from the added page-section
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Wed, 4 Jan 2023 18:39:48 +0000 (18:39 +0000)]
Bug 32400: Add page-section to aqbudgetperiods table
To test:
1. Apply patch
2. Go to Administration -> Budgets
3. Close a budget
4. Make sure the page-section looks right.
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Fri, 6 Jan 2023 09:09:45 +0000 (10:09 +0100)]
Bug 32491: Split patron search terms on comma - autocomplete
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Thu, 5 Jan 2023 08:23:45 +0000 (09:23 +0100)]
Bug 32491: Split patron search terms on comma
Previous behaviour allowed search 'surname, firstname'. We should remove
the comma from the search terms.
Test plan:
On the main patron search, search for "surname, firstname" and confirm
that with this patch applied the search returns the expected results.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 32528: Make safe_to_delete exit earlier on error conditions
This patch makes the `Koha::Item->safe_to_delete` method return right
after one of the checked conditions is met. This way we avoid further DB
queries and processing.
No behavior change is expected
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/Koha/Item.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests STILL pass!
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 32528: Change return logic
Back to 1 return statement
Prevent the Koha::Result::Boolean instanciation duplication
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
David Cook [Thu, 22 Dec 2022 22:17:04 +0000 (22:17 +0000)]
Bug 32481: Limit prefetch size for background jobs worker
This patch adds a prefetch size of 1 to the background jobs worker,
so that it fetches 1 message at a time. Without this change,
the RabbitMQ connection timeout when too many messages for slow tasks
are fetched at the same time.
To test:
0. Apply patch
1. Run background worker
2. Rapidly enqueue multiple jobs that in total will take longer
than 30 minutes to process
Bug 32481: Use correct prefetch syntax for RabbitMQ
According to https://www.rabbitmq.com/stomp.html the header to
use for managing the prefetch is "prefetch-count".
You can verify the number of delivered and unacknowledged messages
on a channel on a connection by running "rabbitmqctl list_channels"
on the RabbitMQ host. This will tell you how many messages have been
delivered and are awaiting acknowledgement
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Fri, 25 Nov 2022 08:07:34 +0000 (09:07 +0100)]
Bug 32349: Remove TEST_QA
There is an env var that we are passing from koha-testing-docker, TEST_QA.
It's used in Koha from a single test file, t/00-testcritic.t.
If not set, no test is run.
Do we really need this? libtest-perl-critic-perl is packaged and automatically installed.
Signed-off-by: Mason James <mtj@kohaaloha.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Tue, 15 Nov 2022 13:55:18 +0000 (13:55 +0000)]
Bug 32208: Adjust Auth.pm for relogin without perms
If a second login on top of a current session fails on
permissions, we should not grant access without context.
Test plan:
[1] Run t/db../Auth.t, it should pass now.
[2] Test interface with/without this patch:
Pick two users: A has perms, B has not.
Put two staff login forms in two tabs.
Login as A in tab1. Login as B in tab2.
Without this patch, B gets in and crashes.
With this patch, B does not get in ('no perms').
Bonus: Go to opac if on same domain. You are still
logged in as B.
NOTE: I added a FIXME here, since you could argue about filling
the session info or otoh deleting the session. We present an
authorization failure; people may not realize that they are
still logged in (see test plan - bonus).
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Tue, 15 Nov 2022 13:53:17 +0000 (13:53 +0000)]
Bug 32208: Extend Auth.t
Test plan:
Without follow-up patch, Auth.t should fail:
not ok 5 - No permission response
not ok 6 - checkauth returned failure
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Tue, 8 Nov 2022 13:40:17 +0000 (13:40 +0000)]
Bug 31908: Resolve second login with another userid
Somewhere the line undef $userid got removed.
We need it to resolve the second login situation.
Test plan:
Login in staff with user missing privileges.
On the login form login again with another staff user.
Note that you do no longer crash.
Run t/db../Auth.t
Run t/db../Koha/Auth/TwoFactorAuth.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Mon, 14 Nov 2022 11:07:09 +0000 (11:07 +0000)]
Bug 31908: Add a test to show issue
Test plan:
Without next patch, run Auth.t.
Should fail now before next patch resolves problem:
not ok 2 - Login of patron2 approved
ok 3 - Did not return previous session ID
not ok 4 - New session ID not empty
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Marcel de Rooy [Mon, 14 Nov 2022 11:09:43 +0000 (11:09 +0000)]
Bug 31908: Replace an exit by a safe_exit in Auth.pm L1314
No change in user experience. But since we can mock safe_exit,
we can enhance test results.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Thu, 8 Dec 2022 21:13:00 +0000 (21:13 +0000)]
Bug 31935: (follow-up) Make form look better
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Mon, 24 Oct 2022 22:53:24 +0000 (22:53 +0000)]
Bug 31935: Fix misaligned form when adding serial subscription
This patch attempts to fix the misaligned form on subscription-add.tt by removing some of the wrapping <p> tags and adding labels where appropriate.
To test:
1. Add a serial subscription and notice the misaligned form on step 1.
2. Apply patch
3. Look again and confirm that the form looks better.
4. Read through everything and make sure the form still makes sense.
5. Make sure the form still works properly.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Frédéric Demians [Sat, 24 Dec 2022 08:20:09 +0000 (09:20 +0100)]
Bug 32531: Restore behaviour of 'include archived' filter
In Suggestions management, there is a sidebar menu to organize and
filter suggestions. In the "Suggestion information" filter section,
there is a checkbox "Include archived". When this box us unchecked, the
archived suggestions are not displayed. When this box is checked, all
suggestions are displayed, archived, and not archived. This is not the
case anymore, only archived suggestions are displayed, supposedly since
patch for bug 23991.
TO TEST:
1. On a Koha installation remove all suggestions (in the table).
2. Create two suggestions. Archive one of them.
3. Check/Uncheck filter 'Include Archived'. Confirm that when the box is
checked, you don't see anymore the unarchived suggestion.
4. Apply the patch.
5. Repeat 3, and confirm that the filter operates properly.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 32529: Make Koha::Item->safe_to_delete consider 'P' holds as found
Currently, the Koha::Item->safe_to_delete method checks (among other things) if there are existing waiting or in-transit holds.
It seems that 'In processing' should block item deletion as well.
This patch implements that.
To test:
1. Apply up to the regression tests
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Item.t
=> FAIL: Boo! Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch adds a method for filtering Koha::Holds resultsets by the
status belonging to Koha's concept of 'found'.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Holds.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Wed, 4 Jan 2023 10:28:32 +0000 (11:28 +0100)]
Bug 32445: Deal with biblio course reserve
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Is it correct? I let a comment on bug 19532 comment 928 to ask for
clarification.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 3 Jan 2023 10:55:25 +0000 (11:55 +0100)]
Bug 32445: include item-status-schema-org.inc
Can be discussed, but it will prevent to fetch several times the same
related objects
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 3 Jan 2023 10:43:28 +0000 (11:43 +0100)]
Bug 32445: Remove non-Koha::Item support from item-status.inc
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 3 Jan 2023 10:29:34 +0000 (11:29 +0100)]
Bug 32445: Fix notforloan display
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 3 Jan 2023 10:19:32 +0000 (11:19 +0100)]
Bug 32445: Fix availability display on opac-basket
Also fix holding branch
Will display an empty span if no location, big deal?
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 3 Jan 2023 10:02:37 +0000 (11:02 +0100)]
Bug 32445: Fix availability display on opac-course-details
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Fridolin Somers [Mon, 12 Dec 2022 19:46:18 +0000 (09:46 -1000)]
Bug 32445: Fix display of 'not for loan' items in staff
test plan :
1) Edit any item, item type should be for loan, so not set to reference.
2) Set Not for loan status to "not for loan".
3) Go to the staff detail page:
=> Without patch it displays as: Not for loan (Not For Loan) Available
=> With patch it displays as: Not for loan (Not For Loan)
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Lucas Gass [Thu, 10 Nov 2022 21:14:09 +0000 (21:14 +0000)]
Bug 32173: Add list count to shelves.tt
To test:
1. Build a list and look at it in the staff client.
2. No indication of how many items are in the list.
3. Apply patch and look again
4. You should see "This list contains x titles"
Signed-off-by: Barbara Johnson <barbara.johnson@swbell.net> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Tue, 22 Nov 2022 11:50:32 +0000 (11:50 +0000)]
Bug 32319: Give header search submit button more padding
This patch tweaks the appearance of the header search submit button so
that it has a little more spacing, making it an easier click target.
The patch also gives the button a slightly different hover state in
order to make it clearer that it's a button.
To test, apply the patch and rebuild the staff interface CSS.
View various pages in the staff interface to confirm that the header
search bar looks good and works correctly at various screen sizes.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>