Commit graph

47974 commits

Author SHA1 Message Date
8755f77599
Bug 32330: Add indexes to table background_jobs
Table background_jobs should have indexes to optimize queries.

Query on borrowernumber :
mainpage.pl:    my $already_ran_jobs = Koha::BackgroundJobs->search(
mainpage.pl-        { borrowernumber => $logged_in_user->borrowernumber } )->count ? 1 : 0;

Query on status and queue :
misc/background_jobs_worker.pl:        my $jobs = Koha::BackgroundJobs->search({ status => 'new', queue => \@queues });

Test plan :
Run updatedatabase and play with background jobs

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-16 15:51:47 -03:00
3dcdd6db78
Bug 32394: (follow-up) Add param for Koha::BackgroundJob::StageMARCForImport->enqueue
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-16 09:00:45 -03:00
Michael Hafen
42d60ad850 Bug 32470: (Bug 14783 follow-up) Fix mysql error in db_rev for 22.06.000.064
Fix MySQL error:
ERROR 1093 (HY000): You can't specify target table 'systempreferences' for
 update in FROM clause

introduced by db_rev 064 for bug 14783.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-15 11:28:46 -03:00
bad638578b
Bug 32399: Remove FK constraints while changing columns
Some users have reported that the dbrev of bug 30483 fails. This might
depend on bad data, SQL server version, etc.
We now remove the constraints temporarily.

Test plan:
Reset your version in order to pass this dbrev again. So below
22.06.00.041.
* update systempreferences set value='22.0600040' where variable = 'Version';
Run updatedatabase.

Bonus: Create an issues record with invalid itemnumber (set FK check
off when doing so). Verify that dbrev fails and installer stops.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-15 10:18:27 -03:00
aa13c1a9d1
Bug 20596: (QA follow-up) perltidy
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-15 09:52:17 -03:00
76d676a868
Bug 20596: Add unit test for multiple values in authority search
This patch adds a unit test which returns 2 authority records
via an implicit OR when searching for strings from two different
authority records.

Test plan:
1. prove t/db_dependent/Search.t

Signed-off-by: Jan Kissig <jan.kissig@th-wildau.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-15 09:52:16 -03:00
b2a23149bd
Bug 20596: Join authority queries together with OR
This patch joins authority queries together with OR like Elasticsearch.

To the best of the author's knowledge, this code only gets triggered
when using record matching rules, but there may be other situations
where it's used.

Authority search in cataloguing plugins use a different path, and
authority search in authority home doesn't allow multiple queries,
so they'll never trigger this OR joining of queries.

Test plan:
0. Apply patch and koha-plack --restart kohadev
1. Create a record matching rule with the following:
Matching rule code: NID
Description: NormdatenID
Match threshold: 100
Record type: Authority record
Search index: Any
Score: 101
Tag: 035
Subfields: a
Offset: 0
Length: 0
Normalization rule: None

Click "Remove this match check"

2. Stage gnd.xml (from BZ 20596 attachments)
- Choose "MARCXML" for "Format"
- Choose "Authority" for "Record type"
- Choose "NID" for "Record matching rule"
- Click "Stage for import"
3. Note the job gets to "100% Finished"
(Before this patch, it would say "0% Failed")

4. View the batch
5. Import the record
6. Repeat steps 2-4 and note that the record matching rule
worked

7. Go to http://localhost:8081/cgi-bin/koha/authorities/authorities-home.pl
8. Search for "e"
9. Note that the search works

10. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=
11. Click tab 6
12. Click on the tag editor next to "a Personal Name"
13. Type "e" into each box and click "Search"
14. Note that the search works

Signed-off-by: Jan Kissig <jan.kissig@th-wildau.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-15 09:52:16 -03:00
7502f520a4
Bug 32247: Exit holds queue builder if there are no holds on the biblio
update_queue_for_biblio currently
1 - gets the holds on a bib
2 - gets the items available to fill any holds
3 - combines these to build the queue, exiting if there are no holds or items

If there are no holds at step 1, we don't need to do step 2 or 3
This patch simply deletes the queue for this biblio, then exits if there are no holds

