koha.git
17 months agoBug 31095: Remove GetDebarments from members/moremember.pl
Martin Renvoize [Wed, 24 Aug 2022 15:13:26 +0000 (16:13 +0100)]
Bug 31095: Remove GetDebarments from members/moremember.pl

This patch removes the use of GetDebarments from members/moremember.pl
and replaces template references with patrons.restrictions and the new
includes introduced in the prior patch

Test plan
1. Confirm that the 'Restrictions (x)' tab still appears on the patron
   details page.
2. Confirm that the 'Restrictions (x)' tab count is correct
3. Confirm that the 'Restrictions (x)' tab table functions
4. Confirm that the 'Restrictions (x)' tab 'Add manual restriction' form
   works as expected

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit efd9ed271c703ef104b9ff8da1a06a98b9f4d0bb)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 31095: Remove GetDebarments from circ/circulation.pl
Martin Renvoize [Wed, 24 Aug 2022 15:11:43 +0000 (16:11 +0100)]
Bug 31095: Remove GetDebarments from circ/circulation.pl

This patch remove the use of GetDebarments from circ/circulation.pl,
replacing it with a reference to patron.restrictions in the template and
includes.

Test plan
1. Confirm that the 'Restrictions (x)' tab still appears on the checkout
   page for a user.
2. Confirm that the 'Restrictions (x)' tab count is correct
3. Confirm that the 'Restrictions (x)' tab table functions
4. Confirm that the 'Restrictions (x)' tab 'Add manual restriction' form
   works as expected

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2a9ad2691295ab1d2b70706f380c93e626c48d88)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 31095: Add type relation accessor to Koha::Patron::Restriction
Martin Renvoize [Wed, 24 Aug 2022 15:01:27 +0000 (16:01 +0100)]
Bug 31095: Add type relation accessor to Koha::Patron::Restriction

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 55d5e0a40d1d688ddaa734db6ff6a68a977d594f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 31095: Add restrictions accessor to Koha::Patron
Martin Renvoize [Wed, 24 Aug 2022 15:00:52 +0000 (16:00 +0100)]
Bug 31095: Add restrictions accessor to Koha::Patron

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 83b3ccc3c805c1810d362811335a3cc28de3a561)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 31095: Add Koha::Patron::Restriction(s)
Tomas Cohen Arazi [Mon, 22 Aug 2022 17:06:31 +0000 (14:06 -0300)]
Bug 31095: Add Koha::Patron::Restriction(s)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 437e752938b7c422676845b8df1619fa2270a887)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32377: Set param skiptotals on call of GetBudgetHierarchy in acqui/histsearch.pl
Emmi Takkinen [Wed, 30 Nov 2022 10:33:19 +0000 (12:33 +0200)]
Bug 32377: Set param skiptotals on call of GetBudgetHierarchy in acqui/histsearch.pl

Calling GetBudgetHierarchy from acqui/histsearch.pl
is slow if param skiptotals is not used.

To test:
1. Open browsers Console -> Network (F12).
2. Navigate to Order search page and perform search.
=> Take a note how long it takes to load the Search results page.
3. Apply this patch.
4. Repeat step 2.
=> Page should now load faster.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0f5daaa553bc63bd2c08212ee8db3d56c52781e9)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32688: Convert recalls awaiting pickup tabs to Bootstrap
Owen Leonard [Fri, 20 Jan 2023 11:56:55 +0000 (11:56 +0000)]
Bug 32688: Convert recalls awaiting pickup tabs to Bootstrap

This patch updates the recalls awaiting pickup template
(recalls_waiting.tt) to replace a set of jQueryUI tabs. They are
converted to Bootstrap in order to complete Bug 29226.

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

- Go to Circulation -> Recalls awaiting pickup.
- You should see two tabs, "Recalls waiting" and "Recalls waiting over X
  days."
- The tabs should look correct and work correctly.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4877666fb5fed6fcab03063603a4d00cdbb7d1e0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32239: Remove uneeded CSS from reports.css
Lucas Gass [Mon, 9 Jan 2023 18:32:39 +0000 (18:32 +0000)]
Bug 32239: Remove uneeded CSS from reports.css

To test:
1. Apply patch.
2. When adding a new SQL report, the options for adding/creating groups and sub groups should be aligned properly.
3. Turn on Mana and look at Mana Knowledge Base report search results to make sure everything is still properly aligned there.

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>
(cherry picked from commit 0c1fbffbe4f9af3e023e4a2fb9f26ec9f38507eb)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 31326: Koha::Biblio->get_components_query fetches too many component parts
Johanna Raisa [Tue, 9 Aug 2022 08:58:59 +0000 (11:58 +0300)]
Bug 31326: Koha::Biblio->get_components_query fetches too many component parts

This patch adds double quotes to rcn and cni when searching component parts
with get_components_query.

Test plan:
1) Apply the patch
2) prove Koha/t/db_dependent/Koha/Biblio.t

Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a813de5f85c221974b2187259e25150ca7f44534)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 20473: Whitespace
Nick Clemens [Fri, 16 Dec 2022 13:14:51 +0000 (13:14 +0000)]
Bug 20473: Whitespace

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>
(cherry picked from commit 5249a0c1f0b9d498b3a2b6fcc55c6ef310b6e156)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 20473: Don't display 'Item information' tab when adding to basket from a file...
Nick Clemens [Fri, 16 Dec 2022 13:12:19 +0000 (13:12 +0000)]
Bug 20473: Don't display 'Item information' tab when adding to basket from a file and not creating items

This patch adds a conditional, and moves another up one level to remove the tab
when it will have no content/effect

To test:
1. Stage a MARC file from Tools > Stage MARC records for import
2. Go to Acquisitions and create a basket for a vendor
3. Add to basket from staged file
4. Note that the "item information" tab is present, if you click on it, not that it is not useful
5. Cancel adding to basket
6. Apply patch
7. Add to basket from the staged file again
8. Confirm there is no item information tab
9. Confirm orders are added on 'Save'

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>
(cherry picked from commit dcd6f549d94717367ff9b2bae22f078810f35785)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32588: (QA follow-up) Add missing filter
Tomas Cohen Arazi [Tue, 31 Jan 2023 14:06:03 +0000 (11:06 -0300)]
Bug 32588: (QA follow-up) Add missing filter

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 353edc0bba92a53b027389a20765d6b58a0e3a7c)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32588: Make filters on 'items with no checkouts' report translatable
Katrin Fischer [Sat, 7 Jan 2023 02:11:48 +0000 (02:11 +0000)]
Bug 32588: Make filters on 'items with no checkouts' report translatable

This makes the filters on top of the 'items with no checkouts' report
translatable. The descriptions of the filters used the wrong terms and
were also pulled from the .pl file, making them untranslatable.

To test:
* Without patch: Run the 'items with no checkouts' report with various
  settigs.
* Verify, that the display on top doesn't use standard terminology
  Doc type = item type, Branch = library
* Apply patch
* Verify display is improved and standard terminology is used

If you know how to, you can also confirm strings show up nicely in
translations:
https://wiki.koha-community.org/wiki/Translating_Koha#Updating_the_po_files_in_your_installation

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 74f2b832558d575b4d4825518a848fe2ef92f278)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 26628: Fix access to clubs when user only has clubs permission
Katrin Fischer [Thu, 26 Jan 2023 21:46:51 +0000 (21:46 +0000)]
Bug 26628: Fix access to clubs when user only has clubs permission

If a user only has the clubs and no permission from the tools section,
they can't access the patron clubs page by navigation. This patch
extends the permission checks for tools to include the clubs, that
live on the tools page, but have a top level permission.

To test:
- create a patron with only the catalogue and clubs permissions
- log in to the staff client as that patron
- navigate to a patron record, confirm you can see the Clubs tab in the patron account, can add patrons to and remove patrons from clubs
- confirm you don't have a link to the Tools module either on the Koha homepage or in the More menu
- enter the clubs URL manually (/cgi-bin/koha/clubs/clubs.pl), confirm you are allowed to open the page
- Apply patch
- The only changes should be:
  - You can now see the Tools entry in the More navigation menu
  - You can now see the Tools module link on the start page
  - Both take you to the tools page, only visible tools is 'Patron clubs'

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 50927bb9b530f7a9c092dfe99bd2dddc69202432)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32589: Improve headings on result tables for 'Items with no checkouts'
Katrin Fischer [Sat, 7 Jan 2023 01:34:24 +0000 (01:34 +0000)]
Bug 32589: Improve headings on result tables for 'Items with no checkouts'

