]> git.koha-community.org Git - koha.git/log
koha.git
2 years agoBug 31145: Supply defaults for vendors and funds
Nick Clemens [Tue, 12 Jul 2022 18:52:21 +0000 (18:52 +0000)]
Bug 31145: Supply defaults for vendors and funds

This is a convenience bug - when koha testing docker creates sample vendors and budgets there are small issues:

1 - The vendor website gets a random string - you can't edit the vendor without removing this
2 - The funds have random values for statistical categories, and you get empty dropdowns when choosing a fund in ordering

To test:
1 - Apply patch
2 - Restart all
3 - Edit 'My vendor'
4 - note webstie is empty and you can save without changing anythign
5 - Add order to basket for my vendor
6 - Confirm that when selecting a fund statistic 1 and statistic 2 remain as text input fields

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31141: Remove 'select_column' from waiting_holds.inc
Martin Renvoize [Tue, 12 Jul 2022 10:22:36 +0000 (11:22 +0100)]
Bug 31141: Remove 'select_column' from waiting_holds.inc

In the only place we use the waiting_holds include, we were hard coded
to always pass the 'select_column' variable as true.

We can simply and clarify the logic by just removing this superflous
variable.

Test plan
1. Confirm that the waiting holds tables continue to display as expected

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31133: Don't generate values for more than one FK
Jonathan Druart [Tue, 12 Jul 2022 07:11:12 +0000 (09:11 +0200)]
Bug 31133: Don't generate values for more than one FK

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31104: Add a selenium test
Jonathan Druart [Tue, 12 Jul 2022 08:25:25 +0000 (10:25 +0200)]
Bug 31104: Add a selenium test

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31140: (QA follow-up) Remove leftover POD
Jonathan Druart [Tue, 12 Jul 2022 13:44:25 +0000 (10:44 -0300)]
Bug 31140: (QA follow-up) Remove leftover POD

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31140: TestBuilder.t is failing on item groups modules
Kyle Hall [Tue, 12 Jul 2022 10:12:26 +0000 (06:12 -0400)]
Bug 31140: TestBuilder.t is failing on item groups modules

Test Plan:
1) prove t/db_dependent/TestBuilder.t
2) Note failures
3) Apply this patch
4) prove t/db_dependent/TestBuilder.t
5) Note all tests pass!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 21978: Fix Selenium tests
Jonathan Druart [Tue, 12 Jul 2022 08:42:39 +0000 (10:42 +0200)]
Bug 21978: Fix Selenium tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: (QA follow-up) Trivial fix to schema file
Tomas Cohen Arazi [Tue, 12 Jul 2022 02:36:56 +0000 (23:36 -0300)]
Bug 30275: (QA follow-up) Trivial fix to schema file

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31054: Manual importing for EDIFACT invoices fails with a 500 error page
Kyle Hall [Mon, 27 Jun 2022 12:13:39 +0000 (08:13 -0400)]
Bug 31054: Manual importing for EDIFACT invoices fails with a 500 error page

Error in plack log is: Can't locate object method "new" via package
"Koha::Plugin::Com::ByWaterSolutions::MyEdifactPlugin" (perhaps you
forgot to load "Koha::Plugin::Com::ByWaterSolutions::MyEdifactPlugin"?)
at /usr/share/koha/lib/Koha/EDI.pm line 219.

Test Plan:
1) Set EdifactInvoiceImport to "Don't"
2) Configure an EDI vendor to use an EDIFACT plugin
3) Attempt to import an invoice file
4) You will be shown an error page
5) Apply this patch
6) Restart all the things!
7) Attempt to import another invoice file
8) It works!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31116: (QA follow-up) Remove duplicate line
Marcel de Rooy [Fri, 8 Jul 2022 06:05:43 +0000 (06:05 +0000)]
Bug 31116: (QA follow-up) Remove duplicate line

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31116: Add circulation sidebar to article requests
Martin Renvoize [Thu, 7 Jul 2022 11:39:01 +0000 (12:39 +0100)]
Bug 31116: Add circulation sidebar to article requests

This patch adds the circulation sidebar menu to the article requests
page to make it consistent with other circulation module pages.

Test plan
1) Prior to applying the patch confirm that there is no sidebar on the
   article requests management page, regardless of the CircSidebar
   perference.
2) Apply the patch
3) Confirm there is still no sidebar when CircSidebar is disabled
4) Confirm there is now a sidebar present when CircSidebar is enabled
5) Confirm the current page is highlighted correctly in the sidebar when
   on the article requests page.

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>
2 years agoBug 31000: Warn removal: param record_type can be undef
Andrew Nugged [Fri, 26 Nov 2021 11:45:37 +0000 (13:45 +0200)]
Bug 31000: Warn removal: param record_type can be undef

Uninitialized value warning on /tools/export.pl when $record_type is undef

Use of uninitialized value $record_type in string eq
at /home/vagrant/kohaclone/tools/export.pl line 43.

This warning in koha-testing-docker appears in:
/var/log/koha/kohadev/intranet-error.log

This patch fixes it by working when $record_type is Undef.
The functionality still remains the same but warning doesn't flood
error log.
To reproduce:
1. Go to export data tool page (/tools/export.pl).
2. Check the error log and find the upper mentioned warning,
check the timestamp to ensure that it was added when you loaded the page.
3. Apply the patch.
4. Load the page again, ensure that the same warning doesn't get added
to the log file again.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31104: Put each link on a separate header
Tomas Cohen Arazi [Wed, 6 Jul 2022 19:27:23 +0000 (16:27 -0300)]
Bug 31104: Put each link on a separate header

This patch makes the Pagination helper put each Link entry on the
response headers on a separate header. In practice, this leads to
shorter headers and will avoid apache default/reasonable limits.