To test:
prove -v t/db_dependent/Reserves.t t/db_dependent/Koha/Item.t t/db_dependent/Koha/Hold.t t/db_dependent/Koha/BackgroundJobs/BatchDeleteItem.t t/db_dependent/Koha/BackgroundJobs/BatchDeleteBiblio.t t/db_dependent/HoldsQueue.t t/db_dependent/Circulation_holdsqueue.t t/db_dependent/Biblio_holdsqueue.t t/db_dependent/Biblio.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-15 09:49:53 -03:00
Katrin Fischer
5dff3886b3
Bug 32061: Remove spans from page titles for adding/editing Z39.50/SRU servers
In another bug we added spans to ease translations in the PROCESS
block for server types. This PROCESS is used in several places,
but only creates a problem when used in the title.

The patch removes the spans using the remove TT filter avoiding
having to change the PROCESS and causing a string change.

To test:
* Go to administration > Z39.50/SRU servers
* Add a new Z39.50 and a SRU server or look at the form
* The page title in the browser tab will show the span
* Same for editing an existing Z39.50 or SRU server
* Apply the patch
* Verify the page titles are now correct

Hint: you can see the full page title when hovering on the tab.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Hammat Wele <hammat@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-15 09:43:20 -03:00
96804dfb5f
Bug 32368: Add page-section to report results
This patch adds the page-section container to the results page after
running a report

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-15 09:36:08 -03:00
1c5ec22680
Bug 32300: Add page-section to cataloguing plugins (cat)
This patch adds a "page-section" container div around the main section
of cataloging plugins which lack it. The patch also adds a "btn
btn-primary" buttons.

This patch contains indentation changes, so please ignore whitespace
when looking at the diff.

These changes are simple enough that checking the diff is probably
enough, but if you want to test a plugin in action, you go to
Administration -> MARC bibliographic framework.

 - Choose Actions -> MARC structure on the framework you want to modify
 - Choose Actions -> Edit subfields on the tag you want to modify
 - Select the tab for the subfield you want to change.
   - In the "Other options" section near the bottom, use the "Plugin"
     dropdown to select the plugin you want to associate with that
     subfield.
 - In the basic MARC editor the subfield you updated should now have an
   icon next to it for triggering the plugin. Clicking it should trigger
   a popup window which shows the updated template.

For plugins with "authorities" in the name, configure the Authorities
structure under Administration -> Authority types.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-14 21:35:43 -03:00
Katrin Fischer
b9c1af5ef1
Bug 32200: Add page-section to checkout notes page
To test:
* Turn on AllowCheckoutNotes system preference
* Check out an item
* Go to the OPAC and add a checkout note to your checkout
* In the staff interface, look at: Circulation > Checkout notes
* Verify the page section is missing from the notes table
* Apply patch
* Verify the table now looks better!

Signed-off-by: David <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-14 15:08:37 -03:00
b389f9a361
Bug 32457: Fix CGI vulnerability in addorder.pl
Test plan:
Go to acqui/addorder.pl.
Create two items.
Check if results still match your expectations.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-14 15:07:09 -03:00
Mona Panchaud
46cad29c5a
Bug 32115: Add ID to check-out default help message dialog to allow customization
This adds a div with the id attribute selfcheckdefaulthelpmessage to
the first paragraph of the web based self check help page.

To test:
* Enable WebBasedSelfCheck
* Go to: /cgi-bin/koha/sco/sco-main.pl in the OPAC
* Log in and open help
* Verify by looking at the source code, that the first paragraph
  starting with "If this is your first time..." now has an id.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-14 14:44:05 -03:00
b8e4d7d770
Bug 32394: Add tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-14 14:32:27 -03:00
9810fc5e0e
Bug 32394: Restore long tasks queue
We are sending "queue" as parameter, but "job_queue" is retrieved in
Koha::BackgroundJob->enqueue...

Test plan:
Read code and confirm the above.
More fun for test plan will be found on bug 32393

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-14 14:32:27 -03:00
9e025bb7aa
Bug 32394: Regression tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-14 14:31:37 -03:00
0622e118db
Bug 31166: Digest option is not selectable for phone when PhoneNotification is enabled
Digests are not available via Talking Tech, but the artificial limit should not be in place for the non-TT phone notices. If only phone is selected, digest remains disabled.

Test Plan:
1) Apply this patch
2) Enable TalkingTechPhoneNotification
3) Verify behavior hasn't changed
4) Disable TalkingTechPhoneNotification, Enable PhoneNotification
5) Note disgest option is now selectable if only phone is selected