When no filter was selected on the search form, the heading on
the results table showed as NULL. When library or item type were
selected the codes instead of the descriptions showed.

To test:
* Without patch:
* Run the 'items with no checkouts' report with different settings
  for 'By:'. Verify the headings on the tables are not nice.
* Apply patch
* Rerun reports
  * Headings should be "Ungrouped, item type or library descriptions
  * Summary table also shows item type and library descriptions

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  → OK. Would be nice to have decoding also in 'Filtered on' top section
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 37302e71fc7fab6dece6914a5438044bd1e8a14c)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32587: Add page-section to 'items with no checkouts' report
Katrin Fischer [Sat, 7 Jan 2023 01:31:34 +0000 (01:31 +0000)]
Bug 32587: Add page-section to 'items with no checkouts' report

This adds page sections to the summary and result tables
for the 'items with no checkouts' report.

To test:
* Run the 'item with no checkouts' report with different settings
* Confirm result tables are missing the white brackground from
  page-section
* Apply patch
* Confirm the result tables now do have the white background

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  → Confirm both problem and solution
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bb9db8fcfa7fb587d16fc0e553f94087c1b2962e)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32586: Reindent items with no checkouts report template
Katrin Fischer [Sat, 7 Jan 2023 00:25:40 +0000 (00:25 +0000)]
Bug 32586: Reindent items with no checkouts report template

The indentation in the template was off and also full of tab
characters, so this does some clean-up prior to doing some
other small changes on separate bugs.

To test:
* Run the 'Items with no checkouts' report in the report module
* Note: If you get an error in this step, you need to turn of
  sql_strict_mode in your koha-conf.xml, but this bug is out
  of scope here.
* Apply patch
* Rerun the report, it should appear unchanged

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
  → Nice to the eyes, and no regression
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a2444c546ea09199b86ad122c4787f1d45b9bf78)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32292: Tidy and sort keys
Tomas Cohen Arazi [Tue, 31 Jan 2023 13:28:20 +0000 (10:28 -0300)]
Bug 32292: Tidy and sort keys

This patch does a perltidy on the data structure, but also organizes
keys alphabetically to ease maintenance.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3a3afb84abfe715c198fb6e0ad20e8e0ad847626)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32292: Fix POD
Katrin Fischer [Mon, 21 Nov 2022 22:31:24 +0000 (22:31 +0000)]
Bug 32292: Fix POD

POD had a typo in suggestions and was missing the new aqorders.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a638f16d06ceb0e2bf924aa4ea8f16cffa867b70)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32292: Add missing column descriptions to borrowers table
Katrin Fischer [Mon, 21 Nov 2022 22:15:15 +0000 (22:15 +0000)]
Bug 32292: Add missing column descriptions to borrowers table

Adds missing column descriptions for new features etc. to the
existing entry for borrowres columns descriptions.

To test:
* Go to reports > Guided reports
* Select patrons module
* Make sure all entries for the tables items and suggestions show
  up with nice descriptions

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ea660f0c4b17a6ccce0d4a5b33b43f033ddd8ca9)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32292: Add column descriptions to biblio table
Katrin Fischer [Mon, 21 Nov 2022 21:49:43 +0000 (21:49 +0000)]
Bug 32292: Add column descriptions to biblio table

This adds nice descriptions to the aqorders database columns.

To test:
* Go to Guided reports
* Start a new report for acquisitions module
* Verify that all aqorders columns show with nice descriptions
      None should be missing.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ef7634ba9217707acf1584e6896bf8ed5daa3317)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32292: Add column descriptions to aqorders table
Katrin Fischer [Mon, 21 Nov 2022 21:40:54 +0000 (21:40 +0000)]
Bug 32292: Add column descriptions to aqorders table

This adds nice descriptions to the aqorders database columns.

To test:
* Go to Guided reports
* Start a new report for acquisitions module
* Verify that all aqorders columns show with nice descriptions
  None should be missing.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a07ee68f4318a1ebda6df69e002f22fa378185a2)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32292: Add column descriptions to subscriptions table / complete items table
Katrin Fischer [Mon, 21 Nov 2022 21:36:31 +0000 (21:36 +0000)]
Bug 32292: Add column descriptions to subscriptions table / complete items table

* Adds proper labels to the database columns for suggestions
* Adds missing item columns:
  * coded_location_qualifier
  * deleted_on
  * exclude_form_local_holds_priority
* Fixes spelling of item type, Uniform resource identifier

To test:
* Go to reports > Guided reports
* Select acquisition or another module using the items
* Make sure all entries for the tables items up with nice descriptions
* Changes to subscriptions: verify reading the patch, these don't seem to show
  up yet in guided reports.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c742247e68817d6cff62e348d291f9c40e5a341a)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 31962: Add tooltip to 'configure' on datatable controls
Katrin Fischer [Fri, 6 Jan 2023 21:04:54 +0000 (21:04 +0000)]
Bug 31962: Add tooltip to 'configure' on datatable controls

This makes sure that the last button on the datatable controls
also has a tooltip, like the other buttons.

To test:
* Without the patch:
* Check out an item and look at the table of checkouts
* Look at the detail page of a record with at least one item
* Confirm that the 'configure' button doesn't have a tooltip appear
  as a bubble like the other buttons
* Apply patch
* Restart_all and reload pages
* Make sure the styling of the 'configure' tooltip now matches that
  of the other buttons

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 12ae2c59e7ba322ad2cce47c37138f374507b628)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32689: Add missing space between 773$i label text and content
Katrin Fischer [Fri, 20 Jan 2023 15:49:09 +0000 (15:49 +0000)]
Bug 32689: Add missing space between 773$i label text and content

When 777 Ind. 2 = 8, $i will be used as the label. In this case,
we were missing a space between the $i and the other subfields.
This patch makes sure there is a space.

Note: the colon is expected to be part of the data here.

To test:
* Update default framework to display 773 a t w i by default in the editor,
  OPAC and staff interface.
* Search for a record in the staff interface
* Click New > Add child record from the detail page
* Enter 245 and any mandatory fields
* Add $i to 773 entry and make the indicators: 0 8
* On the detail page and the result lists,
  $i will be used a label, but there'll be no space between
  label and content.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d29057b38262e093d22b47faafeff71da858d408)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 19188: Use the Price template plugin with_symbol => 1
Jonathan Druart [Thu, 1 Feb 2018 17:32:54 +0000 (14:32 -0300)]
Bug 19188: Use the Price template plugin with_symbol => 1

To make it displayed correctly depending on the configuration of the
currency

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c6366c6d6869be719e48e73b40827efd574a13c6)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 19188: Self checkout missing currency symbol
Jenny Way [Tue, 16 Jan 2018 22:05:39 +0000 (22:05 +0000)]
Bug 19188: Self checkout missing currency symbol

Test plan:
1. Under administration and system preferences, enable WebBasedSelfCheck
2. In OPAC give user fine by going to 'my account' at top right
3. Then under fines tab 'create manual invoice'
4. Make sure this amount is more than noissuescharge which can be
   changed under system preferences
5. Go to the web based self check from the OPAC URL
6. Log in as your user
7. Try to check out an item
7. Error 'Item cannot be checked out' should occur
8. With the patch, the currency symbol should show for the amount.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5eab08cc2edd897f9afdfeb46caf5e409476946f)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32570: Display patron.state correctly
Lucas Gass [Wed, 4 Jan 2023 23:03:42 +0000 (23:03 +0000)]
Bug 32570: Display patron.state correctly

To test:
1. Have a patron with both a city and state in their Main address.
2. Do a patron search that will return that patron among others.
3. Notice the patroncity will say something like Centerville, Centerville: repeating the city but no state.
4. Apply patch
5. Try step 2 again, this time the city, state should display correctly.

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>
(cherry picked from commit 5acc976dec573ddd679219a0e920871a10622ac3)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32482: (follow-up) Add markup comments
Owen Leonard [Fri, 16 Dec 2022 12:23:10 +0000 (12:23 +0000)]
Bug 32482: (follow-up) Add markup comments

