Bug 30728: Make RealTimeHoldsQueue disabled by default
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 30728: Only trigger real-time holds queue update if enabled
This patch makes the places in which Koha enqueues holds queue for
real time updates verify the feature is enabled.
To test:
1. Apply this patches up to the unit tests
2. Run:
$ updatedatabase
$ kshell
k$ git diff origin/master --name-only | grep -e '\.t$' | xargs prove
=> FAIL: tests fail, the code doesn't care about the syspref
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Be happy!
6. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 30727: Avoid holds queue updates multiple times on BatchDeleteBiblio
This patch makes the background job only enqueue holds queue updates
once per biblio, when appropriate.
To test:
1. Apply the regression tests patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/BackgroundJobs/BatchDeleteBiblio.t
=> FAIL: It enqueues 3 times for a bib!
3. Apply this patch
4. Repeat 2
=> SUCCESS: It only enqueues once!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Now that we've remove the last of the translated .sql files, we can just
drop this test entirely.. translation is now handled on pootle for all
languages. Woopie! :)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Fri, 6 May 2022 11:19:36 +0000 (12:19 +0100)]
Bug 30695: (QA follow-up) Catch moremember.tt too
This patch does the same treatment for moremember.tt where the same
summary block is includes. We also correct the tab order to be a little
more consistent too.
We should really move this to an include and refer to it from both
templates instead of this copy/paste code..
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 30127: By default show pending suggestions tab
Pending suggestions are the most important ones in links pointing to suggestions.
This tab should be the default one, like did Bug 7875
Changing order in perl code seems really difficult because it is a
generic code using GetDistinctValues()
Test plan :
1) Create some suggetions, accept some of them
2) In staff interface, click on 'More > Suggestions'
=> You see pending tab selected
3) In left menu, click on 'Suggestions' under 'Late orders'
=> You see pending tab selected
4) In left menu, use a filter, then click on '[clear]'
=> You see pending tab selected
5) Create a suggestion, click on 'cancel'
=> You see pending tab selected
6) Create a suggestion, click on 'Suggestions' in breadcrumbs
=> You see pending tab selected
7) Edit an existing suggestion, click on '<< Back to suggestions'
=> You see pending tab selected
8) Create a suggestion, click on 'Submit your suggestion'
=> You see pending tab selected
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Mon, 9 May 2022 07:42:30 +0000 (09:42 +0200)]
Bug 30603: Fix other occurrences
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Mon, 9 May 2022 07:28:04 +0000 (09:28 +0200)]
Bug 30603: Display Sort1 and Sort2 as free text if no AV exists
Test plan:
Don't define AV for Sort1 and Sort2, edit a patron
=> Should be editable via an input box
Define AVs for Sort1 and Sort2, edit a patron
=> Should see the dropdown
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 6 May 2022 14:45:13 +0000 (14:45 +0000)]
Bug 30710: Build holds queue once per biblio when batch deleting items
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Roch D'Amour [Wed, 21 Feb 2018 15:55:35 +0000 (10:55 -0500)]
Bug 13412: Allow configuration of auto-created authorities
This patch add 2 new system preferences:
- GenerateAuthorityField667
- GenerateAuthorityField670
When Koha creates authority records from biblios, use these preferences instead of the hard-coded "Machine generated authority record." and "Work cat." values.
Test plan:
1. Make sure AutoCreateAuthorities and BiblioAddsAuthorities are enabled in the system preferences
2. Go to Home › Cataloging › Add MARC record and add a new record
3. Fill in the required fields and add a name in the 100$a field. Note the name, and add the new record.
4. run rebuild_zebra.pl -a
5. Go to Home › Authorities and search for the name you entered in 100$a
6. Select details and look at the 667 and 670 fields. They should default to the hard-coded values.
7. Apply patch, run update database
8. Edit the new GenerateAuthorityField667 and GenerateAuthorityField670 system preferences
9. Do 2-6 . Now the 667 and 670 fields should be what you entered in the system preferences.
Thanks for testing
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well, no errors
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
George Veranis [Thu, 24 Feb 2022 15:16:19 +0000 (16:16 +0100)]
Bug 20615: Add the link of number of times the authority are used in edit mode
Currently when show an authority record you can see the count of records linked
with that authority, but when edit that authority record the that detail is
dissapeared.
Applying this patch will have that information also on edit mode of authority.
Test plan:
1) Search for an authority that is already connected with at least one record
2) On detail view of an authority you can check that authority is linked with
x records.
3) Edit that authority and the information about in how many records that
authority is linked is missing.
4) Apply this patch
5) Edit again that authrity and you can find now the count in how many records
is used that authority
Lucas Gass [Mon, 11 Apr 2022 21:36:16 +0000 (21:36 +0000)]
Bug 30510: Add Patron reason column to suggestion tables
To test:
1. Make some patron reasons for suggestion via Home > Administration > Authorized values > OPAC_SUG
2. Give those reasons a description.
3. Make several suggestions via staff client and/or OPAC and apply some of the reasons you just made
4. Apply patch
5. Go to Home > Acquistions > Suggestions management
6. Give some of the suggestions some different status (PENDING/REJECTED/ACCEPTED/ect)
7. Make sure on each of the tables you can see the column 'Patron reason'
8. Go to Administration > Table settings and attempt to hide the column.
9. Confirm that the column is properly hidden on the Suggestions management page
Alex Buckley [Mon, 4 Apr 2022 04:22:39 +0000 (04:22 +0000)]
Bug 23352: (follow-up) Fix QA test failure
Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Alex Buckley [Mon, 7 Mar 2022 04:37:12 +0000 (04:37 +0000)]
Bug 23352: (follow-up) Fixes for QA review
Test plan:
1. Confirm that
installer/data/mysql/atomicupdate/bug_23352-add_ccode_column_to_subscriptions_table.pl
has the exec flag
2. Create a subscription. Notice the 'Collection' dropdown defaults to
the 'None' option - same as Location
3. Save the subscription without changing the 'None' collection
4. Receive the serial and confirm the 'Collection' field is empty
5. Create a second subscription. Change the 'Collection' dropdown to
'Fiction', then save the subscription
6. Receive the serial and confirm the 'Collection' dropdown is set to
'Fiction'
7. Confirm that the 'Collection code' terminology in the template is replaced with
'Collection'
Sponsored-By: Brimbank Library, Australia Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Alex Buckley [Mon, 13 Dec 2021 15:28:36 +0000 (15:28 +0000)]
Bug 23352: Set default collection code when creating subscription
The default collection code set in the subscription will be applied if
item records are created when receiving the serial.
Test plan:
1. Apply 3 patches
2. Run updatedatabase.pl and restart services
3. Create a subscription:
- Tick the 'Create an item record when receiving this serial' radio
button
- Select values in the Location, Collection code and Item type dropdowns
- Save the subscription
4. Confirm the Location, and Collection code default values
you choose in #3 are displaying in the 'Information' tab of page that's
loaded
5. Receive the serial:
- Click 'Receive'
- Change the status dropdown from 'Expected' to 'Arrived'
- Confirm the 'Collection Code', 'Shelving location' and 'Koha item
type' dropdowns are pre-filled with the values you defined in #3
6. Run unit test t/db_dependent/Serials.t
Sponsored-By: Brimbank Library, Australia Signed-off-by: Samu Heiskanen <samu.heiskanen@hypernova.fi> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Mon, 21 Mar 2022 16:00:47 +0000 (16:00 +0000)]
Bug 28082: Add acquisitions toolbar to vendors on vendor search page
This patch makes a number of changes to the vendor search/view template
in order to make it work better in different contexts:
- Add a vendor-specific toolbar under each vendor search result. This
gives instant access to the options for a new basket, new contract,
vendor edit, or to receive shipments. A delete button will appear if
available.
- Add a summary of the number of baskets and subscriptions. This helps
the user know if there are closed baskets and whether an outstanding
subscription might be blocking the option to delete. Each number is
linked to the view of those entries.
- Indicate whether a vendor is inactive. The vendor name appears in a
different color when it is inactve and is labeled as such.
To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- To test you should have multiple vendors in your system, some active
and some inactive. Add some baskets and subscriptions to one or more
if necessary.
- Go to Acquisitions and submit an empty vendor search to show all
vendors.
- Verify that the page looks correct and that all controls work as
expected.
- Open the basket view for a single vendor and compare the two views.
Lucas Gass [Fri, 15 Apr 2022 14:00:01 +0000 (14:00 +0000)]
Bug 30438: Add select all/clear all buttons to invoices.tt
To test:
1. Apply patch
2. Have a bunch of invoices, some open and some closed.
3. Go to Home > Acquisitions > Invoices and do a search that will
return you many of those invoices, some open and some closed.
4. Notice the 'Select all' and 'Clear all' buttons.
5. Try clicking 'Select all' on the Open invoices tab. All Open invoices
should become checked.
6. Try clicking 'Clear all' on the Open invoices tab. All open invoices
should become unchecked.
7. Try 5 - 6 again but on the Closed invoices tab.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Fri, 6 May 2022 10:36:15 +0000 (11:36 +0100)]
Bug 30611: (QA follow-up) Only show reset option for allowed categories
This patch adds a check that the patron can reach the password reset
page using category.effective_reset_password which handles fallback to
OpacResetPassword system preference transparently.
Test plan
1) Set at least one patron category to dissallow patron password resets
2) Search for a patron of that category
3) Confirm the 'Send password reset' option no longer appears
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Fri, 29 Apr 2022 09:42:57 +0000 (10:42 +0100)]
Bug 30611: Add ability for staff to send password reset emails
This patch adds the ability for staff with the edit_borrowers permission
to send password reset emails to users.
The staff initiated password reset has it's own notice,
STAFF_PASSWORD_RESET, and the reset link produced has an extended
timeout of 5 days, as apposed to the usual 2 day limit.
Test plan
1) Apply patch and run the database update
2) Login to the staff client with a user who has the 'edit_borrowers'
permission.
3) Note that a new, 'Send password reset' option appears under the
'More' menu on the patron details page.
4) Clicking the button will queue the STAFF_PASSWORD_RESET notice and
redirect the user to the Notices tab.
Martin Renvoize [Fri, 29 Apr 2022 11:14:38 +0000 (12:14 +0100)]
Bug 30611: Add STAFF_PASSWORD_RESET notice
This patch adds a new STAFF_PASSWORD_RESET notice template for password
recoveries initiated via the staff client as aposed for those initiated
by the end user.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Chmod 755 on atomic update file. Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Mon, 14 Mar 2022 13:01:22 +0000 (13:01 +0000)]
Bug 30290: (follow-up) Add warning for translated notices
Note: Problem is that we cannot know if default was translated
or en contains the original notice. Actually this holds for
the other languages too. So this is an educated guess without
using the lang field.
Test plan:
Run db rev.
Trigger the warning by replacing Pages by PPages in an AR notice.
Run db rev again.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Mon, 14 Mar 2022 11:54:33 +0000 (11:54 +0000)]
Bug 30290: Database revision for existing notices
Note: It will be hard to update translated notices. If we cannot find
the part 'Pages:' then the replace does not do anything.
Test plan:
Run db rev.
Check an existing AR notice (English).
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Mon, 14 Mar 2022 11:37:11 +0000 (11:37 +0000)]
Bug 30290: Adjust sample_notices.yml
Test plan:
Run a new install. Check the AR notices.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Fri, 6 May 2022 13:31:31 +0000 (13:31 +0000)]
Bug 30706: Fix space in check for dateformat preference
This patch fixes the calendar.inc includes in both staff and OPAC in
order to remove a typo: An extra space in the check for the "dateformat"
system preference.
The result of this error is that changes to the dateformat system
preference will not be correctly applied to Koha without a restart.
To reproduce the problem start the process of creating a new patron.
- In the date of birth field, select a date. The format of the date
inserted should match your current dateformat system preference.
- Go to Administration -> System preferences and update dateformat to
something different.
- Go back to the patron creation form (refresh it if necessary).
- The hint under the Date of birth field will match your updated system
preference, but when you pick a date using the calendar widget it
will still be formatted according to the old value of dateformat.
To test the fix, apply the patch and run through the same steps above.
A change the dateformat preference should be immediately reflected in
the functionality of the calendar widget.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 6 May 2022 20:10:54 +0000 (20:10 +0000)]
Bug 30668: Do not record itme location updates in cataloguing log
To test:
1 - Set a rule in UpdateItemLocationOnCheckin
2 - Enable cataloguing log
3 - Check in an item that will trigger a change
4 - Check the modification log for item - there is a cataloguing entry
5 - Apply patch
6 - Repeat
7 - No log!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Thu, 10 Feb 2022 14:30:02 +0000 (14:30 +0000)]
Bug 29755: Check each NoIssuesCharge separately
This patch updates SIP patron code to use account methods to calculate balances
over the patronflags returns. It also checks if patron should be blocked for each
'No Issues charge' preference
Tests are added for NoIssuesChargeGuarantees
To test:
1 - Set noissuescharge preference to 5
2 - Add a $10 charge to a patron
3 - perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron BARCODE
4 - Note the 64 message starts with Y's that mean patron is blocked
5 - Set noissuescharge to 11
6 - Repeat 3, patron is no longer blocked
7 - Set NoIssuesChargeGuarantees to 8
8 - Repeat 3, patron is blocked
9 - Pay $3 on patron so they owe 7
10 - Repeat 3, patron is not blocked
11 - Add a child account with patron as guarantor
12 - Repeat 3, patron is not blocked
13 - Add a $4 charge to child
14 - Repeat 3, patron is blocked
15 - Repeat 3, but with child barcode, child is not blocked
16 - Set NoIssuesChargeGuarantorsWithGuarantees to 10
17 - Repeat 3, patron is blocked
18 - Repeat 3 with child barcode, child is blocked
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Julian Maurice [Tue, 18 Jan 2022 13:36:34 +0000 (14:36 +0100)]
Bug 30604: Add value builders for UNIMARC 146 ($a, $h and $i)
Test plan:
1. Configure the default MARC framework to use those value builders:
- unimarc_field_146a for 146$a
- unimarc_field_146h for 146$h
- unimarc_field_146i for 146$i
2. Verify that they all work correctly according to
https://www.ifla.org/files/assets/uca/unimarc_updates/BIBLIOGRAPHIC/u-b_146.pdf
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Fri, 6 May 2022 07:24:07 +0000 (07:24 +0000)]
Bug 30703: Remove a few CookieManager warnings
Running Auth.t produces several warnings like:
Use of uninitialized value $name in hash element at /usr/share/koha/Koha/CookieManager.pm line 103.
Use of uninitialized value $name in hash element at /usr/share/koha/Koha/CookieManager.pm line 104.
Use of uninitialized value $name in hash element at /usr/share/koha/Koha/CookieManager.pm line 112.
Use of uninitialized value $name in hash element at /usr/share/koha/Koha/CookieManager.pm line 103.
Use of uninitialized value $name in hash element at /usr/share/koha/Koha/CookieManager.pm line 104.
Use of uninitialized value $name in hash element at /usr/share/koha/Koha/CookieManager.pm line 112.
Use of uninitialized value $name in hash element at /usr/share/koha/Koha/CookieManager.pm line 103.
Use of uninitialized value $name in hash element at /usr/share/koha/Koha/CookieManager.pm line 104.
Use of uninitialized value $name in hash element at /usr/share/koha/Koha/CookieManager.pm line 112.
Test plan:
prove t/CookieManager.t t/db_dependent/Auth.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Shi Yao Wang [Fri, 15 Apr 2022 16:37:34 +0000 (12:37 -0400)]
Bug 30551: Make cash register report take branchcode from cash register
This patch makes it so cash register reports puts branchcode from the
cash register where the payment was made into "Transaction library"
column instead of taking the branchcode of the manager.
Test plan:
1- Use cash registers (administration > system preferences > UseCashRegisters)
2- Create another library if you only have one (administration > libraries > new library)
3- Create a cash register in each library if they don't already have one (administration > cash registers > new cash register)
4- Create a fee on your own account and pay it right after in both libraries.
5- Go to reports > cash register and generate the statistics.
6- Notice "transaction library" in both rows are the same even though the fees were paid in two different libraries and two different cash registers.
7- Apply the patch and click submit to re-generate statistics
8- Notice it now shows the correct library where the transactions were done
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Fridolin Somers [Wed, 15 Dec 2021 21:19:21 +0000 (11:19 -1000)]
Bug 29705: In test suite merge IssuingRules with CirculationRules
After Bug 18936, in test suite, there is still t/db_dependent/Koha/IssuingRules.t and t/db_dependent/Koha/IssuingRules/
This patch moves IssuingRules.t inside CirculationRules.t and renames dir t/db_dependent/Koha/IssuingRules.
And adds DB transation in each first-level subtest.
Also renames in :
use constant GUESSED_ITEMTYPES_KEY => 'Koha_IssuingRules_last_guess';
Test plan :
Run prove t/db_dependent/Koha/CirculationRules.t
prove t/db_dependent/Koha/CirculationRules/*
prove t/db_dependent/Circulation/maxsuspensiondays.t
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Thu, 5 May 2022 10:47:04 +0000 (10:47 +0000)]
Bug 30688: Error in path to CSS background image
This patch corrects the path of an image specified as the background to
a couple of elements in the OPAC. The incorrect path was causing 404
errors.
To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- If necessary, activate one or more cover image services in
Administration, e.g. OPACAmazonCoverImages, OPACLocalCoverImages,
and/or OpenLibraryCovers.
- In the OPAC, locate a bibliographic record which has a cover image
from one or more of the services you activated.
- On the detail page for that record, the cover should load correctly.
- In the browser console you should see no errors related to a file not
found: /opac-tmpl/bootstrap/img/spinner-small.gif
- In the browser console, submit this JavaScript snippet:
$(".cover-image").remove();
The cover image should disappear, revealing the "spinner" icon behind
it.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 28 Apr 2022 12:42:04 +0000 (14:42 +0200)]
Bug 30639: Split search terms for patron search
If several terms are passed we should split them.
Test plan:
Search for "edna acosta" (without quotes) in the filters from the left
side of the main patron search
Do some regression tests
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
We want to keep the default initComplete call to add/remove the
'disabled' class on the 'Clear filters' link.
Test plan:
Search for patrons, add something to the general DT search and confirm
that the 'Clear filters' link can be clicked (ie. is not disabled) when
the input field is not empty.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Agree that it does not look very elegant. Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Tue, 12 Apr 2022 14:23:42 +0000 (14:23 +0000)]
Bug 30514: Error in date format check following datepicker removal
This patch corrects the is_valid_date function in the OPAC and staff
interface so that it work correctly with Flatpickr.
To test, apply the patch and clear your browser cache if necessary.
- In the staff client, locate a bibliographic record and edit its items.
- Test that the "Date acquired" date picker works correctly and that
there are no errors in the browser console.
- Test other date input fields to check that they still work, e.g.
specify due date during checkout; Catalog statistics wizard; Patron
entry/modification, etc.
- Perform similar tests in the OPAC: Hold suspension; Update your
personal details.
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Fri, 6 May 2022 12:05:12 +0000 (12:05 +0000)]
Bug 30709: 'Insert' button in notices editor not adding selected placeholders to notice
This patch updates letter.js so that it uses .prop("selected") to look
for selected <option>s instead of .attr("selected"). This is necessary
because of the jQuery upgrade.
To test, apply the patch and edit any notice. Test that you can select
one or more database columns and insert them into the body of a notice
by clicking "Insert." Confirm that your selections are inserted where
you left the cursor in the message textarea.
Test with multiple message transports and with multiple languages
installed (with TranslateNotices enabled).
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 29926: (QA follow-up) Date format missing in spec
On fixing the spec to have `format: date` I noticed the tests were
expecting explosions because of date handling not being done. The
OpenAPI plugin does this correctly when you set the format right.
So, I adapted the tests so they expect 400 and return the type error.
We don't usually add such tests (i.e. test the plugin does its job
correctly) but it doesn't hurt to keep them just in case something
really changes badly there (plugin bug?).
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch makes the following changes to the spec:
* Password being the resource and expiration_date an attribute for it,
so reorganizing things and also renaming the route.
* Be it undefined or defined, expiration date is only one and thus
should use the PUT verb (as in overwrite).
* Minor bug 30194-related fixes.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Mon, 14 Feb 2022 16:34:23 +0000 (16:34 +0000)]
Bug 29926: Add ability for superlibrarians to batch edit password expiration dates
To test:
1 - Sign in as a superlibrarian
2 - Tools->Batch patron modification
3 - Add patrons with and without pasword expiration set
4 - Confirm dates display correctly on modification page, or show never
5 - Check the box to delete all dates
6 - Confirm patrons now show 'Never'
7 - Edit patrons again, set a date
8 - Confirm date is set correctly
9 - Sign in as a user with catalogue/tools/borrowers permissions, but not superlibrarian
10 - Confirm y9ou do not see, and cannnot edit password expiration dates
Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Mon, 14 Feb 2022 16:01:07 +0000 (16:01 +0000)]
Bug 29926: Add ability for superlibrarian to view/edit password expiration
To test:
1 - Sign in as a superlibrarian
2 - Find a patron account with no password expiration set
3 - View member detials
4 - note expiration says 'Never'
5 - Edit patron
6 - Set patron expiration
7- Save
8 - View details, confirm password expiration shows correctly
9 - Sign in as non-superlibrarian
10 - Confirm you don't see expirationdate on details page
11 - Edit patron and confirm password expiration does not show
12 - Edit HTML and confirm you epxiration date not saved
<input type="text" name="password_expiration_date" value="2052-05-02">
Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Mon, 14 Feb 2022 16:00:23 +0000 (16:00 +0000)]
Bug 29926: Add pasword expiration route for API
To test:
1 - prove -v t/db_dependent/api/v1/patrons_password_expiration.t
Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Thu, 10 Feb 2022 12:20:20 +0000 (12:20 +0000)]
Bug 29925: (follow-up) Allow password reset when OpacPublic not set
Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Wed, 26 Jan 2022 12:10:49 +0000 (12:10 +0000)]
Bug 29925: Add a password reset page for expired passwords
This patch adds a new page opac-reset-password where a user cna enter their login
(userid or carndumber), current password, and new password.
If the user has a password expiration date and the current password is correct and
the new passwords match and meet requirements their password will be updated and the
expiration date reset
A patron whose password does not expire will be reidrected to login to change their password
To test:
1 - Apply patch, updatedatabase, enable new syspref EnableExpiredPasswordReset
2 - Set 'Password expiration' for a patron category
Home->Administration->Patron categories->Edit
3 - Create a new patron in this category with a userid/password set, and an email
4 - Update the patron with an expiration to be expired
UPDATE borrowers SET password_expiration='2022-01-01' WHERE borrowernumber=51;
5 - Give the borrower catalogue permission
6 - Attempt to log in to Straff interface
7 - Confirm you are signed out and notified that password must be reset
8 - Click 'Reset your password' link
9 - You should see the reset password page with fields for: login, current password, new password, conmfirm password
10 - enter invalid/incomplete credentials
11 - Confirm you are notified of invlaid credentials
12 - Fill in all fields, but enter current password as new password
13 - Confirm you are notified of no change
14 - Set minimum password length / strong password requirement for category
15 - Confirm you receive error if new password too short or not secure
16 - Enter a valid new password and submit and confirm update is successful
17 - Confirm you have buttons to go to OPAC or Staff and that both work
18 - Confirm you cna log in (i.e. expiration has been reset)
19 - Expire the users password
20 - Remove catalogue permission
21 - Reset password again and confirm only OPAC link
Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 29924: Avoid leaking information on wrong credentials
If the passed credentials are wrong, we shouldn't expose things like the
password is expired.
This patch takes care of that.
To test:
1. Have a known patron with password_expiration_date set so its
password is expired. Can be done like:
$ koha-mysql kohadev
> UPDATE borrowers \
SET password_expiration_date='2022-04-25' \
WHERE borrowernumber=132;
Note: change the borrowernumber
2. Attempt to login to the OPAC with wrong credentials
=> SUCCESS: You are rejected, with a message telling credentials are
wrong
=> FAIL: You are told the password is expired.
3. Apply this patch and restart Plack
4. Repeat 2
=> SUCCESS: You are rejected, credentials are wrong and no mention to
password being expired.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Wed, 23 Mar 2022 15:58:30 +0000 (15:58 +0000)]
Bug 29924: Update ILSDI to be aware of expired passwords
To test:
1 - Enable ILSDI
2 - Set a patron password with expired password
3 - http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=AuthenticatePatron&username=usernam&password=password
4 - Confirm 'PasswordExpired' returned
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 25 Feb 2022 18:45:17 +0000 (18:45 +0000)]
Bug 29924: (follow-up) Add default value undef for TestBuilder
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 11 Feb 2022 13:34:37 +0000 (13:34 +0000)]
Bug 29924: (follow-up) Add password_expiration_date to API
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Owen Leonard [Tue, 25 Jan 2022 15:08:39 +0000 (15:08 +0000)]
Bug 29924: (follow-up) Add bug number to atomicupdate; Style OPAC message
- The atomicupdate didn't have "bug_number" defined.
- The "Your password has expired" message is now styled with the same
class as other OPAC login messages.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 21 Jan 2022 17:11:39 +0000 (17:11 +0000)]
Bug 29924: Unit tests
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 21 Jan 2022 17:01:10 +0000 (17:01 +0000)]
Bug 29924: Add password expiration feature
This patch adds the ability to define password_expiry_days for a patron
category.
When defined a patron's password will expire after X days and they will
be required to reset their password. If OPAC resets are enabled for the
catgeory they may do so on their own, otherwise they will need to
contact the library
To test:
1 - Apply patch, updatedatabase
2 - Set 'Password expiration' for a patron category
Home-> Administration-> Patron categories-> Edit
3 - Create a new patron in this category with a userid/password set,
and an email
4 - Confirm their password_expiration_date field is set
SELECT password_expiration_date FROM borrowers WHERE borrowernumber=51;
5 - Create a new patron, do not set a password
6 - Confirm their password_expiration_date field is NULL
7 - Update the patron with an expiration to be expired
UPDATE borrowers SET password_expiration_date='2022-01-01' WHERE borrowernumber=51;
8 - Give the borrower catalogue permission
9 - Attempt to log in to Straff interface
10 - Confirm you are signed out and notified that password must be
reset
11 - Attempt to sign in to OPAC
12 - Confirm you are signed out and notified password must be reset
13 - Enable password reset for the patron's category and perform a
password reset
Note: you will have to find the link in the message_queue unless
you have emails setup on your test environment
SELECT * FROM message_queue WHERE borrowernumber=51;
14 - Confirm that you can now sign in and password_expiration_date field
is set 10 days in the future
15 - Expire the patron's password again
16 - Change the patron's password via the staff interface
17 - Confirm they can sign in and the expiration is updated
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Fri, 21 Jan 2022 16:59:41 +0000 (16:59 +0000)]
Bug 29924: Database updates
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Julian Maurice [Fri, 15 Apr 2022 08:01:00 +0000 (10:01 +0200)]
Bug 30563: Add syspref to make the "cash register" field mandatory
Test plan:
1. Apply patch and run updatedatabase
2. Enable 'UseCashRegisters' syspref and create at least one cash
register for your library
3. Verify that you have several authorized values in the 'PAYMENT_TYPE'
category. One of them should be 'CASH'
4. Go to a patron accounting tab, create a manual invoice and go to the
payment form. Select payment type 'CASH' and verify that you cannot
submit the form if no cash register is selected.
Select another payment type and verify that you can submit the form
even if no cash register is selected
5. Set syspref 'RequireCashRegister' to 'always require a cash register'
6. Repeat step 4 but this time you should not be able to submit the form
if no cash register is selected, no matter which payment type is
selected.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Marcel de Rooy [Fri, 6 May 2022 06:32:51 +0000 (06:32 +0000)]
Bug 28998: (follow-up) Adjust the Auth.t fix
Move the encode_secret call where we need it (when pref is enabled
and patron switches to 2FA).
Mock the koha-conf encryption_key.
Disable 2FA when exiting subtest.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2) If you are logged in Koha, log out, on the login screen the text
at the top should say the following, "Log in using a Shibboleth
account"
Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>