]> git.koha-community.org Git - koha.git/log
koha.git
2 years agoBug 30494: Compiled CSS
Fridolin Somers [Mon, 2 May 2022 20:34:01 +0000 (10:34 -1000)]
Bug 30494: Compiled CSS

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30494: Replace the use of jQueryUI Accordion on the table settings page
Owen Leonard [Thu, 7 Apr 2022 16:02:37 +0000 (16:02 +0000)]
Bug 30494: Replace the use of jQueryUI Accordion on the table settings page

This page updates the table settings page so that it uses Bootstrap's
"Collapse" feature instead of jQueryUI's Accordion.

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

- Go to Administration -> Table settings.
- You should see a list of table settings which looks much the same as
  it did before, with arrow icons prefixing each section header. All
  panels should be collapsed.
- Test expanding and collapsing panels to confirm it's working
  correctly.
- When you expand a section the heading arrow should change from
  right-pointing to down.
- Make a change to one of the table configurations. After clicking
  "Save" the page should reload with the same panel expanded.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30491: Convert saved reports tabs to Bootstrap
Owen Leonard [Thu, 7 Apr 2022 14:39:55 +0000 (14:39 +0000)]
Bug 30491: Convert saved reports tabs to Bootstrap

This patch updates the saved reports page so that it uses Bootstrap tabs
instead of jQueryUI.

To test, apply the patch and go to Reports -> Use saved.

 - On the Saved Reports page you should see multiple tabs.
 - Each should look correct and work correctly.
 - Clicking each tab should result in the table of reports filtering
   correctly for that tab (Patrons tab showing only patrons reports).
 - If necessary, edit one or more reports so that they have a subgroup.
 - Confirm that each subgroup selector is correct for each tab, i.e. a
   subgroup created under "Catalog" should only be available under the
   Catalog tab.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30489: Convert MARC and authority subfield edit tabs to Bootstrap
Owen Leonard [Mon, 11 Apr 2022 12:00:38 +0000 (12:00 +0000)]
Bug 30489: Convert MARC and authority subfield edit tabs to Bootstrap

This patch updates the MARC and authority subfield edit interface to
replace jQueryUI tabs with Bootstrap. The code for handling
drag-to-reorder tabs is updated to accommodate the new markup.

To test, apply the patch and restart_all.

- Go to Administration -> MARC bibliographic framework -> Default
  framework and choose "MARC structure" from the Actions menu.
- In the row for 000 LEADER, click Actions -> View subfields.
- Click "Edit." On the edit page the tabs should look correct and work
  correctly.
- Return to the list of tags and click "View subfields" for the 245 tag.
- Click one of the "Edit" buttons for any but the first subfield, e.g.
  "a".
- On the "Tag 245 Subfield constraints" page the "a" tab should be
  pre-selected.
- Click any of the subfield tabs and drag it to re-order it in the
  sequence of tags.
- It should stay in the correct slot when you release it.
- Save and confirm that the new sequence of subfields has been saved.

Perform all the same tests under Administration -> Authority types.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30457: (follow-up) Tweak markup around search form
Owen Leonard [Wed, 20 Apr 2022 15:48:36 +0000 (15:48 +0000)]
Bug 30457: (follow-up) Tweak markup around search form

This patch makes a change to the markup around the patron/clubs search
form on the holds page. This change prevents the Bootstrap tabs from
inheriting an unwanted margin from the fieldset.brief definition.

The change also replaces a <label> tag with an <h2>. I think a heading
makes more sense than a free-floating <label>.

To test, apply the patch and confirm that the holds page
(/cgi-bin/koha/reserve/request.pl?biblionumber=XXX) looks correct.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30457: Convert holds page tabs to Bootstrap
Owen Leonard [Tue, 5 Apr 2022 13:49:53 +0000 (13:49 +0000)]
Bug 30457: Convert holds page tabs to Bootstrap

This patch updates the holds page to replace jQueryUI tabs with
Bootstrap.

To test, apply the patch and begin the process of placing a hold on a
title in the catalog.

If you have one or more patron clubs configured:
 - You should see two tabs, Patrons and Clubs.
 - Both should look correct and work correctly.
 - The Patrons tab should be selected initially, with cursor focus in
   the form field.
 - Switch to the Clubs tab. The cursor focus should move to the form
   field under this tab.
 - Submit a club search which will return results.
 - The page should refresh and the clubs tab should be preselected,
   showing the search results.

If you have no patron clubs configured, the page should show only the
Patrons tab.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30454: Convert holds awaiting pickup tabs to Bootstrap
Owen Leonard [Mon, 4 Apr 2022 18:23:00 +0000 (18:23 +0000)]
Bug 30454: Convert holds awaiting pickup tabs to Bootstrap

This patch updates the holds awaiting pickup page to replace jQueryUI
tabs with Bootstrap tabs. A minor JavaScript change is required to work
with the new HTML structure.

To test you should have multiple holds for one library: Some which are
waiting for less than the number of days specified in
ReservesMaxPickUpDelay, some which are waiting longer.

- Apply the patch and go to Circulation -> Holds awaiting pickup.
- You should see two tabs: "Holds waiting" and "Holds waiting over..."
- Confirm that the tabs look correct and work correctly.
- Confirm that the "Cancel selected" buttons work correctly under each
  tab.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30453: Convert offline circulation tabs to Bootstrap