This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the page's appearance or
functionality.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 06960c91e4f3359c349d0c694d173d4362956e97)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32482: Reindent holds awaiting pickup template
Owen Leonard [Fri, 16 Dec 2022 11:48:54 +0000 (11:48 +0000)]
Bug 32482: Reindent holds awaiting pickup template

This patch reindents the holds awaiting pickup template so that it has
consistent indentation.

This patch also corrects a markup error that was causing a layout issue.
Incorrectly closed <div>s caused the circulation sidebar menu to
disappear.

To test, apply the patch and test all aspects of the page, including:

- Correctly functioning tabs and DataTables
- Cancel selected holds waiting
- Cancel selected holds waiting past ReservesMaxPickUpDelay
- Cancel all holds waiting past ReservesMaxPickUpDelay
- Cancel individual holds with cancellation requests (Cancellations
  of waiting holds via the OPAC. See "Default waiting hold cancellation
  policy" in Circulation and Fine rules).

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>
(cherry picked from commit 1e49a9fa855503d519c4c9eaa725e9933358b5d4)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32442: (bug 28739 follow-up) Ensure txn is rollbacked
Jonathan Druart [Wed, 14 Dec 2022 07:42:03 +0000 (08:42 +0100)]
Bug 32442: (bug 28739 follow-up) Ensure txn is rollbacked

If the TT process call is returning false and so the croak is raised,
then the txn is not rollbacked and the txn is not commited either.

We need to ensure the txn will be correctly rollbacked.

Test plan:
1. Go to any notice and create some invalid Template Toolkit:

[% IF ( 1 == 1 %]
test
[% END %]

2. Save and continue

3. Logout of Koha and attempt to log back in
=> Without this patch you got
Transaction aborted: DBIx::Class::Storage::DBI::mysql::_exec_svp_release(): DBI Exception: DBD::mysql::db do failed: SAVEPOINT savepoint_4 does not exist at /kohadevbox/koha/Koha/Object.pm line 170
. Rollback failed: DBIx::Class::Storage::DBI::mysql::_exec_svp_rollback(): DBI Exception: DBD::mysql::db do failed: SAVEPOINT savepoint_3 does not exist at /kohadevbox/koha/Koha/Patron.pm line 363 at /kohadevbox/koha/Koha/Patron.pm line 363
 at /usr/share/perl5/DBIx/Class/Exception.pm line 77
=> With this patch applied the login works successfully

QA Note: The test is not testing that the txn is rolledback, I didn't
manage to test that.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 494a63f9e81c2255de162ec5daad1fb2f28dc67b)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32442: Add tests
Jonathan Druart [Wed, 14 Dec 2022 07:31:01 +0000 (08:31 +0100)]
Bug 32442: Add tests

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6d07a1cd8cc3137a4854ac1c2d3524258287f058)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32690: (follow-up) Add markup comments
Owen Leonard [Fri, 20 Jan 2023 17:08:19 +0000 (17:08 +0000)]
Bug 32690: (follow-up) Add markup comments

This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the page's appearance or
functionality.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 06ff7cfc206dfc46021149f508e6e69ded417459)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32690: Reindent the serial collection template
Owen Leonard [Fri, 20 Jan 2023 16:59:42 +0000 (16:59 +0000)]
Bug 32690: Reindent the serial collection template

This patch reindents the serial collection template so that it has
consistent indentation. These changes should have no visible effect on
the page.

To test, apply the patch and go to Serials -> Subscription detail ->
Serial collection. Everything should look normal. All tabs should work
correctly.

Viewing the diff while ignoring whitespace changes should show only
places where a line break was added.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bcf4ff277e892595ca96a85c699e51ac08dbab6b)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32504: Fix misalignment of visibility of basket orders table columns and missing...
Slava Shishkin [Wed, 21 Dec 2022 12:46:45 +0000 (14:46 +0200)]
Bug 32504: Fix misalignment of visibility of basket orders table columns and missing export columns

To reproduce:
1. Go to /cgi-bin/koha/admin/columns_settings.pl
2. In the section Acquisition > Basket > Orders uncheck all checkboxes in the table settings
3. Go to a separate browser window to /cgi-bin/koha/acqui/booksellers.pl and open/create a new basket and add one book to it so the basket table will have rows in the "Order" table which we will configure below:
4. Click on the ["Columns" settings] for the table.
5. In the dropdown menu, observe that all Columns are marked as visible and correspond to the current table display.
6. Also check the export table feature: Click on "Export" and choose print, you will see that Columns up to GST (goods_and_services_tax) are displayed, and Fund and Estimated delivery date are missing.
7. Go back to table settings (like it was in steps.1-2)
8. Make the estimated_delivery_date column 'invisible by default' by checking out the appropriate checkbox and saving the changes.
9. Refresh the basket window/page (like in step 3).
10. Observe that in the table the whole columns "Estimated delivery date" is visible but "Fund" is gone.
11. Click on the ["Columns" settings] for the table.
12. In the dropdown menu observe that the wrong column is disabled ("Fund" instead of "Estimated delivery date").
13. Apply the patch.
14. Go through steps 3-12 and make sure that everything mentioned in those steps now works correctly: when you hide any columns in columns_settings.pl they are correctly hidden for the "Order" table, as well when exporting the table, the Fund, and Estimated delivery date columns are now exported.

Note: this patch also respects Koha.Preference('EDIFACT') setting and when it's enabled it also correctly hides/shows and exports the 'supplier_report' column.

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 024cdf269ae8527d02c15e442af69a3ccda6e551)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32504: Fix typo columnname in columns_settings.yml
Slava Shishkin [Tue, 20 Dec 2022 14:49:57 +0000 (16:49 +0200)]
Bug 32504: Fix typo columnname in columns_settings.yml

Trivial fix.

To reproduce:
1. Go to /cgi-bin/koha/admin/columns_settings.pl
2. Observe in the section Acquisition > Basket > Orders an empty field in the Column name, the row between fund and supplier_report rows: it was expected estimated_delivery_date value.
3. Apply the patch.
4. Restart Memcached (console: service memcached restart)
5. Reload cgi-bin/koha/admin/columns_settings.pl: that empty row now will have estimated_delivery_date value.

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9157a7e6db77ba20f7d686a67c4de6e9e27b1567)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32644: Terminology: staff/intranet and biblio in plugins-home page
Caroline Cyr La Rose [Mon, 16 Jan 2023 20:06:19 +0000 (15:06 -0500)]
Bug 32644: Terminology: staff/intranet and biblio in plugins-home page

This patch replaces some incorrect terminology in the plugins-home page.
The current terminology is available at https://wiki.koha-community.org/wiki/Terminology

To test:
0. Make sure you have no enhanced content plugins installed
1. Apply patch
2. Go to Administration > Manage plugins
3. Click 'View plugins by class'
   --> Notice that one of the options is 'View bibliographic record enhancement
   plugins for the staff interface'
4. Make sure this phrase is gramatically correct, makes sense and has no
   typos
5. Click on that option
   --> Notice that the message says 'No plugins that can enhance the bibliographic
   records in the staff interface are installed'
6. Make sure this phrase is gramatically correct, makes sense and has no
   typos

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0fe829e5b2a67a8af2b026af02dcb23ec55af195)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32600: Housebound module needs page-section treatment
Owen Leonard [Tue, 17 Jan 2023 12:45:35 +0000 (12:45 +0000)]
Bug 32600: Housebound module needs page-section treatment

This patch adds a .page-section container to two areas in the patron
homebound template.

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

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

- Locate a patron and edit their record.
- In the "Housebound roles" section, check both "Chooser" and
  "Deliverer."
- Locate another patron and click on the "Housebound" menu item in the
  left-hand sidebar.
- On the "Manage housebound profile" page, set a delivery day and
  frequency and save changes.
- On the "Housebound details for..." page the details section at the top
  should be correctly styled.
