]> git.koha-community.org Git - koha.git/log
koha.git
2 years agoBug 31305: Remove type= from detail.pl
Jonathan Druart [Fri, 3 Dec 2021 15:45:44 +0000 (16:45 +0100)]
Bug 31305: Remove type= from detail.pl

This is not related to anything known.. was it "itype" at some point?
`git log -p` will tell you that it's there for a looong time already

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31292: Untranslatable string in sample_notices.yaml
Bernardo Gonzalez Kriegel [Fri, 5 Aug 2022 14:34:05 +0000 (11:34 -0300)]
Bug 31292: Untranslatable string in sample_notices.yaml

This patch removes a regex that discard lines in multiline YAML values
On close inspection, there is no need for it.

To test:
1) go to misc translator, update some language
    ./translate update fr-CA

2) check missing string

    egrep "You may pick up your article" po/fr-CA-installer.po

   from sample_notices.yaml

3) apply the patch, repeat 1)

4) repeat 2), verify the string is present in the translation file

5) translate the new string, install the language,
   verify string is present in the translated file
    ./translate install fr-CA

   check fr-CA/mandatory/sample_notices.yml

There are three new strings
msgid "%sDear %s %s,%s"
msgid "%s%s%sTitle: %s"
msgid "%sYou may pick up your article at %s.%sYou can download the scanned materials via the following url(s): %s.%s"

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>
2 years agoRevert "Bug 31104: Add a selenium test"
Tomas Cohen Arazi [Mon, 8 Aug 2022 14:18:02 +0000 (11:18 -0300)]
Revert "Bug 31104: Add a selenium test"

This reverts commit 56d79a483da8cac66aa22b9904fd2a64464b8eff.

2 years agoBug 29983: Fix xt/author/valid-templates.t
Jonathan Druart [Mon, 8 Aug 2022 12:18:49 +0000 (14:18 +0200)]
Bug 29983: Fix xt/author/valid-templates.t

 #   Failed test '/kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt'
 #   at xt/author/valid-templates.t line 141.
 # file error - modal-claims-js: not found
 # Looks like you failed 1 test of 757.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30874: Remove category_type
Jonathan Druart [Wed, 1 Jun 2022 08:28:20 +0000 (10:28 +0200)]
Bug 30874: Remove category_type

In which case do we pass category_type to this script? Am I missing
something?

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30874: Simplify categories loop construction
Jonathan Druart [Wed, 1 Jun 2022 08:00:37 +0000 (10:00 +0200)]
Bug 30874: Simplify categories loop construction

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30874: 2 more - need more investigation
Jonathan Druart [Wed, 1 Jun 2022 08:00:08 +0000 (10:00 +0200)]
Bug 30874: 2 more - need more investigation

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30874: Reduce number of category fetches
Jonathan Druart [Wed, 1 Jun 2022 07:59:31 +0000 (09:59 +0200)]
Bug 30874: Reduce number of category fetches

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30874: Replace categoryname
Jonathan Druart [Wed, 1 Jun 2022 07:54:25 +0000 (09:54 +0200)]
Bug 30874: Replace categoryname

== Test plan ==
1. Apply all patches
2. Create a new patron in a given category
   => Form show the dropdown with the selected category
3. Edit again
   => Value is kept
4. Edit a category to give it specific values for: messaging prefs,
   password strength/length, can be guarantee
5. Edit the patron, change the category, and confirm that the different
   limitation are correctly applied.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29971: Compiled CSS
Tomas Cohen Arazi [Fri, 5 Aug 2022 17:50:12 +0000 (14:50 -0300)]
Bug 29971: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29971: Add selenium tests
Jonathan Druart [Mon, 1 Aug 2022 10:05:02 +0000 (12:05 +0200)]
Bug 29971: Add selenium tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29971: Remember selections across patron search pages
Owen Leonard [Fri, 28 Jan 2022 17:14:15 +0000 (17:14 +0000)]
Bug 29971: Remember selections across patron search pages

This patch modifies the patron search results page to enable checkbox
selections to be remembered in the browser's localStorage. This allows
checkbox selections to persist while navigating through multiple pages
of search results or even across multiple different searches.

Once selected, these values can be added to a patron list or submitted
for merging. Selections can be cleared manually and will be
automatically be removed upon logout.

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).

- In the staff interface perform a patron search in the Patrons module
  which will return multiple pages of results..
- Check checkboxes next to several patrons.
  - After one checkbox is checked the "Add to patron list" button should
    be enabled.
  - After more than one checkbox is checked the "Merge selected patrons"
    button should be enabled.
- A box should appear in the toolbar above the search results, "Patrons
  selected: X"
- Navigate to another page of results. Check more checkboxes. The
  "Patrons selected" information should be updated.
- Return to the first page of results. Your original selections should
  still be checked.
- Test that the correct set of patrons is used when clicking "Merge
  selected patrons" or when using "Add to patron list."
- Click the "Clear" button in the selections information box. Checkboxes
  should be cleared on every page of results you previously checked.
  - The "Add to patron list" and "Merge selected patrons" buttons should
    become disabled.
- After making several selections, log out of the staff interface and
  log back in, returning to the same patron search. Your selections
  should have been forgotten.

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>
2 years agoBug 29983: Show the column by default but hide if the feature is disabled
Jonathan Druart [Mon, 1 Aug 2022 13:54:42 +0000 (15:54 +0200)]
Bug 29983: Show the column by default but hide if the feature is disabled

Prior to this patch there was a blink, the column was displayed then
hidden if the column was hidden.
Also we could display the column even if the feature was disabled.

Now the column is shown by default, and hidden if the feature is
disabled.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29983: Format dates in templates using KohaDates (and display the time part)
Jonathan Druart [Mon, 1 Aug 2022 13:43:51 +0000 (15:43 +0200)]
Bug 29983: Format dates in templates using KohaDates (and display the time part)