Owen Leonard [Mon, 4 Apr 2022 16:40:20 +0000 (16:40 +0000)]
Bug 30453: Convert offline circulation tabs to Bootstrap

This patch updates the offline circulation page in the staff interface
to use Bootstrap tabs instead of jQueryUI.

To test, apply the patch and make sure the AllowOfflineCirculation
system preference is enabled.

- Go to Circulation -> Built-in offline circulation interface
- Submit a patron barcode in the "Check out" field.
- Under the barcode input field you should see two tabs: Checkouts and
  Fines. Confirm that they look correct and work correctly.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30434: Convert catalog merge page tabs to Bootstrap
Owen Leonard [Fri, 1 Apr 2022 14:30:49 +0000 (14:30 +0000)]
Bug 30434: Convert catalog merge page tabs to Bootstrap

This patch updates the catalog merge template so that it uses Bootstrap
tabs instead of jQueryUI. Some JavaScript is modified to accommodate the
new DOM structure.

The patch also makes a minor HTML correction, adding a missing "</ol>".

To test, apply the patch and search the catalog in the staff client.

- In the search results, check the checkbox for two records.
- Choose Edit -> Merge records.
- Click next to accept the merge reference selection.
- On the next page you should see two tabs under "Source records."
  Confirm that they work correctly.
- All checkboxes in the first tab should be checked by default.
- Confirm that tag and subfield selection still works correctly.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30628: Fix patron selection in batch patron modification tool
Jonathan Druart [Thu, 28 Apr 2022 08:32:28 +0000 (10:32 +0200)]
Bug 30628: Fix patron selection in batch patron modification tool

bug 28014 added Datatables to this view, but the form is submitted with
only the checkboxes from the first page.

Solution adapted from https://stackoverflow.com/questions/33240409/how-to-submit-checkboxes-from-all-pages-with-jquery-datatables

Test plan:
Have more than 20 cardnumbers, use the batch patron modification tool
Select (not all) patrons from the first page and second page
Submit the form
Notice that the patrons you have selected appear on the confirmation
page.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30599: Add an 'Archive selected' button
Nick Clemens [Fri, 22 Apr 2022 19:15:43 +0000 (19:15 +0000)]
Bug 30599: Add an 'Archive selected' button

This patch simply adds a new button on the suggestions interface to allow
for archiving multiple suggestions.