- Click "Add a new delivery."
- Fill out some delivery details and click "Save."
- Now the "Housebound details for..." page should show a "Deliveries"
  section which is correctly styled.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5a0dbb3cd70660e1d66ab60ac732223e3d6c6cdb)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32738: Correct upload local cover image title tag
Owen Leonard [Fri, 27 Jan 2023 15:05:30 +0000 (15:05 +0000)]
Bug 32738: Correct upload local cover image title tag

This patch corrects the local cover image template's title tag so that
it conforms to the changes made in Bug 26703, 'Modify the "title"
elements to contain unique information first.'

The patch also makes minor corrections to the page's breadcrumbs.

To test you must have the LocalCoverImages system preference enabled.

- Apply the patch and go to Cataloging -> Upload local cover image.
- The page title should be correct:
  Upload local cover image › Cataloging › Koha
- The breadcrumbs should be:
  Home -> Cataloging -> Upload cover image
- Locate a bibliographic record and view its details.
- Click the "Images" tab, then the "Upload" button.
- The page title should now be
  Upload local cover image for [title] › Cataloging › Koha
- The breadcrumbs should now be:
  Home -> Cataloging -> Upload local cover image -> Upload cover for
  [title]

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>
(cherry picked from commit 890231e7e65f0be00e153111b92ac77dbf0f6d16)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32618: Add 'page-section' to various administration pages
Owen Leonard [Thu, 12 Jan 2023 18:00:56 +0000 (18:00 +0000)]
Bug 32618: Add 'page-section' to various administration pages

This patch adds a "page-section" container div around the main section
of administration pages which lack it.

The SMS providers page required a small change to the associated
JavaScript in order to target the right container, so you may need to
clear your browser cache to get the correct behavior.

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

To test, apply the patch and view the following pages to confirm that
the main content is contained in a white box:

 - Acquisitions -> Vendor -> Contracts
 - Administration -> Budgets -> Budget details -> Planning
 - Administration -> Circulation desks
 - Administration -> OAI sets configuration -> Define mappings
 - Administration -> System preferences -> Search for
   'OverDriveAuthName' -> OverDrive library authnames table
 - Administration -> SMS cellular providers
   - Confirm that the "Edit" buttons work correctly to show and hide the
     right content.

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>
(cherry picked from commit 2addd2879a0dc84775e594c354e2d7d4897b7df1)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32382: (follow-up) Fix selector
Lucas Gass [Mon, 19 Dec 2022 23:50:17 +0000 (23:50 +0000)]
Bug 32382: (follow-up) Fix selector

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ac1ab8ab451c3dfb76462e7a72273e009aef8be3)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32382: Fix alignment on invoice summary page
Lucas Gass [Fri, 2 Dec 2022 00:18:59 +0000 (00:18 +0000)]
Bug 32382: Fix alignment on invoice summary page

To test:

1. Apply patch
2. Have some funds from budgets that are both active and inactive
3. Receive a basket and click 'Finish receiving' to get to the invoice page
4. Look at the Fund/Show inactive line and make sure it is aligned right
5. With some inactive funds click 'Show inactive' and make sure they appear in this dropdown
6. Click 'Add an adjustment'. Make sure the Fund/Show inactive line looks correct there as well/
7. Make an adjustment and click 'Update adjustments' make sure the line also looks right in the table that appears.
8. Inside that table make sure you can click the 'Show inactive' checkbox and the inactive budgets appears.

Note: Some of the HTML was ouside of the HTML body, so I moved it into the HTML body so it will be valid.

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d66d118b4305f25dea432db490234763330aafc2)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32712: (QA follow-up) Use Koha.Preference
Tomas Cohen Arazi [Tue, 31 Jan 2023 12:34:13 +0000 (09:34 -0300)]
Bug 32712: (QA follow-up) Use Koha.Preference

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 320d184bb1e1f0fb66fec45fb035d7049fd6e808)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32712: Fix OPAC breakage when OPACShowCheckoutName enabled
Tomas Cohen Arazi [Mon, 30 Jan 2023 20:08:36 +0000 (17:08 -0300)]
Bug 32712: Fix OPAC breakage when OPACShowCheckoutName enabled

Bug 31313 removed GetItemsInfo and proper Koha::Object-based objects are
passed now. But some automatic search & replace kept patron-related
attributes incorrectly linked to Koha::Item.

This patch makes the item-status.inc file reuse the checkout object and
get the linked patron to gather the required information. Some
simplification is done on hte same patch... should be trivial.

To test:
1. Have OpacShowCheckoutName enabled
2. Pick a biblio with items (all of them not checkecd-out)
3. Open the OPAC detail view for the biblio
=> SUCCESS: You see the biblio and the items
4. Check one of the items out
5. Refresh the OPAC page
=> FAIL: The page explodes!
6. Apply this patch
7. Refresh the OPAC page
=> SUCCESS: You see the biblio and the items, the patron info is
correctly displayed.
8. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d74fe69d2c463078ba4c0797cdc3d01fab82bccb)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32555: Fix serial vs. serialitem typo
Tomas Cohen Arazi [Mon, 30 Jan 2023 18:38:59 +0000 (15:38 -0300)]
Bug 32555: Fix serial vs. serialitem typo

To test:
1. Create a serial subscription
   1.1. Go to Serials
   1.2. Click on New subscription
   1.3. Fill out the first form
        - Vendor: leave empty
        - Record: enter a record number (I used 108)
        - Create an item record when receiving this serial
        - When there is an irregular issue: Keep issue number
        - Manual history: leave unchecked
        - Call number: leave empty
        - Library: Centerville
        - Public/nonpublic note: leave empty
        - Patron notification: None
        - Location: None
        - Collection: None
        - Item type: Continuing resources
        - Grace period: leave empty
        - Number of issues to display: leave both empty
   1.4. Click Next (and confirm you are not using a vendor)
   1.5. Fill out the second form
        - First issue publication date: 2023-01-01
        - Frequency: 1/month
        - Subscription length: issues 12
        - Subscription start date: 2023-01-01
        - Subscription end date: 2024-01-01
        - Numbering pattern: Number
        - Locale: leave empty
        - Begins with: 42
        - Inner counter: leave empty
   1.6. Click Test prediction pattern
   1.7. Click Save subscription
2. Click OPAC view: Open in new window.
=> SUCCESS: It should open normally in another tab/window and the record displays without problem
3. Back in the staff interface tab, receive an issue
   3.1. Click Receive
   3.2. In Status, choose Arrived for No. 42
   3.3. Click Save
4. Go back to the OPAC tab and refresh
=> FAIL: Page explodes
5. Apply this patch
6. Repeat 4
=> SUCCESS: Information shows correctly no explosions.
7. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8f38f3b74ba8c16d1b6da76714371312f6a8037e)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 16522: Move 773 entries in result lists before 856 entries
Katrin Fischer [Fri, 20 Jan 2023 15:29:49 +0000 (16:29 +0100)]
Bug 16522: Move 773 entries in result lists before 856 entries

This moves the display of 773 In: displays to right before the
856 Online resource: as suggested by Heather in order to make it
more consistent with the display in the detail pages.

Everything should be unchanged, but the position of the
In: line :)

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 64d3612dd9c374a18b6aadbd26dc6e7d4be0309a)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 16522: (follow-up) If no 773$w, try to return host record
Aleisha Amohia [Mon, 17 Oct 2022 22:38:44 +0000 (22:38 +0000)]
Bug 16522: (follow-up) If no 773$w, try to return host record

Use host biblionumber or host itemnumber to return a host record if
EasyAnalyticalRecords is enabled, or return an undef record and a string
of host information when get_marc_host is called in list context.

Confirm tests pass:
- t/db_dependent/Koha/Biblio/host_record.t

Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5e226c1a63f916e0224d9fcbaa6e5beaf8f5b44c)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 16522: (follow-up) Remove HTML links from email
Katrin Fischer [Wed, 28 Sep 2022 14:11:45 +0000 (14:11 +0000)]
Bug 16522: (follow-up) Remove HTML links from email

The emails sent for cart and list are plain text and any
<a> tag will be scrubbed by HtmlToText. So we can remove
those links.

This also solves an issue with the original patch set,
where the error below would appear on sending a cart or
list email from the staff interface:

Template process failed: file error - biblio_a_href: not found at /kohadevbox/koha/C4/Templates.pm line 127

Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 48aa83a3cabc52804089199d24ea158e2586b129)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 16522: (follow-up) Fix variable in OPAC cart brief display
Katrin Fischer [Wed, 28 Sep 2022 13:00:25 +0000 (13:00 +0000)]
Bug 16522: (follow-up) Fix variable in OPAC cart brief display

Without this change records 773 entries with links in $w would
not display the title information, but just "No title".
With the variable fixed, now the host's title displays.

Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 980682bb9673b4dd2afd50b678c267d9e38774e1)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 16522: (follow-up) Rename "Host item entry" to "In"
Katrin Fischer [Wed, 28 Sep 2022 12:50:45 +0000 (12:50 +0000)]
Bug 16522: (follow-up) Rename "Host item entry" to "In"

We already use In: as label for 773 on the result lists and
detail pages and it's also recommended in the MARC documentation.
With this patch the label is the same everywhere.

Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ec48907e23441648233eac2167ad4a1759b4c765)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 16522: (follow-up) Add missing TT filters
Katrin Fischer [Fri, 26 Aug 2022 16:57:19 +0000 (16:57 +0000)]
Bug 16522: (follow-up) Add missing TT filters

Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2eeeeeb06a2f457527a9022e2a688e8b08d645c6)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 16522: (follow-up) MARC display templates and get_marc_host fixes
Aleisha Amohia [Thu, 30 Jun 2022 22:28:31 +0000 (10:28 +1200)]
Bug 16522: (follow-up) MARC display templates and get_marc_host fixes

Also:
- Show related parts 773$g
- Normalise using 'Host item entry' as title
- Remove 'foreach' because non-xslt views only return first
- If no $w, use $atg, and related tests in
t/db_dependent/Koha/Biblio/host_record.t

Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit adad3a9e2244623b40bf07aeb5e95a0cc9b0d58c)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 16522: Adding 773 to cart and list displays and emails
Aleisha Amohia [Fri, 4 Dec 2020 03:00:31 +0000 (16:00 +1300)]
Bug 16522: Adding 773 to cart and list displays and emails

This enhancement adds information from a host item entry and a link if
applicable to the host record in the following places:
- staff client list
- staff client cart
- staff client send list email
- staff client send cart email
- staff client search results
- staff client detail page
- opac list
- opac cart
- opac send list email email
- opac send cart email
- opac search results
- opac detail page

To test:

1. apply patch, restart services
2. log into the staff client and enable the syspref EasyAnalyticalRecords
3. find a record with an item. take note of the barcode.
4. go to another record (biblio 2). click Edit -> Link to host record
5. enter the barcode in the input and submit.
6. click the MARC tab and confirm the host record has been linked under
MARC field 773.
7. add biblio 2 to your cart, and to a list.
8. go to your cart. confirm you see the 'host item entry' link.
9. click on 'more details' and confirm you see the 'host item entries'
link.
10. click 'send' to email the cart. confirm the email contains the host
item entry and the link sends you to the catalogue page for the record
in the OPAC.
11. go to the list you added the record to. confirm you see the 'source'
link for the host item entry.
12. click 'send list' to email the list. confirm the email contains the
host item entry and the link sends you to the catalogue page for the
record in the OPAC.
13. log into the OPAC. repeat steps 7 to 12 on the OPAC and confirm they
all pass as expected.
14. Confirm host item info also shows correctly on the
OPAC and staff client search results, and the OPAC and staff client
detail pages (where XSLT is used)
15. Delete the 773$w and confirm host item info still shows correctly
but no longer links to biblio
16. confirm tests pass t/db_dependent/Koha/Biblio/host_record.t

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Signed-off-by: Heather Hernandez <heather_hernandez@nps.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 62eba64cfee763945d3f44228adbe2194395cebb)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32694: (QA follow-up) Fix missing TT filters
Katrin Fischer [Fri, 27 Jan 2023 13:17:42 +0000 (13:17 +0000)]
Bug 32694: (QA follow-up) Fix missing TT filters

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b2c1c0efe12856b99a2ab76bc84468f409235cf8)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32694: Fix value of 'Keep current' option in receiving
Nick Clemens [Fri, 20 Jan 2023 20:18:27 +0000 (20:18 +0000)]
Bug 32694: Fix value of 'Keep current' option in receiving

This patch restores missing template toolkit markers around the variable

To test:
1 - Order an item in a basket
2 - Close the basket
3 - Attempt to receive the item, leaving budget as 'Keep current'
4 - 500 Error:
C4::Acquisition::ModReceiveOrder(): DBI Exception: DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (koha_cclsny.aqorders, CONSTRAINT aqorders_budget_id_fk FOREIGN KEY (budget_id) REFERENCES aqbudgets (budget_id) ON DELETE CASCADE ON UPDATE CASCADE) at /usr/share/koha/intranet/cgi-bin/acqui/finishreceive.pl line 120
5 - Apply patch
6 - Receive order successfully!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9531a82e97661ce7013a8e9a64b8d5c4d2fa3635)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 29021: (QA follow-up) Remove useless warnings
Tomas Cohen Arazi [Mon, 30 Jan 2023 15:01:41 +0000 (12:01 -0300)]
Bug 29021: (QA follow-up) Remove useless warnings

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bcaf68b51fe73dfe0b38896c0f241725edbcb01b)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 29021: (QA follow-up) Fix for new parameter, add unit test
Kyle Hall [Fri, 27 Jan 2023 16:58:45 +0000 (11:58 -0500)]
Bug 29021: (QA follow-up) Fix for new parameter, add unit test

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d1bd38d85319ee4240df24c1e000e2b6362ad924)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 29021: RenewAccruingItemWhenPaid renewals are not seen
Martin Renvoize [Wed, 11 May 2022 14:47:58 +0000 (15:47 +0100)]
Bug 29021: RenewAccruingItemWhenPaid renewals are not seen

This patch updates the call to AddRewewal from Koha::Accounts to makr
the renewal as unseen.

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5b87d7a473328cfcf772b7faa31871be068d2a05)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 30254: (QA follow-up) Remove warn from tests
Martin Renvoize [Tue, 1 Nov 2022 10:19:45 +0000 (10:19 +0000)]
Bug 30254: (QA follow-up) Remove warn from tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 40d6a08031a2d9dd3f5c2f06c0d54043e087d742)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 30254: Don't charge overdue fines unless some fine exists
Nick Clemens [Mon, 31 Oct 2022 18:38:04 +0000 (18:38 +0000)]
Bug 30254: Don't charge overdue fines unless some fine exists

We need to determine if a book was lost by a patron, the clues we have
are previous charges. If we don't find any, we shouldn't charge a new fine

To test:
 1 - set Lost item fee refund on return policy to "Refund lost item charge and charge new overdue fine", turn on FinesMode, make sure your circ rules charge fines
 2 - have an itemtype / patron combo that charges an overdue fine
 3 - check item out (with a due date in the future) and then right back in again
 4 - confirm patron doesn't have a fine because the item was not late
 5 - set the item to Lost
 6 - in the database, edit the date_due of your checkout to a date in the past
 7 - check the item in, it is marked found
 8 - confirm your patron now has a fine
 9 - Apply patch
10 - Repeat with a new item and patron
11 - Confirm no charges

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9f569f97d27481d78f3703251cc0583a07bb49f1)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 30254: Unit tests
Nick Clemens [Mon, 31 Oct 2022 18:37:18 +0000 (18:37 +0000)]
Bug 30254: Unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ba6b380d9180f9a2cfc622bc644b069018196c2b)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 32733: (follow-up) Reorganize classification of information
Owen Leonard [Thu, 26 Jan 2023 12:12:34 +0000 (12:12 +0000)]
Bug 32733: (follow-up) Reorganize classification of information

If we're dividing the sections into labeled "Information" and
"Settings," I propose that we try to put under "Information" lines
which are just for display, and under "Settings" lines which allow the
user to change things: Managed by, managing library, basket group, etc.

This patch moves a few lines to accomplish this. The only other change
is to remove a "float:left" inline style from the "Change library" form
to make it display better.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 1f33d80d789575e353bbe1202b59311b701c9184)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32733: Add page-section cards to basket summary
Martin Renvoize [Thu, 26 Jan 2023 11:38:53 +0000 (11:38 +0000)]
Bug 32733: Add page-section cards to basket summary