The time part is displayed on the checkout list

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29983: Display the pretend claim column in overdue.tt
jeremy breuillard [Tue, 1 Feb 2022 10:20:07 +0000 (11:20 +0100)]
Bug 29983: Display the pretend claim column in overdue.tt

This patch displays the column "Return claims" from the page "moremember.pl" to the page "overdues.pl". Rebase on master.

Test plan:
1) Use a patron with at least 1 item who should be checked out soon
2) Home > Patron > Patron details for [name]
3) Click on the 'Checkout' button down the page to show the full table and notice the "Return Claims" column
4) Now go to Home > Circulation > Overdues
5) Find the patron who has to check out and have a look at the table
6) Apply patch and repeat 4) and 5) -> the "Return Claim" column is now displayed on the table

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>
2 years agoBug 31289: Hide Article requests column in circulation rules when ArticleRequests...
Caroline Cyr La Rose [Wed, 3 Aug 2022 13:54:27 +0000 (09:54 -0400)]
Bug 31289: Hide Article requests column in circulation rules when ArticleRequests syspref is disabled

This patch hides the Article requests column in the large circulation
rules table when the ArticleRequests system preference is disabled.

To test:
0) Apply patch
1) With ArticleRequests disabled, go to Administration > Circulation and fines
   rules
2) Scroll right in the first table
--> There isn't any mention of article requests in the table
3) Scroll down to see the other tables in the page
--> There are no other article requests tables
4) Enable ArticleRequests in Administration > System preferences
5) Go back to the Circulation and fines rules and refresh the page
6) Scroll right in the first table
--> There should be an article requests yes/no column
7) Scroll down to see the other tables in the page
--> There are other article requests tables, Default open article requests
    limit and Default article request fees

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27497: Compiled CSS
Tomas Cohen Arazi [Fri, 5 Aug 2022 15:04:11 +0000 (12:04 -0300)]
Bug 27497: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27497: Display Koha version in staff interface home page
Fridolin Somers [Thu, 11 Feb 2021 10:33:35 +0000 (11:33 +0100)]
Bug 27497: Display Koha version in staff interface home page

Koha current version is very useful in staff interface.
You can find it in 'About' page but home page is the first page you
see. Display it in the lower right-hand side of the page, after
'IntranetmainUserblock' content.

Note that it is not a vertical floating text, it whould conflict with
languages floating bar.

Test plan :
1) Apply patch and update staff client CSS :
https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client
2) Look at staff interface home page and look at lower right-hand side
   of the page

Signed-off-by: Michael Adamyk <madamyk@ckls.org>
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>
2 years agoBug 31264: Curbside pickups - Take CalendarFirstDayOfWeek into account
Jonathan Druart [Sun, 31 Jul 2022 07:16:13 +0000 (09:16 +0200)]
Bug 31264: Curbside pickups - Take CalendarFirstDayOfWeek into account

We need to take the pref CalendarFirstDayOfWeek into account to display
the days on the curbside pickups admin page.

Test plan:
Turn on the CurbsidePickup pref
Set CalendarFirstDayOfWeek to Sunday
Go to the curbside pickups admin page, add new slots, and confirm that
Sunday is displayed first.
Try again with CalendarFirstDayOfWeek set to Monday and Saturday.

Sponsored-by: Association KohaLa - https://koha-fr.org/
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>
2 years agoBug 30500: DBRev 22.06.00.032
Tomas Cohen Arazi [Fri, 5 Aug 2022 14:56:24 +0000 (11:56 -0300)]
Bug 30500: DBRev 22.06.00.032

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30500: (QA follow-up) Separate code execution streams for obviously independent...
Petro Vashchuk [Fri, 5 Aug 2022 12:47:41 +0000 (15:47 +0300)]
Bug 30500: (QA follow-up) Separate code execution streams for obviously independent parameters

When $new_pickup_location gets passed as parameter it doesn't make any
sense to also check is_cancelable_from_opac.

Also this makes code more clearer as it seemed like it was possible for
item to get cancelled at the same time as request to change pickup
location.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30500: Allow patrons to change in transit holds pickup locations
Tomas Cohen Arazi [Wed, 8 Jun 2022 20:26:43 +0000 (17:26 -0300)]
Bug 30500: Allow patrons to change in transit holds pickup locations

This patch adds a way for patrons to change the pickup location for in
transit holds.

This is done in the OPAC on the holds table.

The feature is controlled by a new system preference:

* OPACInTransitHoldPickupLocationChange

To test:
1. Apply this patches
2. Run:
   $ updatedatabase
   $ restart_all
=> SUCCESS: system preference added
3. Have an in-transit hold for a known patron
4. Visit the holds table for the patron (OPAC)
=> SUCCESS: Hold in transit, cannot change pickup location
5. Enable the OPACInTransitHoldPickupLocationChange system preference
=> SUCCESS: Descriptive text makes sense and is idiomatic
6. Reload the OPAC page
=> SUCCESS: You can now choose a new pickup location
7. Choose one
=> SUCCESS: It works! Reloaded page pre-selects the new pickup location
8. Switch to the new pickup location library on the staff interface
9. Go to Circulation > Transfers to receive
=> SUCCESS: The hold is there!
10. Scan the hold
=> SUCCESS: Usual workflow follows
11. Sign off :-D

Sponsored-by: Montgomery County Public Libraries
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30500: Add OPACInTransitHoldPickupLocationChange syspref
Tomas Cohen Arazi [Wed, 8 Jun 2022 20:22:51 +0000 (17:22 -0300)]
Bug 30500: Add OPACInTransitHoldPickupLocationChange syspref

Sponsored-by: Montgomery County Public Libraries
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31272: Use TT plugins for pickup library and due date in opac-reserve.pl
Katrin Fischer [Sat, 30 Jul 2022 21:35:50 +0000 (23:35 +0200)]
Bug 31272: Use TT plugins for pickup library and due date in opac-reserve.pl

Before this patch the date formatting for the due date was done
in the .pl instead of the template and the branchcode would show
instead of the library's name in the list of items when placing
an item level hold in the OPAC.