Signed-off-by: Evelyn Hartline <evelyn@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Bug 31166: (QA follow-up) Remove debugging lines

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Bug 31166: (QA follow-up) Implement on OPAC side

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Squashed by RM
2022-12-13 14:59:51 -03:00
Julian Maurice
b00c213876
Bug 32134: Show the bundle size when checked out
When checking out a bundle, it can be useful to know the number of items
in this bundle, so that librarians can quickly check if items are
missing.

Test plan:
1. Create a bundle (see bug 28854 comment 458)
2. Check out the bundle.
3. Verify that you have the bundle size in the message below the barcode
   input ("Checked out: [...]. Bundle of X items. Due on [...]")
4. Checkout an item that is not a bundle.
5. Verify that the bundle message does not appear

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>
2022-12-13 14:51:39 -03:00
9f44dc5295
Bug 32323: Correct focus state of some DataTables controls
This patch makes changes to the style of some DataTable controls in
order to make hover, active, and focus states more consistent.

To test, apply the patch and rebuild the staff interface css.

View a page that has a DataTable showing controls like "Columns,"
"Export," and "Configure." For example: Saved reports, Libraries,
Overdues.

 - Click the DataTables search form to put cursor focus there.
 - Use the tab key to move through the next buttons.
 - The style should now be more consistent with the appearance of other
   similar buttons in the staff client.
 - Test with and without text in the search filter.
 - Test pages which don't have the full set of controls, e.g. the
   table of of a patron's checkouts.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-13 09:47:44 -03:00
David Nind
ecbcc2884c
Bug 32194: Capitalize "No" values for the patron categories "Can be guarantee" column
This fixes the display of the patron categories "Can be guarantee"
column so that "No" values have a capital "N".

Test plan:
1. Go to Administration > Patrons and circulation > Patron categories.
2. Note that for the "Can be guarantee" column, it shows "Yes" values
   with a capital "Y" and "no" values with a lowercase "n".
3. Apply the patch.
4. Refresh the page.
5. Note that any "No" values now have a capital "N".
6. Sign off D:

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-13 09:43:51 -03:00
84f9e30810
Bug 32320: Remove text-shadow from header menu links
This patch unsets the text-shadow style on links in the header menu.
This makes the links look a little crisper. The style is inherited from
Bootstrap's defaults and is incorrect for our design.

To test, apply the patch and rebuild the staff interface CSS.

View any page in the staff interface to confirm that header menu links
look correct.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-13 09:24:49 -03:00
David Nind
69ddb83f41
Bug 32302: (follow-up) Hide ISBN label when list sent from the staff interface
This makes the same change to the staff interface. Lists sent
from the staff interface hide the ISBN label in the email message
when there are no ISBNs for a record.

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>
2022-12-13 09:23:49 -03:00
44366c0985
Bug 32302: Hide "ISBN" label when no ISBN data when sending list
There is a logic mistake in the opac-sendshelf.tt template where
we test if the "ISBN" key exists in the "BIBLIO_RESULT" hash when
we should really be testing if the arrayref returned by "ISBN" is
empty or not, since that "ISBN" key always exists and contains at least
an empty arrayref.

Test plan:
1. Apply patch and restart your Koha Starman
2. Create a public list containing records with 020 MARC fields and
records without 020 MARC fields
3. View the list in the OPAC
4. Click "Send list" and email it to yourself
5. Note that only records with 020 MARC fields with show "ISBN:"
in the email output

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>
2022-12-13 09:23:49 -03:00
d918672891
Bug 32417: Allow NULL in biblionumber in $order->store
If we are cancelling an order and call DelBiblio, we should
clear the biblionumber but not be crashing on it in ->store.

The absence of the clear prevented the crash. One bug sometimes
solves another one.

Test plan:
Create basket, order line.
Delete order with biblio record.
Verify result and logfile.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-13 09:14:13 -03:00
d7c1d52051
Bug 32417: Add unit test
Test plan:
Run t/db_dependent/Koha/Acquisition/Order.t
This test should fail without the follow-up and pass with it.
* not ok 53 - No croak on missing biblionumber when cancelling an order

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-13 09:14:08 -03:00
1d522cc246
Bug 31160: Required fields in patron api
The Patron API PUT request required the fields "surname","address","city","library_id","category_id". Meanwhile the CSV import page for patrons only requires "surname","library_id","category_id". The fields for "address" and "city" have been removed from the "required" section of the api>v1>swagger>definitions>patron.yaml file to match the CSV import page.