This patch adds two new page-section divs to the basket summary page.
One for each column of details in the top area of the summary page.

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>
(cherry picked from commit 89db73cbcef39d65f5bc838029eb8f4f4be4f62c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32562: (follow-up) Add markup comments
Owen Leonard [Tue, 3 Jan 2023 20:25:31 +0000 (20:25 +0000)]
Bug 32562: (follow-up) Add markup comments

This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the page's appearance or
functionality.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 61b1b12dda1c7d60d092ccb2a97a3108b1058b86)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32562: Reindent the about page template
Owen Leonard [Tue, 3 Jan 2023 19:49:44 +0000 (19:49 +0000)]
Bug 32562: Reindent the about page template

This patch reindents the about page template so that it has consistent
indentation. These changes should have no visible effect on the page.

To test, apply the patch and view the about page. Everything should look
normal. All tabs should work correctly.

Viewing the diff while ignoring whitespace changes should show only
places where a line break was added.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fc909d3bf42b5f074485ec01892f0e69eb4bd2dc)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 31932: (follow-up) Markup comments
Owen Leonard [Wed, 25 Jan 2023 16:38:01 +0000 (16:38 +0000)]
Bug 31932: (follow-up) Markup comments

This patch adds comments to the template to highlight the markup
structure.

This patch should have no effect on the page's appearance or
functionality.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bbec1228b62c81c0fa9e4a330cd4b28aed27ca99)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 31932: The basket summary page template needs a cleanup
Owen Leonard [Mon, 23 Jan 2023 17:23:36 +0000 (17:23 +0000)]
Bug 31932: The basket summary page template needs a cleanup

This patch reindents the Acquisitions basket template so that it has
consistent indentation. These changes should have no visible effect on
the page.

To test, apply the patch and go to Acquisitions.

Locate a vendor and add a basket and some orders if necessary.

Test as much of the page's functionality as possible, e.g. toolbar
controls, in-table controls, managed-by and managing library controls,
etc. Try adding an internal note, adding a vendor note, and deleting the
basket.

Everything should look correct and work correctly.

Viewing the diff while ignoring whitespace changes should show only
places where a line break was added.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 328984439c438a13cb40adc1ad40833797274414)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32583: Restore display of only one item in catalogue/moredetails
Michael Hafen [Fri, 13 Jan 2023 17:49:46 +0000 (10:49 -0700)]
Bug 32583: Restore display of only one item in catalogue/moredetails

Bug 31315 (Remove GetItemsInfo from moredetail) removed the code that limits
the items displayed to only one item if the itemnumber was passed as a
parameter to the page.
This restores that code.

Test plan:

1. find a title with multple items.
2. click on an items barcode in the holdings table on the title details page.
3. observe that all items are shown on the catalogue/moredetails page.
4. apply patch.
5. refresh (catalogue/moredetails) page.
6. observe that only the item for the barcode clicked on is shown.

Signed-off-by: Amaury GAU <amaury.gau@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d88e966adadc332b21c30993fd9d5edd5e907c0f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32520: Amend DefaultPatronSearchFields system preference description
Katrin Fischer [Wed, 28 Dec 2022 21:26:13 +0000 (21:26 +0000)]
Bug 32520: Amend DefaultPatronSearchFields system preference description

Tries to clarify that the preference is not only used for the search
in the patrons module, but also in circulation.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0f2cf9f44018cd52a2616a104aa94d02148786c2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32520: Use DefaultPatronSearchFields in patron_autocomplete
Martin Renvoize [Fri, 23 Dec 2022 11:32:12 +0000 (11:32 +0000)]
Bug 32520: Use DefaultPatronSearchFields in patron_autocomplete

This patch updates js_includes.inc to set a new global js variable
`defaultPatronSearchFields` with the content of the corresponding system
preference.

We then update the patron_autocomplete function to use this new global
variable and iterate in the same way as
koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc.

NOTE: This changes the behaviour of the autocomplete from always
searching using contains on surname or firstname or starts with on
cardnumber to searching using 'contains' on any of the fields listed in
the DefaultPatronSearchFields system preference of defaulting to
'firstname,middle_name,surname,othernames,cardnumber,userid'.

Test plan
1. Ensure autocomplete still works everywhere
2. Confirm the system preference fields are being used.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6898f1f132b5a01eb4c406fa711b3d13324ef538)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32251: Add a fallback for when language cookie was removed
Marcel de Rooy [Fri, 18 Nov 2022 07:23:25 +0000 (07:23 +0000)]
Bug 32251: Add a fallback for when language cookie was removed

Since we remove cookies after logout now, the language cookie
might not be there yet. It is friendlier to add the template
language fallback here now too before switching to 'default' in
the Additional contents (AC)-context.

Note: The cookie will not be removed when you added it to the list
in koha-conf.xml.

Note2: This only pertains to the use of opac-page with code param.

Test plan:
[1] Create a CMS page with AC. Add two languages (say en, nl-NL).
    Add different text to default and both languages.
[2] Remove the KohaOPACLanguage cookie from your browser (via
    dev console).
[3] Without this patch, copy the Current language URL from the AC
    overview page. (Note that the Default URL always refers you to
    'default'.)
[4] Go to that page with the selected (Current..) URL. Observe that
    you still see the 'default' text.
[5] Remove the cookie again if it might be there already.
[6] With this patch, observe that you get the language of the
    interface now on the CMS page using the same URL.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Pascal <pascal.uphaus@gwdg.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a99d188e78d42b7c2b9f2091a64142ba45909c70)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32631: Error when previewing record during batch record modification
Owen Leonard [Fri, 13 Jan 2023 15:00:25 +0000 (15:00 +0000)]
Bug 32631: Error when previewing record during batch record modification

This patch corrects an error in the script which outputs MARC data for
preview during batch record modification.

To test, apply the patch and restart services. You will need at least
one MARC modification template in your system.

- Go to Cataloging -> Batch record modification
- Submit a batch of bibliographic records
- In the table of records that follows, click any "Show MARC" button. A
  modal window should appear with a preview of the modified record.

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 09874fce6c98f6ec80361da899ba54fac277bd79)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 18247: Remove SQL queries from branch_transfer_limit.pl
Alex Buckley [Mon, 8 Aug 2022 23:59:20 +0000 (23:59 +0000)]
Bug 18247: Remove SQL queries from branch_transfer_limit.pl

1. Visit Administration > Patrons and circulation > Limit transfer limits

2. Observe collection codes are displayed as tabs on the Limit transfer
limits page when the BranchTransferLimitsType syspref = 'Collection
code'

3. Switch the BranchTransferLimitsType syspref = 'item type'. Refresh
the Limit transfer limits page and observe the tabs have changed to item
type codes

4. Apply patchset and restart services

5. Reload the Limit transfer limits page and confirm it displays
correctly with the  BranchTransferLimitsType = 'collection code' and
'item type'

6. Confirm you can successfully save transfer policies

Sponsored-by: Catalyst IT
Signed-off-by: Jacob Omara <jacob.omara@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5e863f93c06e1e67ddbf0c705657ca7d024006f6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32416: Add a warning to the file
Nick Clemens [Wed, 7 Dec 2022 13:02:33 +0000 (13:02 +0000)]
Bug 32416: Add a warning to the file

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e88f31d8a28566cef2275c3d9e62f3432b1f54f2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32416: Update attribute number for arp search to 9015
Nick Clemens [Wed, 7 Dec 2022 12:56:02 +0000 (12:56 +0000)]
Bug 32416: Update attribute number for arp search to 9015

Bug 20078 updated the attribute for arp to 2014 to avoid conflict with 9013 not-on-loan-count

Bug 28830 then added Control-number-identifier as 2014, breaking arp again

This patch updates the number to 9015

To test:
1 - Apply first patch
2 - Attempt searching by arp, no results (add a unique 526$d to a record to ease searching)
3 - Apply this patch
4 - Copy bib1.att and ccl.properties to the correct locations
    cp etc/zebradb/biblios/etc/bib1.att /etc/koha/zebradb/biblios/etc/bib1.att
    cp etc/zebradb/ccl.properties /etc/koha/zebradb/ccl.properties