To test:
* Find or create a record with mulitple items
* Check out one of the items
* Place a record level hold
* Return an item to set to waiting
* Place an item level hold
* Go to the OPAC and start placing an item level hold
* Verify the messages in the item table show the branchcode
* Apply patch
* Only visible change should be the library name replacing the branchcode

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31249: Use cronlogaction on update_patrons_category.pl
Tomas Cohen Arazi [Wed, 27 Jul 2022 23:46:03 +0000 (20:46 -0300)]
Bug 31249: Use cronlogaction on update_patrons_category.pl

This patch does what the title says.

To test:
1. Run the script
2. Check the action logs
=> FAIL: Boo, no record of the running cronjob
3. Apply this patch
4. Repeat 1-2
=> SUCCESS: Yay!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <liz@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30992: Improve translatability for 'for'
Jonathan Druart [Wed, 13 Jul 2022 06:01:48 +0000 (08:01 +0200)]
Bug 30992: Improve translatability for 'for'

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>
2 years agoBug 30992: Improve translatability for Waiting at|On hold
Jonathan Druart [Wed, 13 Jul 2022 06:01:34 +0000 (08:01 +0200)]
Bug 30992: Improve translatability for Waiting at|On hold

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>
2 years agoBug 29632: (QA follow-up) Fix COMMENT discrepancy on upgrade
Tomas Cohen Arazi [Thu, 4 Aug 2022 12:55:16 +0000 (09:55 -0300)]
Bug 29632: (QA follow-up) Fix COMMENT discrepancy on upgrade

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30650: (QA follow-up) Fix TINYINT fields discrepancy on upgrade
Tomas Cohen Arazi [Thu, 4 Aug 2022 12:47:38 +0000 (09:47 -0300)]
Bug 30650: (QA follow-up) Fix TINYINT fields discrepancy on upgrade

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31220: (QA follow-up) Add missing filter
Tomas Cohen Arazi [Tue, 2 Aug 2022 18:04:03 +0000 (15:04 -0300)]
Bug 31220: (QA follow-up) Add missing filter

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31220: Pass label batch and ids to label-create-pdf
Nick Clemens [Fri, 22 Jul 2022 11:36:06 +0000 (11:36 +0000)]
Bug 31220: Pass label batch and ids to label-create-pdf

This patch fixes a malformed link to print selected labels
and fix error:
Can't locate object method "get_attr" via package "-2" (perhaps you forgot to load "-2"?) at /usr/share/koha/intranet/cgi-bin/labels/label-create-pdf.pl line 126.

To test:
1 - Create a new label batch with some items
2 - Select 1 or more
3 - Export selected labels
4 - Download as PDF
5 - It works!

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31288: (QA follow-up) Check userenv in disown_or_delete
Marcel de Rooy [Wed, 3 Aug 2022 11:20:20 +0000 (11:20 +0000)]
Bug 31288: (QA follow-up) Check userenv in disown_or_delete

Test plan:
1. Apply the regression tests
2. Run:
   $ kshell
  k$ t/db_dependent/Koha/Virtualshelves.t
=> FAIL: Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31288: Regression tests
Tomas Cohen Arazi [Wed, 3 Aug 2022 14:40:51 +0000 (11:40 -0300)]
Bug 31288: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30879: DBRev 22.06.00.031
Tomas Cohen Arazi [Tue, 2 Aug 2022 12:41:54 +0000 (09:41 -0300)]
Bug 30879: DBRev 22.06.00.031

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30879: Add option to syspref and update display
Nick Clemens [Wed, 22 Jun 2022 14:55:03 +0000 (14:55 +0000)]
Bug 30879: Add option to syspref and update display

To test:
1 - Update ComponentSortField system preference and verify biblionumber is an option
2 - Repeat test plan from 30327 and confirm sorting with biblionumber works

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30879: Handle index/sorting for UNIMARC
Nick Clemens [Wed, 22 Jun 2022 14:49:05 +0000 (14:49 +0000)]
Bug 30879: Handle index/sorting for UNIMARC

Same as before, but test with UNIMARC setup

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30879: Allow biblionumber as sort option in Elasticsearch
Nick Clemens [Wed, 22 Jun 2022 14:42:17 +0000 (14:42 +0000)]
Bug 30879: Allow biblionumber as sort option in Elasticsearch

Repeat previous tests with Elasticsearch engine
You will need to reindex and reset mappings to pickup the changes form the file

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30879: Add biblionumber as a sorting option in MARC21
Nick Clemens [Wed, 22 Jun 2022 14:37:23 +0000 (14:37 +0000)]
Bug 30879: Add biblionumber as a sorting option in MARC21

This patch updates the Local-Number indexing by adding a zeropad option
to Zebra indexing and adding this to the mapping files

It also updates C4/Search.pm to allow biblionumber as an option

To test:
1 - Apply patches
2 - copy etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl to /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl
3 - Restart all, reindex zebra
4 - Browse to: http://localhost:8081/cgi-bin/koha/catalogue/search.pl?idx=kw&q=a&sort_by=biblionumber_dsc&count=20
5 - Confirm records sorted correctly
6 - Browse to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?idx=kw&q=a&sort_by=biblionumber_asc&count=20
7 - Confirm records sorted correctly

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31274: DBRev 22.06.00.030
Tomas Cohen Arazi [Tue, 2 Aug 2022 12:30:28 +0000 (09:30 -0300)]
Bug 31274: DBRev 22.06.00.030

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31274: Make sure OPACSuggestionAutoFill is handled as a boolean everywhere
Tomas Cohen Arazi [Mon, 1 Aug 2022 14:38:01 +0000 (11:38 -0300)]
Bug 31274: Make sure OPACSuggestionAutoFill is handled as a boolean everywhere

The YAML preference definition defines it as a string ('yes' or 'no' the
possible values). And the opac-suggestions.tt template has one occurence
of the variable being compared to a string.

This patch does:
- fix the template
- fixes opac.pref for 0|1
- adds an atomicupdate that takes care of moving 'yes' and 'no' to their
  respective boolean values.

