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>
(cherry picked from commit fc909d3bf42b5f074485ec01892f0e69eb4bd2dc) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
(cherry picked from commit bbec1228b62c81c0fa9e4a330cd4b28aed27ca99) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
(cherry picked from commit 328984439c438a13cb40adc1ad40833797274414) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
(cherry picked from commit d88e966adadc332b21c30993fd9d5edd5e907c0f) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Katrin Fischer [Wed, 28 Dec 2022 21:26:13 +0000 (21:26 +0000)]
Bug 32520: Amend DefaultPatronSearchFields system preference description
Tries to clarify that the preference is not only used for the search
in the patrons module, but also in circulation.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0f2cf9f44018cd52a2616a104aa94d02148786c2) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
(cherry picked from commit 6898f1f132b5a01eb4c406fa711b3d13324ef538) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
(cherry picked from commit a99d188e78d42b7c2b9f2091a64142ba45909c70) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
(cherry picked from commit 09874fce6c98f6ec80361da899ba54fac277bd79) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
(cherry picked from commit 5e863f93c06e1e67ddbf0c705657ca7d024006f6) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
(cherry picked from commit e88f31d8a28566cef2275c3d9e62f3432b1f54f2) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
(cherry picked from commit e6efa820993c0b04fd848caf84658620b7ef337d) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
(cherry picked from commit 5197d63c5593b1e808fcbb10c0124c0ea252bbcb) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
(cherry picked from commit 2a5e06094bfab455fa05721bde6e9ee7619716c2) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
(cherry picked from commit 17ff4e3889188a4420ef0d6399b64749ad8e46a5) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
(cherry picked from commit a85a6bc4d4a1c15a065dc8b188d6de0c23f99271) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
(cherry picked from commit 7818717f3c69bcaf5953d6139f6a104dfb1c4ee7) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
(cherry picked from commit aa6d1ca0c7959298e9c12f7255148d245aae1937) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
(cherry picked from commit ab48b53d96bd33a37181b13bbb517500eae61fc2) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Marcel de Rooy [Tue, 24 Jan 2023 13:38:41 +0000 (13:38 +0000)]
Bug 32393: (QA follow-up) Add explicit undef response in two catch blocks
Do not implicitly depend on last statement returning nothing.
Make it explicit. We want $args to be null here.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 08cc23626c30a61254eddd552f6b23253876d753) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Jonathan Druart [Tue, 24 Jan 2023 08:11:25 +0000 (09:11 +0100)]
Bug 32393: Deal with the DB fallback part
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 85c330d8f2ca6246cf3619c8075907cce8387be0) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
(cherry picked from commit 8df96262c145fc0ee26c019601b6a86de9396915) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
(cherry picked from commit ca9a5981839a444fce109540035f26cac2780611) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
(cherry picked from commit b3c5bd02e15e5f2e5c0eae3b06f26083b4856f3d) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
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>
(cherry picked from commit fc650b3e871e1d558ca1ff9f0dcb2f1fa0ad5db2) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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>
(cherry picked from commit 9608b16a6ba9d877dddc75beb1e1eef691f7b21a) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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>
(cherry picked from commit 790f00781ab6c98017529ebf226d52c36c36cd68) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Shi Yao Wang [Thu, 14 Jul 2022 14:41:27 +0000 (10:41 -0400)]
Bug 14784: (follow-up) Unit tests
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dd5a62b1fcb02e2e743a04325abb35971031dbfe) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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>
(cherry picked from commit a05bb1e36dd8af51dd2a2039593a4303879bb62d) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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>
(cherry picked from commit be569f1aa52ee18dd526b1da37c3baea46143dec) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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>
(cherry picked from commit b5f49be55587fd4761537b317233440598bd8c9f) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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>
(cherry picked from commit 8603f3c6f16f34ab33defcb6f3a0977481479455) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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>
(cherry picked from commit b05ec80bbf46e039befcc978be3c101c2fd7f21e) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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>
(cherry picked from commit c8d4fa56d33dc1a07cdbebe19dd9e20d4e623ddd) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@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>
(cherry picked from commit 9d950959bfee9304035ccf2789d2904a7c0b49c0) Signed-off-by: Jacob O'Mara <jacob.omara@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>
(cherry picked from commit afcf0c95b43011aa1172c24d66b9b95b7662836b) Signed-off-by: Jacob O'Mara <jacob.omara@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>
(cherry picked from commit cb06a5912886bea9dd9d3587536a81a6f45f640c) Signed-off-by: Jacob O'Mara <jacob.omara@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>
(cherry picked from commit 21864739e650f6803a68befbe6d841820221f63e) Signed-off-by: Jacob O'Mara <jacob.omara@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>
(cherry picked from commit 2e51b7e5d9876834e6fbea27d766404148b519e4) Signed-off-by: Jacob O'Mara <jacob.omara@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>
(cherry picked from commit e6804714140b920b1400d4a985724b6fe99f8132) Signed-off-by: Jacob O'Mara <jacob.omara@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>
(cherry picked from commit aa1f97c2ea4376f5c3232846038c224c927dddc8) Signed-off-by: Jacob O'Mara <jacob.omara@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>
(cherry picked from commit 4ed95f95ff617e56138b7e8eff9fc953fc6b53cc) Signed-off-by: Jacob O'Mara <jacob.omara@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>
(cherry picked from commit f0e6f25428a997076d29dd3daeb905befed254f8) Signed-off-by: Jacob O'Mara <jacob.omara@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>
(cherry picked from commit 2ad22b26af3a32bf249395831c23d1e87e5db145) Signed-off-by: Jacob O'Mara <jacob.omara@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>
(cherry picked from commit e19aa35f3916313bc29215b3fc8fdb2106d82179) Signed-off-by: Jacob O'Mara <jacob.omara@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>
(cherry picked from commit 486d78f544f1fe074d4f474206155c4bcb02ea2a) Signed-off-by: Jacob O'Mara <jacob.omara@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>
(cherry picked from commit d3b4edf009ca7a29341f2dc8a8cebfdc807bad6d) Signed-off-by: Jacob O'Mara <jacob.omara@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>
(cherry picked from commit 9b1488f251eedbeafc6c7eb817984a0ce523b6ad) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit 855680bb11c23186e5058bc30f0132a2ff05f13d) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit c9caffcbbbc06b8132b645750eb65eefae25a132) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit c67e94a35608260121719fd78c31b7e1d85c7d64) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit f3333da49675daca9fc9d2147d31a446d20ac8ef) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit cc58ca2a3cc71d2af6b2342979ec310e89fec3a6) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit cd89c383219eb9355b225b51219007a08b5e339e) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
Jonathan Druart [Wed, 4 Jan 2023 14:33:41 +0000 (15:33 +0100)]
Bug 32349: Remove find-nonutf8 tests
We don't run it and it does not seem very useful. Let's remove it.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 26cce9e1c4e9c0ec6c41ffc60d89b3f75a40d227) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit 0adc264edb3172f7d2dca771efbe19d15f240d8f) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit a2e8d7cba23bab561f3ac32d51468410e3506940) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit b754d71ab1703fa77852952fefbfb42c0af0497d) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit cf04403dd88f747c92bc776cc4e130bc6e24e91c) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit 0e8f28b94212da131a2a289c500cd823dbc4a5e7) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit c3d7d72bc3e9cb433cea89657b8f5d110e898a1b) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit f8b7a5a9cd6bbd9ff5f6e58e6e6391178a2588da) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit b48ea1b4520700b20ab38e39370d86e4277807cc) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit 217ccf2eaebe847937e0961b307382758caf6338) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit 94a32b3f864ffcdc1d787bd275df1692d016f8df) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit 1c9d1e7cc5bb36d9572d26a8cd6450667031a397) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit 31c15ed3ccd74b34070dd560db7302e317e0b474) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit e9b3275376810e8524425b09d2272545262b93dd) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit dccb727d3ff2232552a737b37cca46d6d4139428) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit c346084facaae681bf5092ffcda7eef0c09eac6a) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit 2790faf62ea434f7e47f9742f7bea54dcddcf46b) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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>
(cherry picked from commit 509e828fc7309ac3cb4bba6c56bf2e4ef34b3b4a) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
Matt Blenkinsop [Wed, 30 Nov 2022 11:17:21 +0000 (11:17 +0000)]
Bug 32095: Remove bullets from inventory tool status
The new design included bullet points in a list where the elements were aligned to the right. The bullets have now been removed using "list-style: none;" to make the styling much cleaner.
Test plan:
1) Navigate to Cataloging > Inventory
2) Observe that in the "Optional filters for inventory list or comparing barcodes" section there are bullet points in the listed items
3) Apply patch
4) Navigate to the same window and observe that the bullet points are now missing
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>
(cherry picked from commit b46c25ef20b3322f1af1b1092a254017a8265a9c) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
Géraud Frappier [Thu, 17 Nov 2022 21:11:11 +0000 (16:11 -0500)]
Bug 32255: Resolve "Cannot use file upload in batch record modification"
When using the batch record modification tool with a file of biblionumbers, nothing happens. When we click 'Continue' the file is somehow removed before continuing.
To test:
1. Get a file of biblionumbers (if you already have a file, proceed to step 2)
1.1. Go to Reports
1.2. Click on 'Create from SQL'
1.3. Enter a report name (e.g. biblionumbers)
1.4. Enter the following SQL query
2. Create a MARC modification template (if you already have a MARC modification template, proceed to step 3)
2.1. Go to Cataloging > MARC modification template
2.2. Click 'New template'
2.3. Enter a template name (e.g. Add note)
2.4. Click 'Submit'
2.5. Click 'New action'
2.6. Choose
- Add new
- Field 500 a
- with value Note
2.7. Click 'Add action'
3. Batch modify records
3.1. Go to Cataloging > Batch record modification
3.2. In the 'Upload a file tab', choose the biblionumber file
--> Note that the name of the file appears next to the Choose button
3.3. In 'Template', select the MARC modification template
3.4. Click 'Continue'
--> The name of the file disappears next to the Choose button and goes back to 'No file chosen'
--> Message 'No records were modified
4. Apply path
4.1. Procede step 3.
4.2. See that we can see the list now
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bc974ef361926209b417502d86dbbacdb371f35a) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
David Cook [Thu, 20 Oct 2022 05:26:48 +0000 (05:26 +0000)]
Bug 23032: Show MARC21 880 for 264 on detail pages
This patch adds the 880 display for 264 (in addition to 260) on the
detail pages.
To test:
0) Apply patch
1) Create/edit a record
2) Create 264 $6 880-01 $a Xianggang : $b Tushuguan, $c 2022
3) Create 880 $6 264-01 $a 香港 : $b 图书馆, $c 2022
4) View record and see "Publication details" appear with the 880
script on the detail page on both the staff interface and OPAC
Signed-off-by: Johanna Miettunen <johanna.miettunen@haaga-helia.fi> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 66bf284a14a075db0500490c12c03273a39d3e48) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
Nick Clemens [Tue, 13 Dec 2022 14:24:13 +0000 (14:24 +0000)]
Bug 32456: Preserve date accessioned if a date is not explicitly passed
To test:
1 - Edit an item record to have a blank date accessioned
2 - Save the record as marcxml from the detail page
3 - Edit the item to have an accession date
4 - Stage and import the file - matching in KohaBiblio and replacing items
5 - Import the file
6 - Confirm the date accessioned is cleared
7 - Apply patch
8 - Provide an accession date for the item
9 - Stage and import the file again
10 - Confirm the date remained
11 - Edit the item to remove the date
12 - Confirm you can manually blank the field
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2255d42abdb45955e82634a7b6fe1e1af0242361) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
Nick Clemens [Fri, 16 Dec 2022 15:46:48 +0000 (15:46 +0000)]
Bug 32456: Unit tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ac6b7f9b5820b2515e1201568ba8648da935af06) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
Fridolin Somers [Fri, 25 Nov 2022 07:57:40 +0000 (21:57 -1000)]
Bug 32348: Add library public in columns settings
Bug 27360 added public info on libraries table.
This should be added to columns settings.
Currently the column "STMP server" can not be managed in settings.
Test plan :
Play with columns settings of table Administration > Libraries
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>
(cherry picked from commit 22865246926bf032cc3aa4a918a68bf467896dd7) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
Kyle Hall [Thu, 15 Dec 2022 14:11:23 +0000 (09:11 -0500)]
Bug 32475: Replace "System prefs" with "System preferences" on log viewer tool
Basically, the phrase "System prefs" used on the log viewer page (viewlog.pl) is slang and we should use the correct terminology that we use everywhere else.
Test Plan:
1) Apply this patch
2) Browes to Tools > Log viewer
3) Note under Modules, is shows "System preferences" now instead of
"System prefs"
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b929d3da028ed5269ef7dd032cebdb5ab13156b5) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
Emmi Takkinen [Tue, 15 Nov 2022 07:31:13 +0000 (09:31 +0200)]
Bug 30694: Set decreaseloanholds undef when deleting circulation rule
When one tries to delete rule with field "Decreased loan period
for high holds" filled, delete fails without errors. This happens
because rule isn't set in code section handling the delete in
smart-rules.pl.
To test:
1. Create a new circulation rule and fill all fields.
2. Try to delete the rule.
=> Rule isn't deleted, all fields except "Decreased loan period
for high holds" are now empty or have value "Unlimited".
3. Modify the rule and set field "Decreased loan period for high
holds" empty.
4. Delete the rule.
=> Rule is deleted successfully.
5. Create a new rule, fill all fields expect field "Decreased loan
period for high holds".
6. Delete the rule.
=> Rule is deleted successfully.
7. Apply this patch.
8. Again create a new rule with field "Decreased loan period for high holds" filled.
9. Try to delete the rule.
=> Rule is deleted successfully.
Sponsored-by: Koha-Suomi Oy Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 91fc31c32ba14817d989bcd34854ebc8e41fa936) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
Katrin Fischer [Sat, 19 Nov 2022 20:57:55 +0000 (20:57 +0000)]
Bug 31233: Amend 'fine grace period' as it's also used for suspensions
The grace period setting in circulation rules is not only used
for fines, but also for suspensions. So the label 'Fine grace period'
is a little misleading.
This patch updates it to "Fine/suspension grace period".
To test:
* Go to Administration > Circulation rules
* Verify the description is "Fine grace period" in the big table
* Apply patch
* Verify the description now changed to "Fine/suspension grace period"
https://bugs.koha-community.org/show_bug.cgi?id=32261 Signed-off-by: Hammat Wele <hammat.wele@inlibro.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aff2be24b76d98b03d731a13b3be4ed75f2f03db) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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: Martin Renvoize <martin.renvoize@ptfs-europe.com>