Test Plan:
1) Send a PUT request to http://localhost:8081/api/v1/patrons/19 with an empty body
2) Error message should ask for 5 missing fields as listed above
3) Apply patch
4) Restart Apache server using "restart_all" in your ktd shell
5) Resubmit your request
6) Error message should now only request "surname","library_id","category_id"

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>
2022-12-13 08:44:35 -03:00
Didier Gautheron
af794a6cfa
Bug 32355: Add css class url to URL syspref
Add missing css class to URL syspref.

To Test:
1 - open admin/preferences.pl
2 - Search for URL
3 - casServerUrl, UsageStatsLibraryUrl, KohaManualBaseURL,
    PrivacyPolicyURL, LibrisURL input field size are small.
4 - Apply patch
5 - all URL fields have the same bigger size.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-13 08:43:24 -03:00
2fec6d32b8
Bug 32389: Fix Syndetics link on staff results page
To test:
1. Have SyndeticsCoverImages on and Syndetics setup.
2. Do a search that will return some results with Syndetics images
3. Click on the image link and you will get a 404
4. Apply patch
5. Link works!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-12 12:19:51 -03:00
b00c01093a
Bug 32422: Hardcoded paths in _common.scss precent using external node_modules
This patch makes:

- gulpfile.js add the parent dir's node_modules to the sass include path
- removes hardcoded paths from _common.scss

To test:
1. Have the latest KTD image (this is not KTD specific, but easier to
   test)
2. Make sure you don't have any node_modules/ dir in your koha clone
3. Run:
   $ kshell
  k$ yarn build --view opac
=> FAIL: You get:
kohadev-koha@kohadevbox:/kohadevbox/koha$ yarn build --view opac
yarn run v1.22.19
$ gulp build --view opac
[18:27:38] Using gulpfile /kohadevbox/koha/gulpfile.js
[18:27:38] Starting 'build'...
Error in plugin 'sass'
Message:
    koha-tmpl/opac-tmpl/bootstrap/css/src/_common.scss
Error: File to import not found or unreadable: ../../../../../node_modules/bootstrap/scss/functions.
        on line 37 of koha-tmpl/opac-tmpl/bootstrap/css/src/_common.scss
        from line 1 of koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss
>> @import "../../../../../node_modules/bootstrap/scss/functions";

   ^

4. Apply this patch
5. Repeat 3
=> SUCCESS: It builds!
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: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-12 12:19:10 -03:00
Katrin Fischer
574bbe8576
Bug 32257: Fix capitalization - Patron Attribute
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-12 08:58:33 -03:00
d2ee603a60
Bug 32257: Label for patron attributes misaligned
Label has now been realigned to match the format of the fields above. When clicking to add a new field, the delete button was also misaligned. This has now been reformatted to sit next to the "New" button

Test Plan:
1) Navigate to Tools > Batch patron modification
2) Add either card or borrower numbers to bring up the edit patrons fields
3) "Patron attributes:" is on the far right and above the select box. When adding a new field there is a big gap between the Add and  Delete buttons
4) Apply patch and navigate to same area
5) Observe that the Patron attributes option is aligned to match the fields above and the gap between the buttons has been removed

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-12 08:58:21 -03:00
72c10b2227
Bug 28975: (QA follow-up) Fix indentation, simplify if statement
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-07 14:26:20 -03:00
The Minh Luong
fe2e2f9400
Bug 28975: Holds queue lists can show holds from all libraries even with IndependentBranches
When using IndependentBranches, usually all branches are removed from the drop-down menus. But in the Holds Queue page, there is the possibility to choose "All branches". From there, you can see holds from all libraries.

To recreate :
1) Activate IndependentBranches, IndependentBranchesPatronModifications and IndependentBranchesTransfers
2) Create a staff user with limited permissions (NOT a superlibrarian), including holds permissions. Here are mine as an example
  - circulate (all)
  - catalogue
  - borrowers
    - delete_borrowers
    - edit_borrowers
  - reserveforothers (all)
  - reports (all)