To test:
1 - Apply patch
2 - Create some purchase suggestions
3 - Select several suggestions
4 - Click 'Archive selected'
5 - Suggestions are archived
6 - You can view archived suggestions by selecting 'Suggestion information'->'Include archived'

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Felicity Brown <felicity.brown@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30620: Add a warning about /*!VERSION lines in kohastructure
Marcel de Rooy [Tue, 26 Apr 2022 11:45:52 +0000 (11:45 +0000)]
Bug 30620: Add a warning about /*!VERSION lines in kohastructure

Also adding a similar comment in C4::Installer.

No test plan, just documentation.

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>
2 years agoBug 22379: Unit tests for CancelHold service
Arthur Suzuki [Mon, 27 Jan 2020 04:41:05 +0000 (05:41 +0100)]
Bug 22379: Unit tests for CancelHold service

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 22379: Fix checks not made by ILS-DI method CancelHold
Arthur Suzuki [Wed, 20 Feb 2019 20:15:44 +0000 (21:15 +0100)]
Bug 22379: Fix checks not made by ILS-DI method CancelHold

Disable the possibility for a borrower to cancel a reservation
which is either in a Transit or Waiting state.
This reproduce the behaviour seen on the OPAC.
Also replaces previous checks on the borrowernumber
since CanReserveBeCanceledFromOpac already checks this.

--------------------------------

Test plan (before patch) :
-Put a reserve for a borrower
-Try to cancel the reserve providing another borrowernumber as argument
-> Should fail and reply "RecordNotFound"
-> Reserve still appears in the list of holds.

-Try to cancel the reserve providing the borrowernumber the reserve is
for.
-> Should succeed, reply with "Canceled"
-> Reserve do not show up in the list of holds for the borrower

-Put a new reserve with a pickup branch != from the homebranch
-Transfer the item to the pickup branch (reserve status = Transit)
-Try to cancel the reserve (with proper borrowernumber)
-> Should succeed, reply with "Canceled"
-> Reserve do not show up in the list of holds for the borrower

-Checkout the reserved item in the pickup branch (reserve status =
Waiting)
-Try to cancel the reserve (with proper borrowernumber)
-> Should succeed, reply with "Canceled"
-> Reserve do not show up in the list of holds for the borrower

--------------------------------

Test plan (after patch) :
-Put a reserve for a borrower
-Try to cancel the reserve providing another borrowernumber as argument
-> Should fail and reply "BorrowerCannotCancelHold"
-> Reserve still appears in the list of holds.

-Try to cancel the reserve providing the borrowernumber the reserve is
for.
-> Should succeed, reply with "Canceled"
-> Reserve do not show up in the list of holds for the borrower

-Put a new reserve with a pickup branch != from the homebranch
-Transfer the item to the pickup branch (reserve status = Transit)
-Try to cancel the reserve (with proper borrowernumber)
-> Should fail and reply "BorrowerCannotCancelHold"
-> Reserve still appears in the list of holds.

-Checkout the reserved item in the pickup branch (reserve status =
Waiting)
-Try to cancel the reserve (with proper borrowernumber)
-> Should fail and reply "BorrowerCannotCancelHold"
-> Reserve still appears in the list of holds.

Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30597: Update RestrictionBlockRenewing description to include auto renew
Andrew Fuerste-Henry [Fri, 22 Apr 2022 16:12:50 +0000 (16:12 +0000)]
Bug 30597: Update RestrictionBlockRenewing description to include auto renew

To test:
- apply the patch, find the syspref, see the new wording

To confirm the behavior:
- set the syspref to Block
- give a patron an auto-renewing checkout and a restriction
- run automatic_renewal.pl, see item does not renew
- switch syspref to allow, repeat, see renewal

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>
2 years agoBug 30366: Remove warn when running automatic_item_modification_by_age.pl
Fridolin Somers [Mon, 25 Apr 2022 20:27:54 +0000 (10:27 -1000)]
Bug 30366: Remove warn when running automatic_item_modification_by_age.pl

When using the ./misc/cronjobs/automatic_item_modification_by_age.pl -v
after setting up rules under Tools > Automatic item modifications by
age the script outputs several lines of warnings:

Use of uninitialized value in string eq at /kohadevbox/koha/C4/Items.pm
line 1864.

This is because even when there is no condition defined, modification
rule is stored with empty hash, like :
[{"substitutions":[{"field":"items.new_status","value":"0"}],"conditions":[{}],"age":"60","agefield":"items.dateaccessioned"}]

Test plan :
1) Go to Tools > Automatic item modifications by age
2) Create a rule with no conditions, just a substitution
3) Run misc/cronjobs/automatic_item_modification_by_age.pl -v
4) Check there is no warning
5) Edit the rule to add a condition
6) Run misc/cronjobs/automatic_item_modification_by_age.pl -v
7) Check the condition is applied

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30572: DBRev 21.12.00.042
Fridolin Somers [Mon, 2 May 2022 19:37:42 +0000 (09:37 -1000)]
Bug 30572: DBRev 21.12.00.042

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30572: DBIx schema change for SearchMarcToField
Marcel de Rooy [Thu, 21 Apr 2022 12:41:08 +0000 (12:41 +0000)]
Bug 30572: DBIx schema change for SearchMarcToField

No test plan.

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>
2 years agoBug 30572: Dbrev for search_marc_to_field.sort
Marcel de Rooy [Thu, 21 Apr 2022 12:42:53 +0000 (12:42 +0000)]
Bug 30572: Dbrev for search_marc_to_field.sort

Test plan:
Run updatedatabase.

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>
2 years agoBug 30572: Adjust search_marc_to_field.sort in kohastructure
Marcel de Rooy [Thu, 21 Apr 2022 12:29:48 +0000 (12:29 +0000)]
Bug 30572: Adjust search_marc_to_field.sort in kohastructure

Test plan:
New install or run kohastructure on empty database.

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>
2 years agoBug 30449: DBRev 21.12.00.041
Fridolin Somers [Mon, 2 May 2022 19:31:51 +0000 (09:31 -1000)]
Bug 30449: DBRev 21.12.00.041

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30449: (QA follow-up) Report back on problematic situations
Tomas Cohen Arazi [Mon, 25 Apr 2022 13:09:41 +0000 (10:09 -0300)]
Bug 30449: (QA follow-up) Report back on problematic situations

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30449: DBIC updates
Tomas Cohen Arazi [Mon, 25 Apr 2022 12:51:24 +0000 (09:51 -0300)]
Bug 30449: DBIC updates

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30449: Add missing FK constraint on borrower_attribute_types
Marcel de Rooy [Mon, 4 Apr 2022 13:20:37 +0000 (13:20 +0000)]
Bug 30449: Add missing FK constraint on borrower_attribute_types

Old Koha databases probably have it, newer ones might not.
See also BZ description.

Test plan:
[1} Check SHOW CREATE TABLE borrower_attribute_types to see if you
    have any index and FK constraint on category_code.
[2] Run updatedatabase.
[3] If you had category_code_fk, it should be replaced.
[4] Remove index and constraint again using things like:
    alter table borrower_attribute_types drop constraint `borrower_attribute_types_ibfk_1`;
    alter table borrower_attribute_types drop index category_code;
[5] Run updatedatabase.
[6] You should have KEY category_code and FK borrower_attribute_types_ibfk_1.
[7] Run updatedatabase. Idempotent, no changes.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30610: Update on click binding for print receipt
Martin Renvoize [Mon, 25 Apr 2022 14:37:33 +0000 (15:37 +0100)]
Bug 30610: Update on click binding for print receipt

This patch updates the binding for the on click even of the print
receipt button so that subsequent pages in the datatable work with the
reciept printing button.

Test plan
1) Enable cash management and process enough transactions to display
   more than one page of transactions in the register details page.
2) Confirm the 'Print receipt' button works on the first page of
   transactions
3) Confirm the 'Print receipt' button works on subsequent transactions
   pages in the datatable.
4) Confirm the same for the past transactions table.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30565: DBRev 21.12.00.040
Fridolin Somers [Mon, 2 May 2022 19:25:58 +0000 (09:25 -1000)]
Bug 30565: DBRev 21.12.00.040

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30565: DBIx schema change for stockrotationrotas
Marcel de Rooy [Wed, 20 Apr 2022 11:37:31 +0000 (11:37 +0000)]
Bug 30565: DBIx schema change for stockrotationrotas

No test plan.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30565: Database revision for stockrotationrotas
Marcel de Rooy [Wed, 20 Apr 2022 11:29:58 +0000 (11:29 +0000)]
Bug 30565: Database revision for stockrotationrotas

Add unique key if needed.
Adjust description column to make it NOT NULL.

Test plan:
(Optionally:) Drop unique key, make description nullable.
Run dbrev.
Check if unique key present, and description not-nullable.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30565: Correct kohastructure
Marcel de Rooy [Wed, 20 Apr 2022 11:22:15 +0000 (11:22 +0000)]
Bug 30565: Correct kohastructure

The unique key was added in a dbrev and is referred to in code.
But forgotten in kohastructure.

Test plan:
Run new install or kohastructure.sql on empty db.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 24001: (follow-up) Fix t_Profile.t
Fridolin Somers [Fri, 29 Apr 2022 06:24:45 +0000 (20:24 -1000)]
Bug 24001: (follow-up) Fix t_Profile.t

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30576: (follow-up) Corrections to behaviour to reflect unit tests
Martin Renvoize [Fri, 22 Apr 2022 14:19:29 +0000 (15:19 +0100)]
Bug 30576: (follow-up) Corrections to behaviour to reflect unit tests

The unit tests highlighted my original patch didn't cover the full
preference description.

We now replace the 'standard' option with the fields from the preference
and we also add those fields as options to the field selection in
advanced searches.

This patch also adjusts the tests to test for that and reflects the
expected changes to the number of options displayed in the select boxes.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30576: Use DefaultPatronSearchFields in patron search
Martin Renvoize [Thu, 21 Apr 2022 11:52:32 +0000 (12:52 +0100)]
Bug 30576: Use DefaultPatronSearchFields in patron search

This patch corrects the handling of the 'Standard' search field in
patron searches such that it accurately reflects the contents of the
DefaultPatronSearchFields system preference and falls back to a hard
coded list instead of always using the hard coded list.

To test:
1) Empty the contents of DefaultPatronSearchFields systempreference
2) Perform a patron search from the header search
3) Inspect the patrons API request and note that we search on the
   default fallback fields of firstname, surname, othernames,
   cardnumber and userid (and some extended attributes which are
   historically hard coded).
4) Navigate to the memebers-home by clicking the 'Patrons' button from
   the main page
5) Perform another search using the filters on the left with 'Standard'
   selected.
6) Note the same list of search fields used as above in the patrons API
   request.
7) Update the DefaultPatronSearchFields systempreference adding one or
   more borrower fields in a comma delimited list.
8) Repeat steps 2 -> 6 but this time upon inspecting the API request you
   should find that only the fields in your DefaultPatronSearchFields
   list are searched (along with the hard coded extended attributes
   list).
9) Signoff

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30626: Don't generate the query if no term passed
Jonathan Druart [Thu, 28 Apr 2022 13:00:29 +0000 (15:00 +0200)]
Bug 30626: Don't generate the query if no term passed

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30626: (QA follow-up) Fix test plan
Martin Renvoize [Wed, 27 Apr 2022 10:52:21 +0000 (11:52 +0100)]
Bug 30626: (QA follow-up) Fix test plan

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30626: Fix test
Jonathan Druart [Wed, 27 Apr 2022 10:34:11 +0000 (12:34 +0200)]
Bug 30626: Fix test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30626: DT REST API wrapper - Fix general search
Jonathan Druart [Wed, 27 Apr 2022 10:33:03 +0000 (12:33 +0200)]
Bug 30626: DT REST API wrapper - Fix general search

The general search query is not built correctly.

Say you have a table with column filters, like the main patron search:
General filter: henry
Specific filter on the 'Name' column: h

The generated query will be (= are actually LIKE):
{ Column1="henry" AND Column3="henry", ...} AND { Column2="h" }

The first term does not contain the Column2 attribute.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30630: Prevent crash on check-in if HoldsAutoFill is ON
Jonathan Druart [Thu, 28 Apr 2022 07:43:06 +0000 (09:43 +0200)]
Bug 30630: Prevent crash on check-in if HoldsAutoFill is ON

RevertWaitingStatus has already removed the itemnumber from the hold, passing $itemnumber (from scanned item) should work, as it will reattach the hold to the item

Test plan:
1 - Enable HoldsAutoFill
2 - Place a title level hold
3 - Check in an item and confirm hold
4 - Switch to another branch
5 - Checkin the item
Without this patch you got
Can't call method "biblionumber" on an undefined value at /kohadevbox/koha/C4/Reserves.pm line 1577.
 at /kohadevbox/koha/C4/Reserves.pm line 1576
With this patch applied the operation succeeds

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 24001: Fix Card template/rpinter profile creation and edit
Nick Clemens [Fri, 4 Mar 2022 16:19:35 +0000 (16:19 +0000)]
Bug 24001: Fix Card template/rpinter profile creation and edit

This patch adjusts the template/profiles to use the default of '0'
This should probably be NULL, and the columns foreign keys, this code
could use a further rewrite, but this should fix a long standing bug

To test:
 1 - Using the fresh install, with all the sample data.
 2 - Go to Home â€ş Tools â€ş Patron card creator â€ş Templates
 3 - New > Card template
 4 - Save
 5 - Error: DBD::mysql::st execute failed: Incorrect integer value: '' for column 'profile_id' at row 1
 6 - Edit an existing template
 7 - Save
 8 - Error: Can't bless non-reference value at /kohadevbox/koha/C4/Creators/Profile.pm line 89
 9 - Create a new 'Printer profile'
10 - Save
11 - Error: DBD::mysql::st execute failed: Incorrect integer value: '' for column 'template_id' at row 1
12 - Apply the attached patch.
13 - Verify you can create a new 'Card template' and 'Printer profile' with no errors
14 - Verify you can edit and save both of the newly created objects above

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 24001: Fix patron card template edition
Blou [Tue, 30 Jun 2020 16:50:09 +0000 (12:50 -0400)]
Bug 24001: Fix patron card template edition

Error when saving Patron card Template:
Can't bless non-reference value at
/home/vagrant/kohaclone/C4/Creators/Profile.pm line 89

This is caused by the profile dropdown offering invalid choices and is
fixed by adding a filter to limit options to creator = 'Patroncards'.
The UI already handles the case where no valid profile is avaiable.

Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30644: (bug 29788 follow-up) Make Koha::Item->safe_to_delete use Koha::Result...
Jonathan Druart [Thu, 28 Apr 2022 13:44:16 +0000 (15:44 +0200)]
Bug 30644: (bug 29788 follow-up) Make Koha::Item->safe_to_delete use Koha::Result::Boolean

Fix item deletion

Wrong if/else!

Test plan:
Delete an item

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29092: DBRev 21.12.00.039
Fridolin Somers [Wed, 27 Apr 2022 21:16:21 +0000 (11:16 -1000)]
Bug 29092: DBRev 21.12.00.039

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29092: Add timestamp to account-fines table column settings
Emmi Takkinen [Thu, 21 Apr 2022 06:27:17 +0000 (09:27 +0300)]
Bug 29092: Add timestamp to account-fines table column settings

Table settings for the account_fines table (in the Patrons section, the
"Transactions" table in a patron account) are missing a checkbox for the
"Updated On" column. Because of this, one cannot hide the Updated On
column and any other values one sets here get applied to the wrong
columns.

This patch adds timestamp to account-fines column settings.
To test:

1) Navigate to columns settings page and modify account-fines tables
   column.
   => Note that if you hide e.g. account_type column, column
   credit_number is hidden on patrons account page
2) Apply patch and update database.
   => Account-fines column settings has now a option to hide timestamp.
   => Correct columns should now be hidden.

Sponsored-by: Koha-Suomi Oy
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>
2 years agoBug 30136: Compiled CSS
Fridolin Somers [Wed, 27 Apr 2022 20:56:39 +0000 (10:56 -1000)]
Bug 30136: Compiled CSS

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30136: (follow-up) CSS and accessibility update
Owen Leonard [Mon, 25 Apr 2022 11:03:40 +0000 (11:03 +0000)]
Bug 30136: (follow-up) CSS and accessibility update

This patch adds the new CSS to the global CSS file. Rebuild the OPAC CSS
to test.

The patch also moves the JavaScript for the button from opac-bottom.inc
into global.js and adds accessibility labels to the generated markup.

Signed-off-by: SĂ©verine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30136: Add back to top button to OPAC
Fridolin Somers [Fri, 18 Feb 2022 20:44:14 +0000 (10:44 -1000)]
Bug 30136: Add back to top button to OPAC

Like in many websites, when scrolling down the page make a button appear to go back to top.
This can be very useful specially in search results page.

This patch adds to OPAC using Javascript a button with id "backtotop".
Button appears when 300 pixels from top are hidden.
This value may be adapted.

Test plan
1) Go to OPAC
2) Perform a search with many results
3) Scroll down
=> Back to top button appears
4) Manually scroll back to top
=> Button disappears
5) Scroll down and click on Back to top button
=> You get to top

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: SĂ©verine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: DBRev 21.12.00.038
Fridolin Somers [Wed, 27 Apr 2022 20:46:14 +0000 (10:46 -1000)]
Bug 29648: DBRev 21.12.00.038

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: (follow-up) Add missing raw filter
Fridolin Somers [Wed, 27 Apr 2022 20:34:04 +0000 (10:34 -1000)]
Bug 29648: (follow-up) Add missing raw filter

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: (QA follow-up) Remove NumSavedReports from .pref file
Katrin Fischer [Wed, 27 Apr 2022 16:19:21 +0000 (16:19 +0000)]
Bug 29648: (QA follow-up) Remove NumSavedReports from .pref file

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: (QA follow-up) Minor POD fix
Martin Renvoize [Wed, 27 Apr 2022 16:04:28 +0000 (17:04 +0100)]
Bug 29648: (QA follow-up) Minor POD fix

This just adds a top level set of POD headings to make the QA script
happy

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Fix occurrences of GetColumns
Jonathan Druart [Thu, 6 Jan 2022 14:11:40 +0000 (15:11 +0100)]
Bug 29648: Fix occurrences of GetColumns

We could add the configuration to these tables as well, but let go first
but the others (read: feeling lazy right now).

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Returns - no change
Jonathan Druart [Thu, 16 Dec 2021 12:04:17 +0000 (13:04 +0100)]
Bug 29648: Returns - no change

No change expected here, there is no sort and no paginate possible.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Upload tool - no sort
Jonathan Druart [Thu, 16 Dec 2021 13:12:39 +0000 (14:12 +0100)]
Bug 29648: Upload tool - no sort

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Remove default sort order for detail
Jonathan Druart [Wed, 12 Jan 2022 14:47:59 +0000 (15:47 +0100)]
Bug 29648: Remove default sort order for detail

On the detail view the number of columns changed, we cannot use the
default sort order here.
It certainly can be done on a different way but I prefer to postpone it
for now and see later.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Notice template - only sort
Jonathan Druart [Thu, 16 Dec 2021 13:09:28 +0000 (14:09 +0100)]
Bug 29648: Notice template - only sort

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Holds history - no sort
Jonathan Druart [Thu, 16 Dec 2021 12:16:15 +0000 (13:16 +0100)]
Bug 29648: Holds history - no sort

because of desc

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Log viewer - no sort
Jonathan Druart [Thu, 16 Dec 2021 13:15:34 +0000 (14:15 +0100)]
Bug 29648: Log viewer - no sort

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Subscription detail - no change
Jonathan Druart [Thu, 16 Dec 2021 13:08:20 +0000 (14:08 +0100)]
Bug 29648: Subscription detail - no change

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Item lost report - no change
Jonathan Druart [Thu, 16 Dec 2021 13:07:05 +0000 (14:07 +0100)]
Bug 29648: Item lost report - no change

hum, there is no sort on this table, so it's displayed like it's coming
from the controller, but perl code does not sort either.
This could be improved and we could make it configurable easily

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: patron list table - normal
Jonathan Druart [Thu, 16 Dec 2021 13:02:50 +0000 (14:02 +0100)]
Bug 29648: patron list table - normal

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Checkout history - no sort
Jonathan Druart [Thu, 16 Dec 2021 13:01:48 +0000 (14:01 +0100)]
Bug 29648: Checkout history - no sort

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Payments - normal
Jonathan Druart [Thu, 16 Dec 2021 13:00:59 +0000 (14:00 +0100)]
Bug 29648: Payments - normal

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Patron page (PatronsPerPage) - no change
Jonathan Druart [Thu, 16 Dec 2021 12:59:15 +0000 (13:59 +0100)]
Bug 29648: Patron page (PatronsPerPage) - no change

PatronsPerPage should be done on a separate bug report, not trivial

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Patron accounting page - no sort
Jonathan Druart [Thu, 16 Dec 2021 12:15:09 +0000 (13:15 +0100)]
Bug 29648: Patron accounting page - no sort

because of desc

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: ILL - no change
Jonathan Druart [Thu, 16 Dec 2021 12:13:27 +0000 (13:13 +0100)]
Bug 29648: ILL - no change

No change expected here for ILL

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Course reserve list - normal
Jonathan Druart [Thu, 16 Dec 2021 12:10:26 +0000 (13:10 +0100)]
Bug 29648: Course reserve list - normal

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Course reserve detail - normal
Jonathan Druart [Thu, 16 Dec 2021 12:09:38 +0000 (13:09 +0100)]
Bug 29648: Course reserve detail - normal

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Holds queue - only sort
Jonathan Druart [Thu, 16 Dec 2021 12:05:40 +0000 (13:05 +0100)]
Bug 29648: Holds queue - only sort

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Holds ratios - normal but no sort
Jonathan Druart [Thu, 16 Dec 2021 12:03:01 +0000 (13:03 +0100)]
Bug 29648: Holds ratios - normal but no sort

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Holds to pull - normal
Jonathan Druart [Thu, 16 Dec 2021 12:01:58 +0000 (13:01 +0100)]
Bug 29648: Holds to pull - normal

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Overdue list - normal
Jonathan Druart [Thu, 16 Dec 2021 12:00:30 +0000 (13:00 +0100)]
Bug 29648: Overdue list - normal

'stateSave' so need to test on the first try or delete the relevant local storage
entry

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Cataloguing Z3950 search - no pagination
Jonathan Druart [Thu, 16 Dec 2021 11:56:00 +0000 (12:56 +0100)]
Bug 29648: Cataloguing Z3950 search - no pagination

Pagination is done server-side

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Checkout history - normal no sort
Jonathan Druart [Thu, 16 Dec 2021 11:54:01 +0000 (12:54 +0100)]
Bug 29648: Checkout history - normal no sort

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Catalogue detail - no default_display_length
Jonathan Druart [Thu, 16 Dec 2021 11:48:57 +0000 (12:48 +0100)]
Bug 29648: Catalogue detail - no default_display_length

On the acquisition table the sort option is not available as we don't
offer the ability to selection asc/desc and default to asc.
We cannot offer default_display_length for those tables.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: DBIC Schema changes
Jonathan Druart [Thu, 16 Dec 2021 11:45:24 +0000 (12:45 +0100)]
Bug 29648: DBIC Schema changes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Allow tables_settings.default_display_length to be NULL
Jonathan Druart [Thu, 16 Dec 2021 11:41:06 +0000 (12:41 +0100)]
Bug 29648: Allow tables_settings.default_display_length to be NULL

We actually want this value to be NULL. If set to NULL and
default_display_length is not in the yml, then the option will not be
displayed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Item types administration view
Jonathan Druart [Thu, 16 Dec 2021 11:26:21 +0000 (12:26 +0100)]
Bug 29648: Item types administration view

Set noItemTypeImages and OpacNoItemTypeImages to "No" and confirm
that the first column (the image) is not displayed. Otherwise test as
"normal"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Cities administration view - REST API
Jonathan Druart [Thu, 16 Dec 2021 11:24:20 +0000 (12:24 +0100)]
Bug 29648: Cities administration view - REST API

Here we need to deal with the other DT config (in datatables.js, not
columns_settings.inc).

Test plan:
Same as "normal"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Patron categories administration view - normal
Jonathan Druart [Thu, 16 Dec 2021 11:17:30 +0000 (12:17 +0100)]
Bug 29648: Patron categories administration view - normal

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Libraries administration view - normale
Jonathan Druart [Thu, 16 Dec 2021 11:16:10 +0000 (12:16 +0100)]
Bug 29648: Libraries administration view - normale

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Authorised values view
Jonathan Druart [Thu, 16 Dec 2021 11:15:10 +0000 (12:15 +0100)]
Bug 29648: Authorised values view

No change is expected on this view as the table is not part of the table
settings.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Late orders view - normal
Jonathan Druart [Thu, 16 Dec 2021 11:13:14 +0000 (12:13 +0100)]
Bug 29648: Late orders view - normal

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Order search view - normal
Jonathan Druart [Thu, 16 Dec 2021 11:11:57 +0000 (12:11 +0100)]
Bug 29648: Order search view - normal

"normal" means that we are expecting the table to have the 2 options
implemented and working.
You can select "Default display length" and "Default sort order"
in the "table settings" administration view, then go the the view
and confirm that the table has the configured values pre-selected.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Duplicate orders view - no change
Jonathan Druart [Thu, 16 Dec 2021 11:05:46 +0000 (12:05 +0100)]
Bug 29648: Duplicate orders view - no change

No change expected here, only removing commented-out code.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Add item - broken FIXME
Jonathan Druart [Thu, 16 Dec 2021 10:57:12 +0000 (11:57 +0100)]
Bug 29648: Add item - broken FIXME

Why don't we have the columns visibility button?

It looks like there is something broken here, why don't we have the
show/hide columns buttons? The code expects it to be displayed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Move NumSavedReports to the table settings
Jonathan Druart [Thu, 16 Dec 2021 10:50:58 +0000 (11:50 +0100)]
Bug 29648: Move NumSavedReports to the table settings

The syspref NumSavedReports can be moved to the table settings config
Test plan:
1. Set the syspref to a given value
2. updatedatabase # execute the atomic update
3. Go to the table settings page and confirm that the syspref's value
has been retrieved
4. Select a specific colonne for the default sort
5. Go to the report list view and confirm that the "Show X entries" has
the correct selected value and that the table is sorted as you expect.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29648: Improve existing code
Jonathan Druart [Thu, 16 Dec 2021 10:34:02 +0000 (11:34 +0100)]
Bug 29648: Improve existing code

We already have 2 tables that are configurable, on acqui/basket and
reports/orders_by_budget.
This patch is modifying a bit the existing code to transfer the
responsability/logic to the KohaTable constructor instead of the
template that is creating the object.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: (follow-up) Add BNF z3950 server
Bernardo Gonzalez Kriegel [Mon, 25 Apr 2022 01:55:05 +0000 (22:55 -0300)]
Bug 30373: (follow-up) Add BNF z3950 server

This is not strictly necessary, but is useful to do the testing

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: (follow-up) Enable 'qualif' authorised_value
Bernardo Gonzalez Kriegel [Mon, 25 Apr 2022 01:05:05 +0000 (22:05 -0300)]
Bug 30373: (follow-up) Enable 'qualif' authorised_value

This patch reinstates the authorised value 'qualif'
to it's corresponding place

This authorized value is used in UNIMARC default bibliographic
framework.

To test:
1) Do a clean install or load the YAML file
2) Verify 'qualif' authorised_value is present in subfield $4 of
   fields 700/1/2/3, 710/1/2/3, 720/1/2/3 and 730

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: (follow-up) Optional SUGGEST auth values
Bernardo Gonzalez Kriegel [Sat, 23 Apr 2022 23:47:55 +0000 (20:47 -0300)]
Bug 30373: (follow-up) Optional SUGGEST auth values

This patch adds 3 SUGGEST optional auth_val.yml

This authorized value is used in UNIMARC default bibliographic
framework.

To test:
1) Do a clean install with optional files or load the YAML file
2) Verify new SUGGEST values are in the database
    SELECT * FROM authorised_values WHERE category = 'SUGGEST';

    Check new values Budget, Expensive and Poldoc

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: (follow-up) UNIMARC relator codes auth values
Bernardo Gonzalez Kriegel [Sat, 23 Apr 2022 22:11:40 +0000 (19:11 -0300)]
Bug 30373: (follow-up) UNIMARC relator codes auth values

This patch adds UNIMARC relator codes into
mandatory auth_values.yml

This authorized value is used in UNIMARC default bibliographic
framework.

To test:
1) Do a clean install or load the YAML file
2) Verify new language codes are in the database
    SELECT * FROM authorised_values WHERE category = 'qualif';

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: (follow-up) Language codes auth values
Bernardo Gonzalez Kriegel [Sat, 23 Apr 2022 21:28:53 +0000 (18:28 -0300)]
Bug 30373: (follow-up) Language codes auth values

This patch adds language codes (ISO 639-2) into
mandatory auth_values.yml

This authorized value is used in UNIMARC default bibliographic
framework.

To test:
1) Do a clean install or load the YAML file
2) Verify new language codes are in the database
    SELECT * FROM authorised_values WHERE category = 'LANG';

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30373: (follow-up) Country codes auth values
Bernardo Gonzalez Kriegel [Sat, 23 Apr 2022 21:14:32 +0000 (18:14 -0300)]
Bug 30373: (follow-up) Country codes auth values

This patch adds COUNTRY codes (ISO 3166-1) into
mandatory auth_values.yml

This authorized value is used in UNIMARC default bibliographic
framework.

To test:
1) Do a clean install or load the YAML file
2) Verify new country codes are in the database
    SELECT * FROM authorised_values WHERE category = 'COUNTRY';

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29077: (follow-up) Use another syntax
Fridolin Somers [Wed, 27 Apr 2022 00:59:59 +0000 (14:59 -1000)]
Bug 29077: (follow-up) Use another syntax

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 29077: Remove blank indexes before convert
Nick Clemens [Wed, 22 Sep 2021 12:55:19 +0000 (12:55 +0000)]
Bug 29077: Remove blank indexes before convert

To test:
1 - Be using Elasticsearch
2 - Search on OPAC with dropdown set to 'Library catalog'
3 - Warns in plack-opac-error.log
4 - Apply patch
5 - Repeat
6 - No warns
7 - Search returns correct results

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30224: Show correct important field in cataloguing validation
Adam Styles [Fri, 4 Mar 2022 00:22:38 +0000 (11:22 +1100)]
Bug 30224: Show correct important field in cataloguing validation

This patch fxes the cataloguing validation messages to show the correct tag, when the whole field is important (not just a subfield).

Note: Look at Bug 30159 to fix the formatting of the validation popup.

1. Go to Administration -> MARC bibliographic frameworks
2. Click Actions next to a framework, view MARC structure
3. Edit multiple tags (at least 2) and check the Important checkbox.
4. Go to cataloguing and create a new record using the framework you just edited
5. Don't fill any of the important fields. Click Save to force the validation for the important tags
6. Notice that the error message shows that an important field isn't filled, but the tag number shown is repeated for each message. The 'Go to field' link goes to the right tag, but the tag number shown is incorrect.
7. Apply patch and refresh page
8. Click Save to force validation again.
9. Confirm the correct tag number is now showing for each error message.

Sponsored-by: Education Services Australia SCIS
Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30482: Potential for bad string concatenation in cataloging validation error...
Owen Leonard [Thu, 7 Apr 2022 09:36:00 +0000 (09:36 +0000)]
Bug 30482: Potential for bad string concatenation in cataloging validation error message

In validating the basic MARC editor form before submission, we run
AreFieldsNotOk() twice (once with the parameter "false") and concatenate
the result for output. This creates the potential for the error string
to be appended with "0" if AreFieldsNotOk() returns false.

This patch improves the logic around building the error string.

To test, apply the patch and make sure one of your MARC frameworks
contains at least one mandatory field and at least one important field.

- Edit or create a MARC record in the basic MARC editor.
- Submit the form in various states of completion:
  - If a mandatory and an important field are empty, you should see two
    error messages at the top. "The following mandatory subfields aren't
    filled" and "The following important subfields aren’t filled."
  - If a mandatory OR an important field is empty, you should see a
    single message.
    - If it's the important field which is empty, a confirmation will
      ask if you want to save the record anyway. Test that both answers
      to this confirmation work correctly.
  - If no mandatory or important fields are empty the form should
    submit.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30072: (followup) Fix random failure of Holds_hooks.t
Fridolin Somers [Wed, 27 Apr 2022 00:17:00 +0000 (14:17 -1000)]
Bug 30072: (followup) Fix random failure of Holds_hooks.t

When building Koha::Holds object,
do not let 'found' random otherwise it may take a valid value indicating
hold is found.

See other holds unit tests.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoRevert "Bug 28371: Unit tests"
Fridolin Somers [Tue, 26 Apr 2022 06:52:19 +0000 (20:52 -1000)]
Revert "Bug 28371: Unit tests"

This reverts commit 7e98a8a686ccf112f7aeaa181c4e5e19ec750277.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoRevert "Bug 28371: Passpreviously fetched branches and itemtypes through and fetch...
Fridolin Somers [Tue, 26 Apr 2022 06:52:17 +0000 (20:52 -1000)]
Revert "Bug 28371: Passpreviously fetched branches and itemtypes through and fetch all needed AV at once"

This reverts commit 8e1d5d4b8fa416992abd072a0453d280ea34348e.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2 years agoBug 30587: Fix acqui/supplier.tt translate issues
Tomas Cohen Arazi [Thu, 21 Apr 2022 16:48:47 +0000 (13:48 -0300)]
Bug 30587: Fix acqui/supplier.tt translate issues

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>