To test:
1. Change the syspref value to enable/disable
2. Check on the DB that the value is wrong:
   $ koha-mysql kohadev
   > SELECT value FROM systempreferences WHERE variable='OPACSuggestionAutoFill';
=> FAIL: It is either 'yes' or 'no' depending on what you choose.
3. Apply this patch
4. Run:
   $ updatedatabase
5. Repeat 2
=> SUCCESS: Values are now 0 or 1
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30392: (QA follow-up) Remove deleted_on from the API response
Tomas Cohen Arazi [Tue, 2 Aug 2022 11:45:07 +0000 (08:45 -0300)]
Bug 30392: (QA follow-up) Remove deleted_on from the API response

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30077: (QA follow-up) Avoid warning
Tomas Cohen Arazi [Mon, 1 Aug 2022 17:48:34 +0000 (14:48 -0300)]
Bug 30077: (QA follow-up) Avoid warning

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29579: (QA follow-up) Fix up t/db_dependent/Koha/Reports.t
Kyle M Hall [Mon, 1 Aug 2022 12:28:20 +0000 (12:28 +0000)]
Bug 29579: (QA follow-up) Fix up t/db_dependent/Koha/Reports.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29579: Show saved SQL report ID in database query
Kyle Hall [Thu, 21 Jul 2022 17:12:06 +0000 (13:12 -0400)]
Bug 29579: Show saved SQL report ID in database query

When trying to figure out which saved SQL report caused too much load, it's useful to have the report id show in the mysql process list.

This patch adds the saved SQL ID number as a comment line in front
of the SQL before passing it to the database.

Test Plan:
1) Apply this patch
2) Restart all the things!
3) Create a long running query like:
   SELECT * FROM borrowers a, borrowers b, borrowers c, borrowers d
4) Connect to the database using koha-mysql
5) Execute "show processlist;"
6) Note the Info column looks something like:
   SELECT * FROM borrowers a, borrowers b, borrowers c, borrowers d /* saved_sql.id: 1 */

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>
2 years agoBug 30392: DBRev 22.06.00.029
Tomas Cohen Arazi [Mon, 1 Aug 2022 17:35:35 +0000 (14:35 -0300)]
Bug 30392: DBRev 22.06.00.029

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30392: DBIC update
Tomas Cohen Arazi [Mon, 1 Aug 2022 17:33:29 +0000 (14:33 -0300)]
Bug 30392: DBIC update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30392: (QA follow-up) Correct COMMENT
Tomas Cohen Arazi [Mon, 1 Aug 2022 17:30:17 +0000 (14:30 -0300)]
Bug 30392: (QA follow-up) Correct COMMENT

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30392: Set deleted_on when an item is (marked as) deleted
Jonathan Druart [Mon, 25 Jul 2022 08:07:48 +0000 (10:07 +0200)]
Bug 30392: Set deleted_on when an item is (marked as) deleted

We could like to track down when an item has been moved to the
deleteditems table.

Test plan:
Created a new item, delete it
Not that the deleteditems.deleted_on value is set correctly

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30392: DB changes
Jonathan Druart [Mon, 25 Jul 2022 07:48:16 +0000 (09:48 +0200)]
Bug 30392: DB changes

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30077: DBRev 22.06.00.028
Tomas Cohen Arazi [Mon, 1 Aug 2022 17:05:45 +0000 (14:05 -0300)]
Bug 30077: DBRev 22.06.00.028

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30077: Compiled CSS
Tomas Cohen Arazi [Mon, 1 Aug 2022 17:04:43 +0000 (14:04 -0300)]
Bug 30077: Compiled CSS

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30077: (follow-up) Set max width for library drapdown
Owen Leonard [Wed, 6 Apr 2022 14:17:46 +0000 (14:17 +0000)]
Bug 30077: (follow-up) Set max width for library drapdown

If you have a library with a very long name the dropdown will expand to
accommodate it. I think this is awkward-looking, so I propose to set a
max width on <select> elements in the header search region.

The patch requires a rebuild of the staff interface CSS:
https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client

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>
2 years agoBug 30077: (follow-up) retain branch selection
Lucas Gass [Tue, 5 Apr 2022 23:04:33 +0000 (23:04 +0000)]
Bug 30077: (follow-up) retain branch selection

To test:
1. Apply patch, updatedatabase, restart_all
2. Search for the system pref 'IntranetAddMastheadLibraryPulldown'
3. Set it to 'Show'.
4. Go to any page that contains header search box and click on 'Search
   the catalog'.
5. To the left of the search bar you should see a dropdown for branches.
6. This should be defaulted to 'All libraries'.
7. In the dropdown choose any branch and do a search and make sure it is
   correctly limiting to that branch.
8. Try changing to a different branch and doing another search. It
   should correcrly limit to that branch and retain that branch in the
   dropdown, just like the OPAC.
9. Try selecting 'All libraries' from the top of the dropdown and make
   sure it is correctly searching all branches.
10. Turn on the system pref 'IntranetCatalogSearchPulldown' and make
    sure it looks nice with both of those dropdowns and functions when
    you use limiters from both dropdowns.

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>
2 years agoBug 30077: Add system preference IntranetAddMastheadLibraryPulldown
Lucas Gass [Thu, 10 Feb 2022 23:48:13 +0000 (23:48 +0000)]
Bug 30077: Add system preference IntranetAddMastheadLibraryPulldown

To test:
1. Apply patch, updatedatabase, restart_all
2. Search for the system pref 'IntranetAddMastheadLibraryPulldown'
3. Set it to 'Show'.
4. Go to any page that contains header search box and click on 'Search
   the catalog'.
5. To the left of the search bar you should see a dropdown for branches.
6. This should be defaulted to 'All libraries'.
7. In the dropdown choose any branch and do a search and make sure it is
   correctly limiting to that branch.
8. Try changing to a different branch and doing another search. It
   should correcrly limit to that branch BUT it should also default back
   to 'All libraries' for the next search.