3) Create (or make sure you already have) a patron in another branch (we'll call them patron X)
4) Place a hold for patron X on an available item from their own library
5) Run misc/cronjobs/holds/build_holds_queue.pl
6) Go to Circulation > Holds queue and make sure you can see the hold
7) Log in as your limited staff patron
8) Go to Circulation > Holds queue
9) In the drop-down menu, choose "All" and click Submit
-- Notice you see the hold of the patron from another branch under Patron
column: "A patron from library <library name>"
11) Apply the patch.
12) Notice that the "All" option is no longer available for the limited patron. Limited patrons can't see holds from other libraries anymore.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-07 14:26:20 -03:00
4f8b742cbe
Bug 32291: (bug 16735 follow-up) Remove ref to library category in branches.tt
On bug 16735 we rewrite the library groups system. Those references in
branches.tt were part of the previous code, and they can be removed.

Test plan:
Confirm the above and that those code errors are never sent to the
template.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-07 14:25:19 -03:00
David Nind
da192133ae
Bug 31984: TaxRate preference - add note about vendor updates
If a value for the TaxRates system preference is changed or
removed, vendors retain the original value recorded in their
tax rate field.

The vendor tax rate is used to calculate prices for orders
added to a basket. Where the tax rate doesn't match with the
system preference, a warning message is displayed on the order
form "Tax rate not defined in system preference TaxRates!".

This patch adds a note to the system preference description
about updating vendor tax rate information where required.

Test plan:
1. Check the values recorded for the TaxRates system preference.
2. For a vendor (Acquisitions > search for a vendor > Edit vendor),
   check the value recorded in the tax rate field.
3. Note that the tax rate field is populated from a dropdown list
   using values from the TaxRates system preference.
4. Change the TaxRates system preferemce to remove a tax
   rate. For example, change 0|0.12|0.1965 to 0|0.12.
5. Refresh the vendor page.
6. Note that the vendor tax rate remains as the original value
   until you edit the vendor.
7. Apply the patch.
8. Review the description for the TaxRates system preference and
   make sure the new note about updating vendor tax rates where
   required makes sense.
9. Sign off!

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>
2022-12-07 14:23:14 -03:00
945514bd72
Bug 31675: Remove packages from debian/control that are no longer used
As far as I can tell, we are no longer using CGI::Session::Serialize::YAML or YAML::Syck, but they are still marked dependencies for the Debian package.

Signed-off-by: Danyon Sewell <danyonsewell@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-07 14:20:54 -03:00
Aleisha Amohia
a4d9f572bc
Bug 32354: Accept session_state param given by OAuth IdP
This patch ensures Koha doesn't throw an error if the IdP hands back a
session_state parameter.

To test:

1) Set up an identity provider
2) On the IdP's configuration, make it hand back a session_state
3) Confirm authentication using OIDC works with and without the
session_state

Sponsored-by: Plant & Food Research

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-07 12:58:32 -03:00
cab4155649
Bug 32074: Edit vendor has two save buttons
When editing a vendor there is a floating toolbar with options to save
and cancel. There is also an additional save and cancel button set at
the bottom of the page and this is superfluous. This has now been
removed to leave the floating toolbar as the only toolbar.

Test plan:
1) Navigate to Acquisitions and select a Vendor.
2) Click edit vendor
3) Scroll down the page and observe that there is a floating
   save/cancel toolbar as well as the buttons to save/cancel at the
   bottom of the page
4) Apply patch
5) Observe that the duplicate buttons at the bottom of the page are now
   gone

Signed-off-by: Owen <oleonard@myacpl.org>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-07 11:38:29 -03:00
David Nind
92cdf29a7f
Bug 32283: (follow-up) Fix in two other places
Fix two other occurences where the capitalization of OPAC
is incorrect:
- Identity provider email domains table column heading
- 'New email domain' form label

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-07 11:37:43 -03:00
Andrew Auld
747ab78e74
Bug 32283: Correct capitalisation of opac > OPAC
Test plan
Step 1: Navigate to admin>Identity Providers
Step 2: Add new domain
Step 3: For 'Allow opac' setting, verify that opac is lower case in both label and description
Step 4: Apply patch
Step 5: Navigate to admin>Identity Providers
Step 6: Add new domain
Step 7: For 'Allow OPAC' setting, verify that OPAC is upper case in both label and description

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-07 11:37:42 -03:00
Andrew Auld
bc34e8b7f4
Bug 32282: Fixed capitalisation of ID in User ID
Test plan
Step 1: go to admin>identity providers
Step 2: click 'new identity provider'
Step 3: check map point drop-down
Step 4: verify that User id is written 'User id'
Step 5: apply patch
Step 6: repeat 1-3
Step 7: verify that User ID is written 'User ID'

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-07 11:37:18 -03:00
b7a311ced9
Bug 28235: Correct CSS governing max width of custom cover images
Images shown in the OPAC and staff interface when the
OPACCustomCoverImages and  CustomCoverImages preferences are enabled
should be getting a max-width set in the current CSS, but the order of
the declarations is preventing the correct specificity.