To test:
1. Open the patron search page
2. Open the koha logs:
   $ tail -f /var/log/koha/kohadev/*.log
3. On the 'Search for patron' input, use a really long string, like
   'superlongstringthatistoolongforapacheyeahsuperlong'
=> SUCCESS: There's no user with an attribute with that content :-D
=> FAIL: You get an error like (28)No space left on device: [client 127.0.0.1:60330] AH10124: header size is over the limit allowed by ResponseFieldSize (8192 bytes). Bad response header: 'Link:...'
4. Apply this patch
5. Restart all:
   $ restart_all
6. Repeat 2 and 3
=> SUCCESS: No results
=> SUCCESS: No error in the logs
7. Run:
   $ kshell
  k$ prove t/Koha/REST/Plugin/Pagination.t \
           t/db_dependent/api/v1/*.t
=> SUCCESS: Tests pass!

Note 1: The Link header is expected to be in CSV format, which is
usually the way libraries treat repeated headers anyway.

Note 2: Apache is not rejecting the response, just stripping out the
'bad header'. So this is not a critical issue.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Michal Urban <michalurban177@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31039: (follow-up) Wrap jQuery in $(document).ready()
Owen Leonard [Mon, 11 Jul 2022 14:03:44 +0000 (15:03 +0100)]
Bug 31039: (follow-up) Wrap jQuery in $(document).ready()

cashup_modal.js consists only of jQuery code, so the whole thing should
be contained in a $(document).ready() function. This may or may not be
contributing to the behavior this bug is trying to fix.

Please note that this patch contains whitespace changes, so diff
accordingly.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31039: Remove duplicate modal printing JS
Martin Renvoize [Fri, 24 Jun 2022 12:10:46 +0000 (13:10 +0100)]
Bug 31039: Remove duplicate modal printing JS

This patch removes the erroneos duplication of the modal printing js.

Test plan
1) Create some transactions and perform a cashup.
2) Open the cashup summary modal
3) Click 'Print'
4) Cancel the print dialogue
5) Note that the dialogue re-appears
6) Apply the patch
7) Repeat and note the dialogue closes first time now.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24857: Fix missing additionalProperties in spec
Tomas Cohen Arazi [Fri, 8 Jul 2022 22:11:23 +0000 (19:11 -0300)]
Bug 24857: Fix missing additionalProperties in spec

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24857: DBRev 22.06.00.014
Tomas Cohen Arazi [Fri, 8 Jul 2022 19:23:05 +0000 (16:23 -0300)]
Bug 24857: DBRev 22.06.00.014

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24857: (QA follow-up) Make update idempotent
Tomas Cohen Arazi [Fri, 8 Jul 2022 19:19:35 +0000 (16:19 -0300)]
Bug 24857: (QA follow-up) Make update idempotent

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24857: DBIC update
Tomas Cohen Arazi [Fri, 8 Jul 2022 19:11:11 +0000 (16:11 -0300)]
Bug 24857: DBIC update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24857: Add object classes to Schema
Nick Clemens [Thu, 28 Apr 2022 17:54:48 +0000 (17:54 +0000)]
Bug 24857: Add object classes to Schema

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24857: Add new Schema files
Kyle M Hall [Thu, 2 Jun 2022 16:19:26 +0000 (16:19 +0000)]
Bug 24857: Add new Schema files

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24857: Delete item group when last item is deleted
Nick Clemens [Tue, 8 Mar 2022 12:31:12 +0000 (12:31 +0000)]
Bug 24857: Delete item group when last item is deleted

To test:
1 - Find a record with an item gorup, or add a group
2 - Add an item to this group, ensure it is the only item in the group
3 - Delete the item
4 - Confirm the gorup was also deleted
5 - prove t/db_dependent/Koha/Biblio/ItemGroups.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24857: Add ability to set item group when adding a new item
Nick Clemens [Tue, 8 Mar 2022 12:03:38 +0000 (12:03 +0000)]
Bug 24857: Add ability to set item group when adding a new item

During cataloging a user may wish to add an item to a group when
creating a new item

This patch also copies the group description to the enumchron field

To test:
1 - Browse to details page for a record
2 - Create or ensure the record has item group(s)
3 - Click New->New item
4 - Note the bottom of the page has a form to attach to existing group, or create new
5 - Note when a group is selected the enumchron field is populated
6 - Confirm item is saved to group when saved

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24857: Add item group management to detail.pl
Nick Clemens [Tue, 8 Mar 2022 12:01:48 +0000 (12:01 +0000)]
Bug 24857: Add item group management to detail.pl

Test Plan:
1) Apply the patches for this bug
2) Run updatedatabase.pl
3) Restart all the things!
4) Enable the new syspref EnableItemGroups
5) Browse to detail.pl for a record with items
6) Note the new Item Groups tab
7) Test creating, editing and deleting groups
8) On the Holdings tab, select one or more items using the checkboxes
8) Note new selection options for setting an item group for items,
   and for clearing an item group for items.
9) Test adding and clearing the item group for items

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24857: Add Object Methods
Nick Clemens [Tue, 8 Mar 2022 12:00:23 +0000 (12:00 +0000)]
Bug 24857: Add Object Methods

To test:
1 - prove t/db_dependent/Koha/Biblio.t
2 - prove t/db_dependent/Koha/Item.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24857: API spec
Nick Clemens [Tue, 8 Mar 2022 11:34:40 +0000 (11:34 +0000)]
Bug 24857: API spec

To test:
1 - prove t/db_dependent/api/v1/item_groups.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24857: Add Koha Objects
Nick Clemens [Tue, 8 Mar 2022 11:27:59 +0000 (11:27 +0000)]
Bug 24857: Add Koha Objects

To test:
1 - prove t/db_dependent/Koha/Biblio/ItemGroups.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24857: Database updates
Nick Clemens [Tue, 8 Mar 2022 11:26:19 +0000 (11:26 +0000)]
Bug 24857: Database updates

This adds the new tables, syspref, and a new permission

https://bugs.koha-community.org/show_bug.cgi?id=24860
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29333: (QA follow-up) POD consistency
Tomas Cohen Arazi [Fri, 8 Jul 2022 18:46:08 +0000 (15:46 -0300)]
Bug 29333: (QA follow-up) POD consistency

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29333: Fix encoding of imported UNIMARC authorities
Julian Maurice [Wed, 27 Oct 2021 10:00:23 +0000 (12:00 +0200)]
Bug 29333: Fix encoding of imported UNIMARC authorities

MARC::Record and MARC::File::* modules sometimes use the position 09 of
the leader to detect encoding. A blank character means 'MARC-8' while an
'a' means 'UTF-8'.

In a UNIMARC authority this position is used to store the authority type
(see https://www.transition-bibliographique.fr/wp-content/uploads/2021/02/AIntroLabel-2004.pdf [FR]).
In this case, 'a' means 'Personal Name'.

The result is that the import will succeed for a Personal Name
authority, but it will fail for all other authority types.

Steps to reproduce:
0. Be sure to have a Koha UNIMARC instance.
1. Download the MARCXML for "Honoré de Balzac"
   curl -o balzac.marcxml https://www.idref.fr/02670305X.xml
2. Verify that it's encoded in UTF-8
   file balzac.marcxml
   (should output "balzac.marcxml: XML 1.0 document, UTF-8 Unicode
   text")
3. Go to Tools » Stage MARC for import and import balzac.marcxml with
   the following settings:
   Record type: Authority
   Character encoding: UTF-8
   Format: MARCXML
   Do not touch the other settings
4. Once imported, go to the staged MARC management tool and find your
   batch. Click on the authority title "Balzac Honoré de 1799-1850" to
   show the MARC inside a modal window. There should be no encoding
   issue.
5. Write down the imported record id (the number in column '#') and go
   to the MARC authority editor. Replace all URL parameters by
   'breedingid=THE_ID_YOU_WROTE_DOWN'
   The URL should look like this:
   /cgi-bin/koha/authorities/authorities.pl?breedingid=198
   You should see no encoding issues. Do not save the record.
6. Import the batch into the catalog. Verify that the authority record
   has no encoding issue.
7. Now download the MARCXML for "Athènes (Grèce)"
   curl -o athènes.marcxml https://www.idref.fr/027290530.xml
8. Repeat steps 2 to 6 using athènes.marcxml file. At steps 4 and 5 you
   should see encoding issues and that the position 9 of the leader was
   rewritten from 'c' to 'a'. Strangely, importing this batch fix the
   encoding issue, but we still lose the information in position 09 of
   the leader

This patch makes use of the MARCXML representation of the record instead
of the ISO2709 representation, because, unlike
MARC::Record::new_from_usmarc, MARC::Record::new_from_xml allows us to
pass directly the encoding and the format, which prevents data to be
double encoded when position 09 of the leader is different that 'a'

Test plan:
- Follow the "steps to reproduce" above and verify that you have no
  encoding issues.

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>
2 years agoBug 28739: Execute the letter processing inside a transaction
Jonathan Druart [Wed, 13 Oct 2021 12:46:08 +0000 (14:46 +0200)]
Bug 28739: Execute the letter processing inside a transaction

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>
2 years agoBug 19966: Add ability to pass objects directly to slips and notices
Kyle M Hall [Fri, 23 Jul 2021 12:07:59 +0000 (08:07 -0400)]
Bug 19966: Add ability to pass objects directly to slips and notices

Koha spends an incredible amount of time on parsing and processing parameters
passed in to slips and notices. It would be immensely more efficient to be able
to pass objects directly to GetPreparedLetter so it doesn't need to do any
fetching / processing on them.

Test plan:
1) Apply this patch
2) prove t/db_dependent/Letters/TemplateToolkit.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29051: Update svc api to allow seen renewals
Martin Renvoize [Wed, 11 May 2022 15:21:48 +0000 (16:21 +0100)]
Bug 29051: Update svc api to allow seen renewals

This patch updates the svc/renew api endpoint to allow seen renewals
when appropriate

Signed-off-by: Caroline <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29051: Enable seen renewal in the staff client
Martin Renvoize [Wed, 11 May 2022 15:13:23 +0000 (16:13 +0100)]
Bug 29051: Enable seen renewal in the staff client

This patch updates the javascript for the checkouts table to add the
checkbox back in for the case where too_unseen is the error returned by
CanBookBeRenewed, allowing such issues to be renewed.

Signed-off-by: Caroline <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30911: Datatables error on course-details.pl after adding a bib-level course...
Owen Leonard [Fri, 8 Jul 2022 13:03:01 +0000 (13:03 +0000)]
Bug 30911: Datatables error on course-details.pl after adding a bib-level course reserve

This patch removes the colspan from biblio-level course reserves rows in
favor of adding a style to the message's container allowing it to
overflow across table cells.

To test, apply the patch and go to course reserves.

1. If necessary, add a new course.
2. View the details of the course and add a reserve using the
   biblionumber option to add the reserve at the bibliographic level.
3. Add a notes if you want, then click "Save."
4. Return to the course detail view.
5. In the table of reserves your biblio-level reserve should have a
   message starting in the "Barcode" column and overflowing across other
   item information columns, "Item information is not available for
   record-level course reserve."
6. Try adding multiple item-level and biblio-level reserves to the same
   course to confirm that the information displays well in those cases.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29951: Fix EXPORT for C4::ClassS*Routine modules
Jonathan Druart [Wed, 6 Jul 2022 14:23:25 +0000 (16:23 +0200)]
Bug 29951: Fix EXPORT for C4::ClassS*Routine modules

Can't locate object method "subclasses" via package "C4::ClassSplitRoutine" at /kohadevbox/koha/C4/ClassSplitRoutine.pm line 53

Certainly from bug 17600.

Test plan:
Home -> Administration -> Classification sources -> New splitting rule

And create classification sources and filing rules.

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>
2 years agoBug 31117: New message for cloning standard rules
Florian Bontemps [Thu, 7 Jul 2022 15:24:10 +0000 (15:24 +0000)]
Bug 31117: New message for cloning standard rules

This commit adds a different message when cloning circulation and fine rules if you use the Standard rules for all libraries option.

Test plan :
1. Go to the Circulation and fine rules page in the Admin tab.
2. Check that the 'Select a library' menu is on 'Standard rules for all libraries'.
3. Check that you also have some random rules to clone, or create some.
4. Clone these rules to the library of your choice.
5. Confirm that the message 'Clone circulation and fine rules from "" to (library of your choice)' appears.
6. Now clone rules from a specific library to another one, and repeat steps 3-4.
7. Confirm that this time, the message will displays both libraries properly.
8. Apply patch.
9. Repeat steps 2 to 4 and 6 to 7. Confirm that this time, the message in the first case will be 'Cloning circulation and fine rules to "(library of your choice)"'.
10. Kindly sign off.

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug: 27996: Updates the Circulation report overdues page to display date in red.
Karen Turner [Thu, 7 Jul 2022 23:37:34 +0000 (23:37 +0000)]
Bug: 27996: Updates the Circulation report overdues page to display date in red.

Test:
1. Login to the staff interface
2. First you need to create an overdue item.
  a. Find the barcode for an item
  b. Goto My checkouts from the drop down by your login
  c. Enter the barcode and use checkout settings to select a date in the
  past.
2. Go to Tools
3. Go to Circulation
4. Go to Go to Overdues
5. In the table the due date is in black
6. Apply the patch
7. Refresh the page and the due date should be in red.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
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>
2 years agoBug 30767: Changes word "issue" to "item"
Logan Symons [Thu, 7 Jul 2022 22:58:40 +0000 (22:58 +0000)]
Bug 30767: Changes word "issue" to "item"

Please test and confirm terminology is now correct.
Was unable to test without steps to reproduce.

Sponsored-by: Catalyst IT
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30766: extra space in Cannot cancel receipt string
Danyon Sewell [Thu, 7 Jul 2022 22:45:46 +0000 (22:45 +0000)]
Bug 30766: extra space in Cannot cancel receipt string

TEST PLAN:

1. Trigger the Cannot cancel receipt error in invoices OR look at the
amended string to see the additional space has been removed.

Sponsored by Catalyst IT

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30762: Terminology: Go to Staff client
krisw [Thu, 7 Jul 2022 22:56:40 +0000 (22:56 +0000)]
Bug 30762: Terminology: Go to Staff client

Test plan
Login to staff interface
Go to Administration. Search EnableExpiredPasswordReset. Enable this preference. Save.
Find your patron record and go to details.
In the ‘OPAC/Staff interface login’ section, set the Password expiration date to  the previous day. Save.
Open the OPAC in a new window.
Login to your account. It will fail. Click Reset your password.
Follow the process to add a new password.  Click update password.
See that it says ‘Go to staff interface’

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30763: fixes spelling of 'proceeds'
Evan Giles [Thu, 7 Jul 2022 22:19:37 +0000 (22:19 +0000)]
Bug 30763: fixes spelling of 'proceeds'

Test plan:
1. Login to the staff interface
2. go to tools
3. go to label creator
4. Click New -> Layout
5. Click the 'Choose layout type' dropdown
6. Notice the 'barcode proceeds biblio data' and 'biblio data proceeds
barcode'.  These are typos
7. Apply the patch and refresh the page
8 repeat step 5. Confirm 'proceeds' now correctly says 'precedes'

Sponsored by: Catalyst IT

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30784: (follow-up) Additional rephrasing
David Nind [Fri, 8 Jul 2022 05:58:07 +0000 (05:58 +0000)]
Bug 30784: (follow-up) Additional rephrasing

Add additional clarifcation, format NOTE: similar to most other
notes in system preferences (bold, start on a new line), and link
to other system preferences mentioned.

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>
2 years agoBug 30784: Rephrasing OPACMandatoryHoldDates pref slightly
Danyon Sewell [Thu, 7 Jul 2022 23:26:19 +0000 (23:26 +0000)]
Bug 30784: Rephrasing OPACMandatoryHoldDates pref slightly

TEST PLAN:

1. On the Admin page, navigate to Koha Administration > Global System
Preferences

2. Search for OPACMandatoryHoldDates

3. In the Value field, check that it now says On the "Placing a hold"
form, instead of opac-reserve form.

Sponsored by Catalyst IT

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
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>
2 years agoBug 30770: (QA follow-up) Fixing the last occurrence of reserve in returns.tt
Katrin Fischer [Fri, 8 Jul 2022 08:31:42 +0000 (08:31 +0000)]
Bug 30770: (QA follow-up) Fixing the last occurrence of reserve in returns.tt

Reserve -> Hold

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30770: Fixed terminology 'reserve' -> 'hold'
Tosca Waerea [Thu, 7 Jul 2022 23:07:21 +0000 (23:07 +0000)]
Bug 30770: Fixed terminology 'reserve' -> 'hold'

Test plan:
1. Look at koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
2. Note that it says 'Lost reserve'
3. Apply patch
4. Note that it says 'Lost hold'

Note:
I was not able to trigger the behaviour to see the text in question

Sponsored-by: Catalyst IT
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30764: replace "Cancelled reserve" with "Cancelled hold"
Filip Vujičić [Thu, 7 Jul 2022 22:48:42 +0000 (22:48 +0000)]
Bug 30764: replace "Cancelled reserve" with "Cancelled hold"

Test plan:
1. Inspect `koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt`, notice that on line 136 it says "Cancelled reserve"
2. Apply patch
3. Inspect the same line again and notice it now correctly says "Cancelled hold"
4. ???
5. Profit!

Sponsored-by: Catalyst IT
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30773: (follow-up) Remove spaces between brackets
David Nind [Fri, 8 Jul 2022 06:18:26 +0000 (06:18 +0000)]
Bug 30773: (follow-up) Remove spaces between brackets

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>
2 years agoBug 30773: Standardize spelling i-tive / Itiva
krisw [Thu, 7 Jul 2022 23:53:15 +0000 (23:53 +0000)]
Bug 30773: Standardize spelling i-tive / Itiva

In the Koha staff interface go to administration.
Go to TalkingTechItivaPhoneNotification. Enable this preference. Save.
Go to Tools > Overdue notice/status triggers
Check that ‘Phone (i-tiva)’ is an option for notice types.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
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>
2 years agoBug 31038: Fix price formating in cashup summary
Martin Renvoize [Fri, 24 Jun 2022 10:36:32 +0000 (11:36 +0100)]
Bug 31038: Fix price formating in cashup summary

This patch uses the existing format_price JS include to format prices in
the cashup summary modal

Test plan
1) Create some transactions and a cashup
2) View the cashup summary modal and confirm amounts are not nicely
   formatted
3) Apply patch
4) Confirm amounts in cashup summary modals are now nicely formatted

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>
2 years agoBug 29050: (follow-up) Replace & with and
David Nind [Fri, 8 Jul 2022 11:10:34 +0000 (11:10 +0000)]
Bug 29050: (follow-up) Replace & with and

See the terminology list https://wiki.koha-community.org/wiki/Terminology

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 29050: Added a punctuation between renewal messages
Nisha Dahya [Thu, 7 Jul 2022 23:31:38 +0000 (23:31 +0000)]
Bug 29050: Added a punctuation between renewal messages

Test plan:

1. First step is to go to administration > then system preferences
2. Set unseenrenewal to "allow"
3. Go to administatrion > circulation and fines rule
4. Set unseenrenewals count to any number
5. Check out an item to a patron and go to the checkouts tab
6. Renew the item
7. Notice that the renewal messages have no seperation
8. Apply the patch
9. Notice there is now a "&" in the spacing between renewal messages

Sponsored-by: Catalyst IT
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31122: Terminology - Replace occurences of 'Notices & slips' with 'Notices and...
David Nind [Fri, 8 Jul 2022 12:25:01 +0000 (12:25 +0000)]
Bug 31122: Terminology - Replace occurences of 'Notices & slips' with 'Notices and slips'

Replace occurences of 'Notices & slips' with 'Notices and slips'
(replacing '&' and '&amp' with 'and'), as per the terminology
guidelines.

See the terminology list:
https://wiki.koha-community.org/wiki/Terminology

Test plan:
1. Find occurrences of 'Notices & slips':
   - git grep 'Notices &amp; slips' -- :^misc/translator/po
   - git grep 'Notices & slips'
2. Review places in the staff interface where 'Messages & slips' is
   displayed:
   - Tools home page
   - Tools > Notices & slips: page title and breadcrumb
   - Other breadcrumbs:
     . Tools > Notices & slips > New notice > [select any module]
     . Tools > Notices & slips > [select Edit for any notice]
     . Tools > Notices & slips > [select Delete for any notice]
3. Review other occurences:
   . The cron job description for misc/cronjobs/holds/holds_reminder.pl:
     misc/cronjobs/holds/holds_reminder.pl -man (scroll down to the
     description)
   . The TalkingTech README file:
     vi misc/cronjobs/thirdparty/TalkingTech.README
4. Apply the patch.
5. Re-run the grep queries from step 1 - no occurences are now found.
6. Review places where 'Notices & slips' was found in steps 2 and 3 -
   these should all be replaced with 'Notices and slips' and should
   read correctly.
7. Sign off!

Alernative: review the diff for the patch and check that occurences of
'&amp' and '&' are replaced with 'and' and the updated text reads
correctly.

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>
2 years agoBug 31067: Fixing missing permission check
Florian Bontemps [Wed, 29 Jun 2022 15:18:17 +0000 (15:18 +0000)]
Bug 31067: Fixing missing permission check

This patch just fixes a missing permission on the intranet main page. Currently, the Additional Content modules allows people to edit, modify or create new additional content just by checking if they have any tool permission at all, and not the right one.

To test:
1 - From the staff client, create a news article for the intranet.
2 - Create (or use) an additional staff patron, giving them the necessary permissions to access the intranet, but no tool permission.
3 - Using another browser (or incognito mode), log on the intranet page with your new staff account, you should be able to see the news content, but not edit or delete it. That's the expected behavior.
4 - From your main admin account, give your test account the edit_additional_contents permission.
5 - Your test account should now be able to edit/delete the news content. This is also expected behavior.
6 - Using the main account again, remove this time the edit_additional_contents but add any other subtool permission (edit_calendar is a good one for instance)
7 - Repeat step 5 and confirm that your test account can still edit or delete the news content. This shouldn't happen.
8 - Apply patch
9 - Repeat steps 4-6, and confirm that your test account can now only edit or delete news content if they have the edit_additional_contents permission enabled.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30769: Typo fix in request.tt
Nick Clemens [Tue, 28 Jun 2022 10:06:57 +0000 (10:06 +0000)]
Bug 30769: Typo fix in request.tt

This patch fixes a small typo at
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt:574

To test:
1 - Set item-level_itypes in administrative preferences to
    bibliographic record
2 - Navigate to /reserve/request.pl in admin interface
3 - Notice that the typo is there in hold details
4 - Apply Patch
5 - Typo is fixed

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 31001: Fix "CGI::param called in list context" warning in basket.pl
Petro Vashchuk [Tue, 21 Jun 2022 13:02:51 +0000 (16:02 +0300)]
Bug 31001: Fix "CGI::param called in list context" warning in basket.pl

CGI param basketno should be explicitly scalar,
or else error log gets flooded with this warning:

AH01215: CGI::param called in list context from
/home/vagrant/kohaclone/acqui/basket.pl line 175, this can lead to
vulnerabilities. See the warning in "Fetching the value or values of a
single named parameter" at /usr/share/perl5/CGI.pm line 412.

This patch fixes it by working with it in a scalar context.
The functionality still remains the same but warning doesn't flood
error log.

To reproduce:
1. Head over to the acquisitions page.
2. Pick existing vendor with email contact info or create a new one.
3. Create a new basket or use existing one, and if it doesn't have
any orders, add a new order to it.
4. Use the "E-mail order" button to send order.
5. Check the error log and find the upper mentioned warning.
(Note: if you're going to test this more than once, you might need
to restart your Plack in order for this warning to get added to your
log file again, reasons of that is that the authors of CGI.pm decided
to "warn only once")
6. Apply the patch.
7. Use the "E-mail order" button again, ensure that the same warning
doesn't get added to the log file again.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30976: Display biblio's cover images first
Jonathan Druart [Thu, 16 Jun 2022 10:33:31 +0000 (12:33 +0200)]
Bug 30976: Display biblio's cover images first

If one add cover images at item's level, then biblio level, the cover images
of the items are displayed first on the main "cover slider" at the top of the page.
We should displayed biblio cover images first, then the ones for the items.

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>
2 years agoBug 30903: (follow-up) Fix error message class
Fridolin Somers [Mon, 20 Jun 2022 21:23:32 +0000 (11:23 -1000)]
Bug 30903: (follow-up) Fix error message class

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>
2 years agoBug 30903: Fix UI glitch on the quotes upload view
Jonathan Druart [Tue, 7 Jun 2022 13:57:35 +0000 (15:57 +0200)]
Bug 30903: Fix UI glitch on the quotes upload view

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
2 years agoBug 30903: Fix POST /quote
Jonathan Druart [Tue, 7 Jun 2022 13:56:59 +0000 (15:56 +0200)]
Bug 30903: Fix POST /quote

quote_id should not be required

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
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>
2 years agoBug 31108: rename ./t/00-check-atomic-updates.pl extension to *.t
Mason James [Wed, 6 Jul 2022 10:54:55 +0000 (22:54 +1200)]
Bug 31108: rename ./t/00-check-atomic-updates.pl extension to *.t

to test...

1/ run prove, test is not run :(
 prove ./t | grep 00-check-atomic-updates.pl | wc -l
 0

2/ apply patch

3/ run prove, test is run :)
 prove ./t | grep 00-check-atomic-updates.t | wc -l
 2

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: (QA follow-up) Fix TestBuilder.t
Martin Renvoize [Wed, 6 Jul 2022 15:03:30 +0000 (16:03 +0100)]
Bug 30275: (QA follow-up) Fix TestBuilder.t

This patch adds 'CheckoutRenewal.checkout_id' to the list of non-foreign
key relations found in _should_be_fk.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 23991: Don't display empty div if no suggestions exist
Jonathan Druart [Wed, 6 Jul 2022 09:30:13 +0000 (11:30 +0200)]
Bug 23991: Don't display empty div if no suggestions exist

If no suggestions exist we should not display an empty tab div

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24010: DBIC update
Tomas Cohen Arazi [Tue, 5 Jul 2022 17:45:47 +0000 (14:45 -0300)]
Bug 24010: DBIC update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 21903: (follow-up) update documentation
Marion Durand [Mon, 20 Dec 2021 11:07:47 +0000 (11:07 +0000)]
Bug 21903: (follow-up) update documentation

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 21903: (follow-up) koha-dump can export uploaded and temporary uploaded files
Marion Durand [Thu, 21 Oct 2021 08:00:21 +0000 (08:00 +0000)]
Bug 21903: (follow-up) koha-dump can export uploaded and temporary uploaded files

Minor improvment on display.
Solve the error message if the folder for uploaded temp files
doesn't exist.

Sponsored-by: Orex
Test plan:
- Apply the patch
- Try using koha-dump without any option
- Try using koha-dump with --uploaded_files
- Try using koha-dump with --uploaded_temp_files
- Try using koha-dump with both of the options above

Expected results: the .tar.gz dump will include uploaded and/or temporary
uploaded files if requested.
Change message and solve the error message if no temporary folder

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 21903: koha-dump can export uploaded and temporary uploaded files
Matthias Meusburger [Wed, 10 Apr 2019 09:38:45 +0000 (11:38 +0200)]
Bug 21903: koha-dump can export uploaded and temporary uploaded files

Sponsored-by: Orex
Test plan:
 - Apply the patch
 - Try using koha-dump without any option
 - Try using koha-dump with --uploaded_files
 - Try using koha-dump with --uploaded_temp_files
 - Try using koha-dump with both of the options above

Expected results: the .tar.gz dump will include uploaded and/or temporary
uploaded files if requested.

Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24865: DBRev 22.06.00.013
Tomas Cohen Arazi [Tue, 5 Jul 2022 14:41:34 +0000 (11:41 -0300)]
Bug 24865: DBRev 22.06.00.013

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24865: (QA follow-up) Remove hardcoded notice name from protected_letters
Marcel de Rooy [Tue, 19 Apr 2022 11:48:14 +0000 (11:48 +0000)]
Bug 24865: (QA follow-up) Remove hardcoded notice name from protected_letters

If the letter has been removed, fall back to itemnumber/due date. (Title is
no longer fetched.) We may assume that the notice is present.

Note: The option to 'protect' a notice may need some more thought. Perhaps
it needs to be an attribute on itself.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested by deleting notice, running fines again.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24865: Customize the Accountlines Description
Kyle Hall [Thu, 17 Feb 2022 14:23:28 +0000 (09:23 -0500)]
Bug 24865: Customize the Accountlines Description

It would be great if we could customize what information was added to the "Description of charges" field when a fine was made so data could be stored even when the item is deleted.

Test Plan:
1) Create an overdue checkout that will get a fine
2) Run fines.pl
3) Note the description for the fine
4) Delete the fine from the database
5) Apply this patch
6) Run updatedatabase.pl
7) Restart all the things!
8) Run fines.pl
9) Note the description of the fine is unchanged
10) Delete the fine again
11) Browse to Slips & Notices
12) Edit the new notice OVERDUE_FINE_DESC
    You will have access to the objects checkout, item, and borrower
13) Run fines.pl
14) Note your new description was used

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24010: DBRev 22.06.00.012
Tomas Cohen Arazi [Tue, 5 Jul 2022 14:11:54 +0000 (11:11 -0300)]
Bug 24010: DBRev 22.06.00.012

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24010: (QA follow-up) Correct COMMENT syntax
Tomas Cohen Arazi [Tue, 5 Jul 2022 14:08:16 +0000 (11:08 -0300)]
Bug 24010: (QA follow-up) Correct COMMENT syntax

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24010: DB Changes
Jonathan Druart [Fri, 22 Nov 2019 11:33:41 +0000 (12:33 +0100)]
Bug 24010: DB Changes

Amended-patch: adjusted to new atomic update format

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 24010: Number of issues to display to staff accepts non-integer values
Owen Leonard [Fri, 13 May 2022 15:14:26 +0000 (15:14 +0000)]
Bug 24010: Number of issues to display to staff accepts non-integer values

This patch modifies the subscription entry form so that it will perform
a check on the staffdisplaycount and opacdisplaycount fields before
proceding to the second step. It verifies that the values are numeric.

The changes are made in the style of the existing form validation, which
should be rewritten to either use the validation plugin or to peform
checks in a way that all checks are run before warning the user.
However, this smaller change will work in the meantime.

To test, apply the patch and go to Serials -> New subscription.

- Fill out the form with at least the required fields, but put something
  other than a number if the "Number of issues to display to staff" and
  "Number of issues to display to the public" with non-numeric characters.
- When you click the "Next" button you should get an error message,
  "Number of issues to display to staff must be a number."
- Correct the issues to display to staff field and submit again.
- You should get a different error message, "Number of issues to display
  to the public must be a number."
- Correct this field and you should be able to proceed to the next step.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30716: Add collection to cn_browser results
Lucas Gass [Fri, 6 May 2022 21:50:05 +0000 (21:50 +0000)]
Bug 30716: Add collection to cn_browser results

To test:
1. Go to MARC bibliographic framework, pick a framework and go to 952, subfield "o". Turn the cn_browser plugin on.
2. Pick or create an item in that framework, edit that item.
3. TO the right of the 952$o notice the "...". Click that start the call number browser.
4. Notice there is no column for collection.
5. Apply patch, restart_all
6. Notice there is now a column for with the items collection.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30567: Fix price formatting when adding a manual invoice with CurrencyFormat FR
Katrin Fischer [Mon, 6 Jun 2022 21:34:26 +0000 (21:34 +0000)]
Bug 30567: Fix price formatting when adding a manual invoice with CurrencyFormat FR

In input fields we always use the decimal . while the display format
uses the decimal separtor definded by CurrencyFormat. When adding a
manual invoice without this patch, the amount is shown with comma, but
it should be . in the input field.

To test:
1- Go in Administration->Debit types
2- Click on New debit type
3- Fill the form:
   Code: USEDBOOK
   Default amount: 0.50
   Description: Used book
   Can be manually invoiced: Yes
4- Save
5- Go to any patron account
6- Go to the "Accounting" tab
7- Click on "Create manual invoice"
8- Fill the form
9- Choose the created debit (Used book)
10- Verify that the format is incorrect (0,50 instead of 0.50)
11- Apply the patch
12- Verify the amount is now using the correct format

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30566: Incorporate link handling in OPAC's biblio-title include
Owen Leonard [Tue, 19 Apr 2022 15:31:41 +0000 (15:31 +0000)]
Bug 30566: Incorporate link handling in OPAC's biblio-title include

This patch modifies the biblio-title include so that it can be used to
link to the bibliographic record using the default biblio view.

On pages where the biblio-title include was wrapped in an anchor tag, a
link parameter is added: [% INCLUDE 'biblio-title.inc' link=> 1 %]

To test, apply the patch and view the following pages in the OPAC to
confirm that titles are displayed correctly and that the link to the
bibliographic record is correct:

- Log in to the OPAC: On the "your summary" page, check checkouts,
  overdues, holds, and article requests.
- Check the "your holds history" page.
- Locate a bibliographic record and click "Save to your lists."
  In the popup, the title should be displayed correctly without a link.
- Place a hold, and check the hold confirmation page.
- Check the "Recent comments" page.
- Locate a record which has a local cover image attached, and view the
  image.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30990: Fix DefaultHoldPickupLocation system preference description
Katrin Fischer [Fri, 17 Jun 2022 20:20:08 +0000 (22:20 +0200)]
Bug 30990: Fix DefaultHoldPickupLocation system preference description

Changes:
* branch to library
* staff client to staff interface
* adds an ending .

To test:
- Compare system preference descrpition before and after the
  patch was applied.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: (follow-up) Fix tests count
Tomas Cohen Arazi [Tue, 5 Jul 2022 12:53:29 +0000 (09:53 -0300)]
Bug 30275: (follow-up) Fix tests count

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: DBRev 22.06.00.011
Tomas Cohen Arazi [Tue, 5 Jul 2022 12:50:05 +0000 (09:50 -0300)]
Bug 30275: DBRev 22.06.00.011

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: Unit Tests for Checkouts::Renewal
Martin Renvoize [Thu, 28 Apr 2022 12:13:24 +0000 (13:13 +0100)]
Bug 30275: Unit Tests for Checkouts::Renewal

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: Add Unit test for renewals relation
Martin Renvoize [Thu, 28 Apr 2022 10:55:32 +0000 (11:55 +0100)]
Bug 30275: Add Unit test for renewals relation

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: Add unit tests for AddRenewal addition
Martin Renvoize [Thu, 28 Apr 2022 10:35:54 +0000 (11:35 +0100)]
Bug 30275: Add unit tests for AddRenewal addition

This patch adds a test for the AddRenewal addition that creates Renewal
lines.

Test plan
1) Run the unit tests and confirm it passes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: (follow-up) Drop renewer_id constraint
Martin Renvoize [Thu, 28 Apr 2022 08:28:50 +0000 (09:28 +0100)]
Bug 30275: (follow-up) Drop renewer_id constraint

This patch fixes some unit tests by ensureing we set a valid userid for
mock userenv setting so that the foreign key constraint doesn't fail and
it also removes the exception class and check for renewer_id from the
store method as, for example with autorenewals, the renewal may not have
been triggered by a actual user.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: (QA follow-up) Rename columns to match API
Tomas Cohen Arazi [Wed, 27 Apr 2022 20:07:01 +0000 (17:07 -0300)]
Bug 30275: (QA follow-up) Rename columns to match API

This patch performs the following column renames:

* id => renewal_id
* issue_id => checkout_id

The idea is that no translation is needed for the API, and also, being a
new table, we can educate the users into the 'to be' terminology we are
leaning towards, instead of having them learn one naming to create
reports and then need to translate them once we normalize things in a
future.

That said, this is simple to review.

Apply this patch and repeat the test plan.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: Add renewals relation to Koha::Old::Checkout
Martin Renvoize [Tue, 26 Apr 2022 14:56:45 +0000 (15:56 +0100)]
Bug 30275: Add renewals relation to Koha::Old::Checkout

Add the new 'renewals' relation to Koha::Old::Checkout to return a
list of Koha::Checkouts::Renewal objects.

We also add the same relation to the OldIssue schema inline.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: (follow-up) Rebase fixes
Martin Renvoize [Tue, 26 Apr 2022 14:33:53 +0000 (15:33 +0100)]
Bug 30275: (follow-up) Rebase fixes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: Add basic unit test for fetching renewals
Martin Renvoize [Fri, 18 Mar 2022 14:10:44 +0000 (14:10 +0000)]
Bug 30275: Add basic unit test for fetching renewals

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: Fix checkouts.t unit test
Martin Renvoize [Fri, 18 Mar 2022 13:57:32 +0000 (13:57 +0000)]
Bug 30275: Fix checkouts.t unit test

We no longer require a mocked userenv for these tests to pass, we're
setting the userenv in api auth now. The mock just serves to break tests
for the renew method now that AddRenewal required a correctly set
userenv for 'number'.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: Add alias to create renewal in api routes
Martin Renvoize [Fri, 11 Mar 2022 16:17:16 +0000 (16:17 +0000)]
Bug 30275: Add alias to create renewal in api routes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: Add `/api/v1/checkouts/{checkout_id}/renewals`
Martin Renvoize [Fri, 11 Mar 2022 14:05:25 +0000 (14:05 +0000)]
Bug 30275: Add `/api/v1/checkouts/{checkout_id}/renewals`

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: Add renewals relation to Koha::Checkout
Martin Renvoize [Fri, 11 Mar 2022 15:39:43 +0000 (15:39 +0000)]
Bug 30275: Add renewals relation to Koha::Checkout

Add the new 'renewals' relation to Koha::Checkout to return a list of
Koha::Checkouts::Renewal objects.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: Add 'renewals' relation to Issue Schema
Martin Renvoize [Fri, 11 Mar 2022 14:05:48 +0000 (14:05 +0000)]
Bug 30275: Add 'renewals' relation to Issue Schema

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: renewals_count DBIC Update
Martin Renvoize [Fri, 11 Mar 2022 15:22:01 +0000 (15:22 +0000)]
Bug 30275: renewals_count DBIC Update

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: Rename issues.renewals to issues.renewals_count
Martin Renvoize [Fri, 11 Mar 2022 15:04:06 +0000 (15:04 +0000)]
Bug 30275: Rename issues.renewals to issues.renewals_count

Rename the issues.renewals field to renewals_count to prevent a method
name collision with the new relation accessor introduced by this
patchset.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: Add Koha::Objects for Renewals
Martin Renvoize [Fri, 11 Mar 2022 13:32:20 +0000 (13:32 +0000)]
Bug 30275: Add Koha::Objects for Renewals

Add Koha::Checkouts::Renewals|Renewal classes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: DBIC Schema Additions
Martin Renvoize [Fri, 11 Mar 2022 13:31:53 +0000 (13:31 +0000)]
Bug 30275: DBIC Schema Additions

Add checkout and old_checkout relations to CheckoutRenewal schema and
mark 'seen' as a boolean.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: Record renewals
Martin Renvoize [Fri, 11 Mar 2022 16:02:47 +0000 (16:02 +0000)]
Bug 30275: Record renewals

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: DBIC Schema Changes
Martin Renvoize [Fri, 11 Mar 2022 13:07:59 +0000 (13:07 +0000)]
Bug 30275: DBIC Schema Changes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2 years agoBug 30275: Generated kohastructure.sql
Martin Renvoize [Fri, 11 Mar 2022 13:04:24 +0000 (13:04 +0000)]
Bug 30275: Generated kohastructure.sql

This kohastructure update was generated using `koha-dump --schema-only`
in koha-testing-docker once the atomicupdate had been run against the
previous atomicupdate patch.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>