9. Try selecting 'All libraries' from the top of the dropdown and make
   sure it is correctly searching all branches.
10. Turn on the system pref 'IntranetCatalogSearchPulldown' and make
    sure it looks nice with both of those dropdowns and functions when
    you use limiters from both dropdowns.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
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>
2 years agoBug 23919: DBRev 22.06.00.027
Tomas Cohen Arazi [Mon, 1 Aug 2022 17:00:03 +0000 (14:00 -0300)]
Bug 23919: DBRev 22.06.00.027

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23919: (QA follow-up) Tidy query build code
Tomas Cohen Arazi [Mon, 1 Aug 2022 16:55:35 +0000 (13:55 -0300)]
Bug 23919: (QA follow-up) Tidy query build code

This is really opinionated, but I found this to be much cleaner to read
and thought it was worth pusing as well.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23919: Add tests for Items search by ISBN and ISSN with variations
Slava Shishkin [Fri, 29 Apr 2022 09:10:54 +0000 (12:10 +0300)]
Bug 23919: Add tests for Items search by ISBN and ISSN with variations

(sysprefs SearchWithISBNVariations/SearchWithISSNVariations)

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>
2 years agoBug 23919: Items search by ISBN variations and ISSN variations
Slava Shishkin [Tue, 26 Apr 2022 21:22:54 +0000 (00:22 +0300)]
Bug 23919: Items search by ISBN variations and ISSN variations

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>
2 years agoBug 23919: Add tests for biblioItems search by ISBN and ISSN with
Slava Shishkin [Thu, 28 Apr 2022 19:38:23 +0000 (22:38 +0300)]
Bug 23919: Add tests for biblioItems search by ISBN and ISSN with

variations (sysprefs SearchWithISBNVariations/SearchWithISSNVariations)

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>
2 years agoBug 23919: Zebra search by ISSN variations
Slava Shishkin [Tue, 26 Apr 2022 20:38:33 +0000 (23:38 +0300)]
Bug 23919: Zebra search by ISSN variations

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>
2 years agoBug 23919: Add new system preference SearchWithISSNVariations
Slava Shishkin [Sat, 23 Apr 2022 21:18:22 +0000 (00:18 +0300)]
Bug 23919: Add new system preference SearchWithISSNVariations

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>
2 years agoBug 30984: DBIC update
Tomas Cohen Arazi [Mon, 1 Aug 2022 13:00:54 +0000 (10:00 -0300)]
Bug 30984: DBIC update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30612: Rename other occurrences
Jonathan Druart [Mon, 1 Aug 2022 12:44:04 +0000 (14:44 +0200)]
Bug 30612: Rename other occurrences

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30612: (QA follow-up) Rename accountlines method to account_lines
Kyle Hall [Mon, 1 Aug 2022 12:34:17 +0000 (08:34 -0400)]
Bug 30612: (QA follow-up) Rename accountlines method to account_lines

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30612: Update schema files
Kyle M Hall [Wed, 8 Jun 2022 17:43:01 +0000 (13:43 -0400)]
Bug 30612: Update schema files

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30612: Add accountlines method to Koha::Checkout and Koha::Old::Checkout
Kyle M Hall [Wed, 8 Jun 2022 17:41:56 +0000 (13:41 -0400)]
Bug 30612: Add accountlines method to Koha::Checkout and Koha::Old::Checkout

It would be very useful to have an accountlines method on checkouts objects. In particular it would make fees related to a checkout available from the checkout objects in overdue notices.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Koha/Account/Line.t
3) prove t/db_dependent/Koha/Checkouts.t

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>
2 years agoBug 27849: (follow-up) Add test
Marcel de Rooy [Mon, 1 Aug 2022 07:25:10 +0000 (07:25 +0000)]
Bug 27849: (follow-up) Add test

Compacting the code a bit too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 27849: Koha::Token may access undefined C4::Context->userenv
MJ Ray [Wed, 3 Mar 2021 17:54:42 +0000 (17:54 +0000)]
Bug 27849: Koha::Token may access undefined C4::Context->userenv

The _add_default_csrf_params internal function accesses
C4::Context->userenv without checking that it has been defined. I think
not all of the potential callers of it declare that they require a
defined userenv, so we should test and provide defaults for required
values if it is not defined, to avoid some "Can't use an undefined value
as a HASH reference" HTTP 500 Internal Server Errors.

To test:

Do anything that requires a form with CSRF token, such as editing your
details. Behaviour should be unchanged. To test the failure case, you
would need some customised code that indirectly generates a CSRF token
before setting the userenv up and I am not sure there is any in released
Koha yet.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Looks good to me. Working as expected.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28864: Have patron card creator use PatronsPerPage
Michael Hafen [Fri, 13 Aug 2021 21:52:52 +0000 (15:52 -0600)]
Bug 28864: Have patron card creator use PatronsPerPage

Add pageLength to members/member.tt
Add aLengthMenu and pageLength to
 patroncards/add_user_search (common/patron_search.tt).
Add aLengthMenu, pageLength, and iDisplayLength to patroncards/edit-batch

Test plan:
1.  Set the PatronsPerPage system preference to any integer other than 20.

2.  Go to Tools -> Patron card creator.
3.  Start a new Card Batch.
4.  Click the 'Add patron(s)' button to open the patron search window.
5.  Do a search.
6.  Add more than 20 patrons to the batch.
7.  Close patron search window.
8.  Click the 'Add patron(s)' button to add the selected patrons to the batch.
9.  Observe that the table of patrons is has 20 as the default per page setting.

10. Apply patch.
11. Reload the batch.
12. Observe that the per page drop down includes the value of PatronsPerPage
     and that value is selected by default.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30964: (QA follow-up) Add classes to allow for additional styling