5 - Restart zebra
6 - Rebuild indexes
7 - Search again, success!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e6efa820993c0b04fd848caf84658620b7ef337d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32204: Check for hash before setting focus
Lucas Gass [Tue, 10 Jan 2023 18:10:43 +0000 (18:10 +0000)]
Bug 32204: Check for hash before setting focus

1. Search the catalog and view a record detail page of a record with items
2. Click 'Edit items'
3. Choose one item from the list and click 'Edit'
4. The URL fragment or in-page anchor (#edititem) is appended to the end of the URL but you are not placed on it. Instead you are placed at the top of the page and must scroll down to edit the particular item.
5. Apply patch
6. Try steps 1 - 3 again, now you should be placed in the correct location (#edititem) when editing an item.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5197d63c5593b1e808fcbb10c0124c0ea252bbcb)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32718: Capitalization: Display Order
Caroline Cyr La Rose [Tue, 24 Jan 2023 21:55:42 +0000 (16:55 -0500)]
Bug 32718: Capitalization: Display Order

This patch corrects the capitalization of the "Display order" column heading
in the item groups table.

To test:
0. Apply patch
1. Enable the EnableItemGroups system preference
   1.1. Go to Administration > Global system preferences
   1.2. Search for EnableItemGroups
   1.3. Change the value to "Enable"
   1.4. Click "Save all Circulation preferences"
2. Go to any bibliographic record
3. Click the "Item groups" tab at the bottom
   --> First column should be "Display order"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2a5e06094bfab455fa05721bde6e9ee7619716c2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32229: Typo: Items missing from bundle at checking for %s
Caroline Cyr La Rose [Wed, 25 Jan 2023 21:19:10 +0000 (16:19 -0500)]
Bug 32229: Typo: Items missing from bundle at checking for %s

This patch corrects a typo in the missing items from bundle pop-up
header.

To test:

I created a MARC21 file of records to use as an example. It assumes
you have the sample branches and itemtypes that come with Koha. You
can use any record you have in your database, you need at least three
records each with at least one item.

0. Apply patch
1. If using the example records, import the records
   1.1. Download the attached earlyliteracy.mrc file
   1.2. Go to Cataloging > Stage records for import
   1.3. Click the button and select the file on your computer
   1.4. Click 'Upload file'
   1.5. Click 'Stage for import'
   1.6. Click 'View detail of the enqueued job'
   1.7. Click 'View batch'
   1.8. Click 'Import this batch into the catalog'
2. If using the example records, bundle the books into the 'My first
books bundle' record
   2.1. Click 'Manage imported batch'
   2.2. Click 'View' next to 'My first books bundle'
   2.3. Click 'Manage bundle' on the right of the item
   2.4. Click 'Add to bundle'
   2.5. Enter the following barcodes, followed by 'Submit' (or press
enter) after each
        -  001229
        -  001230
        -  001231
        -  001232
        -  001233
   2.6. Click 'Close'

Alternate step 2, if using own records: find a record with an item,
change the leader/position 7 to c, click 'Manage bundle', then 'Add
to bundle' and enter a few existing barcodes (at least 2).

3. Check out bundle
   3.1. Go to Patrons
   3.2. Click 'Search' to find a patron
   3.3. Click 'Checkout' next to a patron
   3.4. If using example records, enter the following barcode into the
checkout box and click 'Checkout' (or press enter)
        -  001234
        Alternate step 3.4, if using own records: checkout the 'main'
record in which you bundled all the other records

4. Check in bundle, 'losing' at least one item
   4.1. In the bar at the top of the screen, select 'Check in'
   4.2. If using the example records, enter the following barcode and
click the arrow (or press enter)
        -  001234
        Alternate step 4.2, check in the same barcode you just checked
out
   4.3. In the 'Barcodes' box, enter the following barcodes, pressing
enter between each
        -  001229
        -  001230
        -  001231
        Alternate step 4.3, enter only some of the bundled barcodes
   4.4. Click 'Confirm checkin and mark missing items as lost'
   4.5. Click 'View list of missing items'
        --> Items missing from bundle at checkin for (barcode)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 17ff4e3889188a4420ef0d6399b64749ad8e46a5)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32561: Prevent worker to run with unecessary modules in memory
Jonathan Druart [Wed, 4 Jan 2023 09:08:06 +0000 (10:08 +0100)]
Bug 32561: Prevent worker to run with unecessary modules in memory

Regression of bug 28413, bug 30410 added a "use Koha::Plugins" statement at the top of Koha::BackgroundJob, and so all Koha module are loaded by the worker on startup.

See bug 28413 for more info

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a85a6bc4d4a1c15a065dc8b188d6de0c23f99271)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32321: Pre-populate material type for 006 in advanced cataloging editor
Nick Clemens [Tue, 22 Nov 2022 14:05:08 +0000 (14:05 +0000)]
Bug 32321: Pre-populate material type for 006 in advanced cataloging editor

To test"
1 - Edit a record in advanced cataloging editor with field helpers enabled
2 - Choose a material type, not BKS, from dropdown
3 - Set the first position to something
4 - Save the record
5 - 006 shows 'BKS'
6 - Apply patch
7 - Reload
8 - Record should show correct value
9 - Edit 006 and confirm the first position correctly determines material type

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7818717f3c69bcaf5953d6139f6a104dfb1c4ee7)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32376: Remove creation of selenium_failure_2.png
Jonathan Druart [Wed, 30 Nov 2022 07:32:20 +0000 (08:32 +0100)]
Bug 32376: Remove creation of selenium_failure_2.png

This was for debugging purpose.

Test plan:
Run the tests and confirm that the screenshot is not generated when the
patch is applied

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aa6d1ca0c7959298e9c12f7255148d245aae1937)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32692: Terminology - use staff interface for MARC framework subfield editor
David Nind [Fri, 20 Jan 2023 18:42:01 +0000 (18:42 +0000)]
Bug 32692: Terminology - use staff interface for MARC framework subfield editor

For the visibility options in the advanced constraints section of the
MARC framework subfield editor, use 'Staff interface' instead
of 'Intranet'.

This makes it consistent with the terminology list (see
https://wiki.koha-community.org/wiki/Terminology#I).

Test plan:
1. Go to Administration > Catalog > MARC bibliographic framework.
2. Select Actions > MARC structure for any framework.
3. For any tag select Actions > Edit subfields.
4. Note that in the advanced constraints section for the visibility
   field that 'Intranet' is used as an option.
5. Apply the patch.
6. Refresh the page and note that 'Staff interface' is now used, which
   is consistent with the terminology list (see
   https://wiki.koha-community.org/wiki/Terminology#I).
7. Sign off D:

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Amaury GAU <amaury.gau@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ab48b53d96bd33a37181b13bbb517500eae61fc2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32393: (QA follow-up) Add explicit undef response in two catch blocks
Marcel de Rooy [Tue, 24 Jan 2023 13:38:41 +0000 (13:38 +0000)]
Bug 32393: (QA follow-up) Add explicit undef response in two catch blocks

Do not implicitly depend on last statement returning nothing.
Make it explicit. We want $args to be null here.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 08cc23626c30a61254eddd552f6b23253876d753)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32393: Deal with the DB fallback part
Jonathan Druart [Tue, 24 Jan 2023 08:11:25 +0000 (09:11 +0100)]
Bug 32393: Deal with the DB fallback part

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 85c330d8f2ca6246cf3619c8075907cce8387be0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32393: Split into 2 try catch blocks
Jonathan Druart [Wed, 11 Jan 2023 11:36:42 +0000 (12:36 +0100)]
Bug 32393: Split into 2 try catch blocks

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 8df96262c145fc0ee26c019601b6a86de9396915)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32393: Prevent invalid job to block the job queue
Jonathan Druart [Fri, 2 Dec 2022 13:23:38 +0000 (14:23 +0100)]
Bug 32393: Prevent invalid job to block the job queue

I have faced a problem when testing an incorrect version of bug 32370.
The frame sent to the message broker was not a correct JSON encoded
string, and its decoding was obviously failing, exploding the worker
script.
Additionally, as we don't send a ack for this frame, the next pull will
result in processing the same message, and so in the same explosion.
No more messages can be processed!