This patch moves the CSS to the correct place in each file so that the
max-width is applied.

To test, apply the patch and rebuild both the staff and OPAC CSS. If you
get an error during the build process you may need to run 'yarn
install.'

- Go to Administration -> System preferences, and enable the
  OPACCustomCoverImages and  CustomCoverImages preferences.
- If you're testing with the default test database you can set the
  CustomCoverImagesURL preference to
  https://static.myacpl.org/public/covers/{normalized_isbn}.jpg
- Perform a catalog search in both OPAC and staff client limiting by
  itemtype = 'Book'.
- The search results in both interface should show several covers
  supplied from the external URL.
- In the staff client, these images should be limited to 140px wide even
  if the source image is larger.
- In the OPAC, view the detail page for one of the results with cover
  images. The image shown on the detail page should be constrained to
  140px wide even if the source image is larger.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-07 11:36:54 -03:00
f5d77f1c1d
Bug 32261: Add more UI feedback when selecting patron from autocomplete
There is only a tiny change in the color of the selected item, but it's
not obvious.

Test plan:
Regenerate the css files using `yarn build`
Search for patrons and note that the down/up keys let you select a
patron and the background color change.
Note that the background color is not on the container and so is not
similar as the hover rule (when using the mouse). We could change that,
but then the behaviour is weird when you have both the mouse and the
keyboard selecting items in the item list.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-07 11:36:53 -03:00
3ce2f6e700
Bug 32261: Patron autocomplete - do not empty text field
The jQuery UI autocomplete is supposed to replace the text field with
the 'value' attribute of the selected item. As it does not exist it's
emptied. We should not replace what the user typed in.

Test plan:
Go to the Koha home page
Select "Search patrons" in the header
Type 'edn', it will return 1 result
Use the down key to select the item (it is not obvious but there is a
little change in the color when you select the item)
=> Without this patch the search field is emptied
=> With this patch applied the search field is not modified

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-07 11:36:53 -03:00
3411a2c002
Bug 32366: (bug 30460 follow-up) Add tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-01 10:02:21 -03:00
75a3c923c3
Bug 30963: Automatically refresh the curbside pickups list
Librarians would like the page to be automatically refreshed every X minutes.

This patch is suggesting to have a checkbox at the top of the page to
let the user refresh the page given the delay they want.

We could later improve this by setting this value in a localStorage
variable.

Test plan:
Go to the curbside pickup page
Notice the new checkbox at the top
Notice that the "Refresh" button has been moved at the top as well
Play with the checkbox and the input, and confirm that the behaviour is
consistent

Sponsored-by: Association KohaLa - https://koha-fr.org/

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>
2022-12-01 09:34:48 -03:00
Katrin Fischer
58580d2bb4
Bug 32236: Fix alignment of checkbox "Use default values" for item batch modification
This moves the label to the right in front of the checkbox.
It also shortens the label by adding an additional longer hint text.

To test:
* Go to cataloguing > item batch modification
* On the first page of the tool, look at the checkbox at the bottom
* Apply the patch
* Verify changes

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-01 09:34:03 -03:00
7f8156cf5c
Bug 29274: Remove z_reset.t
From the description of commit d25f3e8437

"""
    Bug 22709: (RM follow-up) Clean up plugin tests

    The plugin tests were failing due to failed rollbacks and run order.
    This patch moves them into their own directory and adds a reset test to
    restore the original state of the plugin system after the tests have
    run.
"""

This is wrong, the tests are run in a random order.

We don't need this file.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-12-01 09:33:04 -03:00
8965615f2d Vue bundle - Add main.js.LICENSE.txt
There is a reference to it in main.js, it makes sense to include it in
our codebase

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2022-12-01 10:29:42 +01:00