Katrin Fischer [Sat, 30 Jul 2022 13:39:41 +0000 (13:39 +0000)]
Bug 30964: (QA follow-up) Add classes to allow for additional styling

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30964: Add 'restricted' and 'has overdues' on curbside pickup
Jonathan Druart [Mon, 27 Jun 2022 13:20:03 +0000 (15:20 +0200)]
Bug 30964: Add 'restricted' and 'has overdues' on curbside pickup

This patch adds more information about the patron's account on the
curbside pickup list view.
"Patron's account is restricted" if the patron is restricted
"Patron has items overdue" if the patron has overdues

Sponsored-by: Association KohaLa - https://koha-fr.org/
Signed-off-by: Koha Team University Lyon 3 <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30984: DBRev 22.06.00.026
Tomas Cohen Arazi [Mon, 1 Aug 2022 12:26:59 +0000 (09:26 -0300)]
Bug 30984: DBRev 22.06.00.026

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30984: (QA follow-up) Switch from mediumtext to varchar(255)
Kyle Hall [Fri, 29 Jul 2022 10:53:06 +0000 (06:53 -0400)]
Bug 30984: (QA follow-up) Switch from mediumtext to varchar(255)

My research indeicates that tinytext of less than 40 bytes uses
about the same storage as a varchar(255). Also, using
a TEXT field in a complex query may create a temp table.
varchar fields are also more efficient for sorting on.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30984: (QA follow-up) Ternary formatting style
Marcel de Rooy [Fri, 29 Jul 2022 06:39:21 +0000 (06:39 +0000)]
Bug 30984: (QA follow-up) Ternary formatting style

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30984: Action logs should log the cronjob script name that generated the given log
Kyle Hall [Fri, 17 Jun 2022 10:59:11 +0000 (06:59 -0400)]
Bug 30984: Action logs should log the cronjob script name that generated the given log

When something is changed by a cronjob, and that entity is logged via action logs, we can know what changed, and that it was via a cronjob, but we cannot necessarily know which cronjob made that change. The closest we can come is to find the action logs for the cronjob module which ran before the change which is by no means reliable assuming the CronLog is even enabled.

We should add a new column to action logs to store the name of the script ran for any action logs where the interface is "cron".

Test plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Enable all the Log/Logging sysprefs
4) Run some cronjobs that will generate action logs
5) Note the new action_logs column "script" contains the filename of the
   cronjob that caused the change.

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>
2 years agoBug 30658: (bug 29496 follow-up) CheckMandatorySubfields don't work properly with...
Janusz Kaczmarek [Sun, 1 May 2022 21:59:09 +0000 (23:59 +0200)]
Bug 30658: (bug 29496 follow-up) CheckMandatorySubfields don't work properly with select field in serials-edit.tt for Supplemental issue

CheckMandatorySubfields use the class "input_marceditor" but in file
serials-edit.tt this class is not set for select input in Supplemental
issue form. In consequence if a select field is set as mandatory, it is
detected as missing even if it is filed and so you can't submit the form
and receive the new supplemantal issue.

Test plan:
1- Create (or find) a subscription for a biblio record and select the
   option "Create an item record when receiving this serial"
2- Be sure to have at least one mandatory subfield that is filed with a
   select input in the framework used by the biblio record. (ex: 952$a,
   952$b or 952$c).
3- From the subscription-detail page click on "Receive"
4- In the lower part--Supplemental issue--fill the suppelemant details,
   change the status to "Arrived" and fill the item form that appears.
5- Click on "Save"
6- Check that an error box appear with the message " Form not submitted
   because of the following problem(s) 1 mandatory fields empty
   (highlighted)" (the number can be different according to the number of
   concerned subfields)
7- Apply the patch
8- Repeat step 3 to 5
9- Check that no error appear and that your item has been created

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>
2 years agoBug 30468: Restore 'set -e' and remove echos
Jonathan Druart [Mon, 1 Aug 2022 10:31:21 +0000 (12:31 +0200)]
Bug 30468: Restore 'set -e' and remove echos

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30468: koha-mysql does not honor Koha's timezone setting
Kyle Hall [Wed, 6 Apr 2022 12:38:00 +0000 (08:38 -0400)]
Bug 30468: koha-mysql does not honor Koha's timezone setting

If I run a query like "SELECT NOW()" from a koha report, I will get a different answer than if I had run it from koha-mysql.
In Koha, we set the timezone for each database connection.
However, koha-mysql does not do this, so instead we are left using the default timezone of the database.

Test Plan:
1) Set your time zone to something other than the database time zone
2) run "SELECT NOW()" using debian/scripts/koha-mysql
   *not* /usr/sbin/koha-mysql
3) Note you get the database timezone's current time
4) Apply this patch
5) Repeat step 2
6) Now you get the correct time!

Signed-off-by: Michal Urban <michalurban177@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31269: Define sDefaultContent for DataTables
Lucas Gass [Fri, 29 Jul 2022 23:41:13 +0000 (23:41 +0000)]
Bug 31269: Define sDefaultContent for DataTables

1. Stage a MARC record for import
2. Once you have one click on 'Manage staged records'
3. You will see an alert that says "Something went wrong when loading the table."
4. If you dismiss that you should see the following error:

DataTables warning: table id=records-table - Requested unknown parameter '' for row 0, column 4. For more information about this error, please see http://datatables.net/tn/4

5. Appy patch
6. Try ssteps 1 & 2 again
7. No DataTable errors

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>
2 years agoBug 30028: Fix patron message delete confirmation to be translatable
Shi Yao Wang [Fri, 27 May 2022 14:52:08 +0000 (10:52 -0400)]
Bug 30028: Fix patron message delete confirmation to be translatable

Make the message deletion confirmation popup translatable. Test plan
uses fr-CA translations.

Test plan:
1) Switch language to french (fr-CA)
If you do not have the translations, go to
  misc/translator
then do
  ./translate install fr-CA