This patch is logging the error and ack the message to the broker, in
order to not get stuck.

Test plan:
0. Dont' apply this patch
1. Enqueue a bad message
  a. Apply 32370
  b. Comment the following line in Koha::BackgroundJob::enqueue
    $self->set_encoded_json_field( { data => $job_args,    field => 'data' } );
  c. restart_all
  d. Use the batch item modification tool to enqueue a new job
=> Notice the error in the log
=> Note that the status of the job is "new"
=> Inspect rabbitmq queue:
% rabbitmq-plugins enable rabbitmq_management
% rabbitmqadmin get queue=koha_kohadev-long_tasks
You will notice there is a message in the "long_tasks" queue
2. Enqueue a good message
  a. Remove the change from 1.b
  b. restart_all
  c. Enqueue another job
=> Same error in the log
=> Both jobs are new
=> Inspect rabbitmq, there are 2 messages
3. Apply this patch
4. restart_all
=> Second (good) job is finished
=> rabbitmq long_tasks queue is empty

We cannot mark the first job as done, we have no idea which job it was!

QA: Note that this patch is dealing with another problem, not tested in
this test plan. If an exception is not correctly caught by the ->process
method of the job, we won't crash the worker. The job will be marked as
failed.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ca9a5981839a444fce109540035f26cac2780611)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32573: Send ACK message to RabbitMQ before handling the job
Kyle Hall [Thu, 5 Jan 2023 16:35:42 +0000 (11:35 -0500)]
Bug 32573: Send ACK message to RabbitMQ before handling the job

Splitting off this functionality from bug 32558. This is the comment that started this discussion: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32558#c15

From the O'Reilly book Mobile and Web Messaging:

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b3c5bd02e15e5f2e5c0eae3b06f26083b4856f3d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 31893: Use checkauth and do not fetch about.tt template
Nick Clemens [Fri, 13 Jan 2023 17:29:22 +0000 (17:29 +0000)]
Bug 31893: Use checkauth and do not fetch about.tt template

This patch updates four scripts to use checkauth instead of get_template_and_user

reserve/modrequest.pl
reserve/modrequest_suspendall.pl
course_reserves/mod_course.pl
members/members-update-do.pl

No behvaiour change is expected

To test:
0 - Apply patch
1 - Place some holds for a patron
2 - From patron page, confirm you can suspend all
3 - confirm you can delete marked holds
4 - Edit a course in course-reserves
5 - Make a chaneg to personal details via OPAC
6 - Confirm change can be approved on staff side

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit fc650b3e871e1d558ca1ff9f0dcb2f1fa0ad5db2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32221: Borrowers.password should no longer be an option
Matt Blenkinsop [Mon, 28 Nov 2022 14:35:37 +0000 (14:35 +0000)]
Bug 32221: Borrowers.password should no longer be an option

When creating a notice template the user has the option to add the borrower's
password to the template. This should be removed as the password should not be
an option to be added to a notice.

Test plan:
1) Navigate to Tools > Notices and slips
2) Either create a new notice or edit an existing notice
3) Observe that in the list of fields available to insert into the message body,
   there is the option for "borrowers.password"
4) Apply patch
5) Navigate to the same menu
6) Observe that the "borrowers.password" option is now no longer visible

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9608b16a6ba9d877dddc75beb1e1eef691f7b21a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32656: Script delete_records_via_leader.pl no longer deletes items
Kyle Hall [Tue, 17 Jan 2023 17:18:00 +0000 (12:18 -0500)]
Bug 32656: Script delete_records_via_leader.pl no longer deletes items

Bug 29788 inadvertantly replaced a call to safe_delete() with safe_to_delete()
such that any time the script should delete an item it only checks to see if
the item is delectable, after which deletion of the record fails because the
items were not deleted.

Test Plan:
1) Mark a record with items to be deleted via the record leader
2) Run delete_records_via_leader.pl -i -b -v
3) Note the script says it is deleting the items but then the record
   deletion fails. Note the items remain in the items table of the
   database.
4) Apply this patch
5) Repeat step 2
6) This time the items and record should be deleted!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 790f00781ab6c98017529ebf226d52c36c36cd68)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoUpdate release notes for 22.11.02 release v22.11.02
Jacob O'Mara [Wed, 25 Jan 2023 16:31:24 +0000 (16:31 +0000)]
Update release notes for 22.11.02 release

Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoIncrement version for 22.11.02 release
Jacob O'Mara [Wed, 25 Jan 2023 16:24:18 +0000 (16:24 +0000)]
Increment version for 22.11.02 release

Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBuilt files
Jacob O'Mara [Wed, 25 Jan 2023 16:17:46 +0000 (16:17 +0000)]
Built files

Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoFix translations for Koha 22.11.02
Jacob O'Mara [Wed, 21 Dec 2022 11:10:57 +0000 (11:10 +0000)]
Fix translations for Koha 22.11.02

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoTranslation updates for Koha 22.11.02
Koha translators [Wed, 25 Jan 2023 14:50:28 +0000 (11:50 -0300)]
Translation updates for Koha 22.11.02

Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
17 months agoBug 14784: (follow-up) Unit tests
Shi Yao Wang [Thu, 14 Jul 2022 14:41:27 +0000 (10:41 -0400)]
Bug 14784: (follow-up) Unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dd5a62b1fcb02e2e743a04325abb35971031dbfe)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 14784: Fix checkin message for restricted patrons
Shi Yao Wang [Mon, 13 Jun 2022 18:05:53 +0000 (14:05 -0400)]
Bug 14784: Fix checkin message for restricted patrons

Test plan:
Before

1) Select a user with active indefinite or definite restrictions (manual restriction works)
2) Make sure finedays=0 for the user category. See [1]
3) Checkout and return an item (not overdue)
   A previous restriction reminder will appear
4) Checkout and return an overdue item (change the date at checkout)
   No previous restriction reminder will appear

After applying patch:
Same steps, but a reminder should appear for step 4)

[1] The "finedays" setting is called "Suspension in days" in the web interface, if you're searching for it like I did...

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a05bb1e36dd8af51dd2a2039593a4303879bb62d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 31950: Amend page-section width and alignment
Jacob O'Mara [Thu, 15 Dec 2022 19:04:51 +0000 (19:04 +0000)]
Bug 31950: Amend page-section width and alignment

Test Plan:
Navigate to Admin -> Libraries and click on a Library
Observe that the page-section is too wide and not aligned
Apply Patch
Observe that page-section is now the correct width

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit be569f1aa52ee18dd526b1da37c3baea46143dec)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32582: Fix error in .mailmap
Katrin Fischer [Fri, 6 Jan 2023 21:28:14 +0000 (22:28 +0100)]
Bug 32582: Fix error in .mailmap

The .mailmap had the addresses in the wrong
sequence. The .83 address is actually the correct
one.

How this works is easiest to see in git:
* Apply one of my patches, like bug 31962
* Do a git log
* You'll see the email address without .83 as author
* Apply this patch
* You should see the correct email now in both,
  matching the one in the patch file on bugzilla

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b5f49be55587fd4761537b317233440598bd8c9f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
17 months agoBug 32628: Add 'page-section' to various serials pages
Owen Leonard [Fri, 13 Jan 2023 14:07:41 +0000 (14:07 +0000)]
Bug 32628: Add 'page-section' to various serials pages

This patch adds a "page-section" container div around the main section
of serials pages which lack it.

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

To test you must have at least one subscription in your system. Apply
the patch and view the following pages to confirm that the main content
is contained in a white box:

- Subscription batch edit:
  - Go to Serials -> Search subscriptions -> Results
  - Check the box next to one or more search results and click "Edit
    selected serials."
- Subscription frequencies:
  - Serials -> Manage frequencies
- View subscription alerts:
  - Log in to the OPAC and search for a subscription.
    - On the subscription detail page click the "Subscribe to to email
      notification on new issues."
  - In the staff interface, locate that subscription and view its
    details.
    - Click the "subscribers" link under "Patron notification."

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8603f3c6f16f34ab33defcb6f3a0977481479455)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>