After it is done, go to administration > global system preference >
l18N/L10N then select Français (fr-CA) under language preference.
Refresh then you should be able to switch languages.
2) Add a message to a patron account from your own branch (or make sure AllowAllMessageDeletion is on)
3) Click "Delete" next to the message
--> a confirmation message appears "Are you sure you want to delete this message? This cannot be undone." with options "Cancel" and "OK".
4) Apply the patch
5) Write a translation in misc/translator/po/fr-CA-messages-js.po :
msgid "Are you sure you want to delete this message? This cannot be undone."
msgstr "Êtes-vous sûr de vouloir supprimer ce message? Cette opération est irréversible."
6) Refresh the translations by going to misc/translator and execute ./translate install fr-CA
7) Refresh and click "Delete" again
--> now the confirmation message is "Êtes-vous sûr de vouloir supprimer ce message? Cette opération est irréversible." with options "Cancel" and "OK"

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>
2 years agoBug 30499: Move the include for catalogue-search-box.inc in circ-search.inc to correc...
Tim McMahon [Fri, 29 Jul 2022 18:29:52 +0000 (13:29 -0500)]
Bug 30499: Move the include for catalogue-search-box.inc in circ-search.inc to correct keyboard shortcuts

Keyboard shortcuts for catalog search, check in and renew should be following:
1) Alt-q for catalog search
2) Alt-r for check in
3) Alt-w for renew

However on some of the pages shortcuts get mixed up:

1) Alt-w for catalog search
2) Alt-q for check in
3) Alt-r for renew

Affected files are:
circ/pendingreserves.tt
circ/circulation_batch_checkouts.tt
circ/circulation-home.tt
circ/branchtransfers.tt
circ/branchoverdues.tt
circ/set-library.tt
circ/checkout-notes.tt
circ/renew.tt
circ/waitingreserves.tt
circ/transferstoreceive.tt
circ/offline.tt
circ/bookcount.tt
circ/on-site_checkouts.tt
circ/circulation.tt
circ/transfers_to_send.tt
circ/request-article.tt
circ/overdue.tt
circ/reserveratios.tt
offline_circ/list.tt
offline_circ/process_koc.tt
offline_circ/enqueue_koc.tt
plugins/plugins-upload.tt
plugins/plugins-disabled.tt
pos/registers.tt
pos/register.tt
pos/pay.tt
reports/reports-home.tt
reports/dictionary.tt
reports/guided_reports_start.tt
reserve/request.tt
tools/scheduler.tt

This is because the include statement for catalogue-search-box.inc is in the wrong line in circ-search.inc.

To test:
1) Go to an affected page (circulation-home was the first one I noticed)
2) Try the keyboard shortcuts and notice they are incorrect
3) Apply patch and refresh the page
4) Notice that the keys work properly

Signed-off-by: Andrew <andrewfh@dubcolib.org>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 28707: Translate RECEIPT notice
Bernardo Gonzalez Kriegel [Fri, 6 May 2022 22:27:28 +0000 (19:27 -0300)]
Bug 28707: Translate RECEIPT notice

There is a badly crafted regex used when extracting
strings in multiline fields in yaml files
The regex is my own, introduced in Bug 24262, sorry.

This patch correct it a little. Better eyes are welcome.

To test:
1) go to misc translator, update some language
    ./translate update fr-CA

2) check missing strings

    egrep "Total out|Operator ID|August 31" po/fr-CA-installer.po

   first two are from sample notices, third from sample creator data

3) apply the patch, repeat 1)

4) repeat 2), verify the strings are present in the translation file

5) translate some of the new strings, install the language,
   verify strings are present in the translated files
    ./translate install fr-CA
   check fr-CA/optional/sample_creator_data.yml and
   fr-CA/mandatory/sample_notices.yml

There are some 60+ new strings.

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>
2 years agoBug 31251: Use jQuery val() to clear_entry
Lucas Gass [Thu, 28 Jul 2022 18:18:15 +0000 (18:18 +0000)]
Bug 31251: Use jQuery val() to clear_entry

1. Add some patron attributes that are textarea and some that have an AV category so they are select dropdowns
2. Go to the patron form and add some values to the patron attributes
3. Use the "Clear" button to try and clear the values, doesnt work.
4. Apply patch
5. Try clearing values from patron attributes that are both select dropdowns and textarea. The "Clear" button should work.

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>
2 years agoBug 31223: Do not explode if plugins disabled
Tomas Cohen Arazi [Tue, 26 Jul 2022 12:55:38 +0000 (09:55 -0300)]
Bug 31223: Do not explode if plugins disabled

This patch makes the code skip calculating the plugin-related task
codes => class mapping if plugins are entirely disbaled.

To test:
1. Apply the regression tests
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Plugins/BackgroundJob.t
=> FAIL: Tests explode with: Can't call method "GetPlugins" on an
undefined value at... Koha/BackgroundJob.pm line 424.
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: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31223: Regression tests
Tomas Cohen Arazi [Tue, 26 Jul 2022 13:48:21 +0000 (10:48 -0300)]
Bug 31223: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30965: Add a 'x' to go back to the patron search
Jonathan Druart [Sun, 31 Jul 2022 06:14:21 +0000 (08:14 +0200)]
Bug 30965: Add a 'x' to go back to the patron search

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30965: Add patron autocomplete search to curbside pickups
Jonathan Druart [Mon, 27 Jun 2022 12:51:45 +0000 (14:51 +0200)]
Bug 30965: Add patron autocomplete search to curbside pickups

Prior to this patch librarians had to know the cardnumber to search for
patron. Now it's possible to search using the default patron
autocomplete search (name, cardnumber, etc.)

Test plan:
Confirm that you can search for a patron without their cardnumber,
select it and create a curbside pickup

Sponsored-by: Association KohaLa - https://koha-fr.org/
Signed-off-by: Koha Team University Lyon 3 <koha@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30650: Add missing koha_object[s]_class methods
Jonathan Druart [Sun, 31 Jul 2022 05:57:03 +0000 (07:57 +0200)]
Bug 30650: Add missing koha_object[s]_class methods

To fix TestBuilder.t
        #   at t/db_dependent/TestBuilder.t line 453.
        #          got: 'Can't locate Koha/CurbsidePickupPolicys.pm

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30389: Switch to Bootstrap tabs on the page for adding orders from MARC file
Owen Leonard [Mon, 28 Mar 2022 19:21:55 +0000 (19:21 +0000)]
Bug 30389: Switch to Bootstrap tabs on the page for adding orders from MARC file

This patch updates addorderiso2709.tt so that it uses Bootstrap tabs
intead of jQuery.

The patch contains indentation changes, so diff accordingly.

To test apply the patch and go to Acquisitions -> Vendor -> Basket ->
Add to basket -> From a staged file.

- Click "Add orders" next to the staged file you want to use.
- On the "Add orders" page, test that the tabs work correctly.

Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 14364: DBRev 22.06.00.025
Tomas Cohen Arazi [Fri, 29 Jul 2022 19:06:12 +0000 (16:06 -0300)]
Bug 14364: DBRev 22.06.00.025

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29012: DBRev 22.06.00.024
Tomas Cohen Arazi [Fri, 29 Jul 2022 19:04:12 +0000 (16:04 -0300)]
Bug 29012: DBRev 22.06.00.024

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 14364: (QA follow-up) Add email validation to ExpireReservesAutoFillEmail
Katrin Fischer [Tue, 26 Apr 2022 14:34:18 +0000 (14:34 +0000)]
Bug 14364: (QA follow-up) Add email validation to ExpireReservesAutoFillEmail

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 14364: (QA follow-up) Fix capitalization
Katrin Fischer [Tue, 26 Apr 2022 14:23:25 +0000 (14:23 +0000)]
Bug 14364: (QA follow-up) Fix capitalization

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 14364: Fix spelling and tests
Nick Clemens [Mon, 25 Apr 2022 14:41:33 +0000 (14:41 +0000)]
Bug 14364: Fix spelling and tests

Moved the installer to pl file
Adjusted capitalization / reply-to
Fix tests by importing needed fuction and adjusting a wrong call

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 14364: (follow-up) Cleanup duplicate code and adjust notices and prefs
Nick Clemens [Mon, 20 Dec 2021 14:03:22 +0000 (14:03 +0000)]
Bug 14364: (follow-up) Cleanup duplicate code and adjust notices and prefs

This patch removes a duplicated stanza left form moving routine
Changes the routines to use inbound_library_address
Improves the display if the system preferences
Updates the update file
Moves smaple notice

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 14364: (QA follow-up) Generate message for transfers as well
Kyle M Hall [Thu, 13 May 2021 16:04:41 +0000 (12:04 -0400)]
Bug 14364: (QA follow-up) Generate message for transfers as well

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 14364: Allow automatically canceled expired waiting holds to fill the next hold
Kyle M Hall [Fri, 2 Feb 2018 13:36:02 +0000 (08:36 -0500)]
Bug 14364: Allow automatically canceled expired waiting holds to fill the next hold

Right now, if a library automatically cancels expired waiting holds, a
librarian must still re-checkin an item to trap the next available hold
for that item. It would be better if the next hold was automatically
trapped and the librarians receive an email notification so they can
make any changes to the item if need be ( hold area, hold slip in item,
etc ).

Test Plan:
 1) Apply this patch
 2) Run updatedatabase.pl
 3) Create a record with one item
 4) Place two holds on that record
 5) Check in the item and set it to waiting for the first patron
 6) Set ReservesMaxPickUpDelay to 1
 7) Enable ExpireReservesMaxPickUpDelay
 8) Enable ExpireReservesAutoFill
 9) Set an email address in ExpireReservesAutoFillEmail
10) Modify the holds waitingdate to be in the past
11) Run misc/cronjobs/holds/cancel_expired_holds.pl
12) Note the hold is now waiting for the next patron
12) Note a waiting hold notification email was sent to that patron
13) Note a hold changed notification email was sent to the library

Signed-off-by: Victoria Faafia <vfaafia29@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31238: Fix typo in marc_subfields_structure.pl
Emmi Takkinen [Tue, 26 Jul 2022 09:02:16 +0000 (12:02 +0300)]
Bug 31238: Fix typo in marc_subfields_structure.pl

After bug 29001 one is unable to save authorised value to frameworks
subfields. This is caused by minor typo in marc_subfields_structure.pl.

To test:
1. Edit e.g. default frameworks subfield 952$8
2. Add or change fields authorised value
3. Save your changes
=> note that on subfield listing there is no mention that 952$8 is linked to any authorised value
=> if you edit 952$8 authorised value input is empty
4. Apply this patch.
5. Repeat steps 1.-3.
=> authorised value should now be saved

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29012: (QA follow-up) Use q{} instead of '' in smart-rules.pl
Kyle Hall [Fri, 29 Jul 2022 12:12:53 +0000 (08:12 -0400)]
Bug 29012: (QA follow-up) Use q{} instead of '' in smart-rules.pl

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29012: Add default values for blank circulation rules that weren't saved to the...
Kevin Carnes [Fri, 3 Dec 2021 09:49:59 +0000 (09:49 +0000)]
Bug 29012: Add default values for blank circulation rules that weren't saved to the database

There are 5 fields that are not set if no value is provided when saving/editing a rule in Administration->Circulation and fines rules
- issuelength
- hardduedate
- unseenrenewalsallowed
- rentaldiscount
- decreaseloanholds

This is problematic because it gives the impression these rules are set as blank, but in reality they don't exist and the rule will fal back to the higher level

To test:
1 - Set a rule for
    Patron category: Teacher
    Itemtype: All
    Hard due date: (Today)
    Lona period: 10
2 - Set a rule for
    Patron category: Teacher
    Itemtype: Books
    Hard due date: (leave blank)
    Loan period: 10
3 - Expected behaviour is Book item will checkout to teacher for 10 days, all other types will be due yesterday at 25:59:00
4 - Checkout an non-book item type to teacher
5 - Hard due date applies
6 - Checkout a 'book' item type to teacher
7 - Hard due date applies - FAIL

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>