]> git.koha-community.org Git - koha.git/log
koha.git
4 years agoBug 19353: Ability to use xsl template on marc21 and marcxml metadataprefixes in...
Josef Moravec [Tue, 7 Nov 2017 11:51:20 +0000 (11:51 +0000)]
Bug 19353: Ability to use xsl template on marc21 and marcxml metadataprefixes in OAI provider

Test plan:
0) apply the patchset
1) setup oai server with oaiconf file defining xsl_file for metadata
format marcxml or marc21
2) play with your oai and confirm that records are transformed as
expected
3) prove t/db_dependent/OAI/Server.t

Signed-off-by: Martin Šťastný <martin.stastny@teamlibrary.cz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19353: Add test
Josef Moravec [Mon, 4 Dec 2017 02:10:31 +0000 (02:10 +0000)]
Bug 19353: Add test

Signed-off-by: Martin Šťastný <martin.stastny@teamlibrary.cz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19382: DBRev 20.06.00.050
Jonathan Druart [Wed, 14 Oct 2020 12:37:24 +0000 (12:37 +0000)]
Bug 19382: DBRev 20.06.00.050

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19382: Adjust comment in test
Jonathan Druart [Wed, 14 Oct 2020 12:19:27 +0000 (14:19 +0200)]
Bug 19382: Adjust comment in test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19382: (QA follow-up) Fix typos
Kyle M Hall [Tue, 13 Oct 2020 17:42:58 +0000 (13:42 -0400)]
Bug 19382: (QA follow-up) Fix typos

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19382: (follow-up) Alternate tests
Martin Renvoize [Thu, 10 Sep 2020 10:04:18 +0000 (11:04 +0100)]
Bug 19382: (follow-up) Alternate tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19382: (QA follow-up) Throw exception if only_this_guarantor is set for a non...
Kyle M Hall [Thu, 3 Sep 2020 18:25:05 +0000 (14:25 -0400)]
Bug 19382: (QA follow-up) Throw exception if only_this_guarantor is set for a non-guarantor

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19382: Add blocking of ability to checkout on circulation.pl
Kyle M Hall [Fri, 24 Jul 2020 13:00:12 +0000 (09:00 -0400)]
Bug 19382: Add blocking of ability to checkout on circulation.pl

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19382: Add ability to block guarantees based on fees owed by guarantor and other...
Kyle M Hall [Fri, 10 Jan 2020 16:59:56 +0000 (11:59 -0500)]
Bug 19382: Add ability to block guarantees based on fees owed by guarantor and other guarantees

Some libraries would like to not only block the circulation of a guarantor based on fines owed by guarantees, but would also like to block circulation for all guarantees as well. Basically, if a family as a whole reaches a certain threshold of fines, the entire family will be blocked from checking out items.

Test Plan:
1) Apply this patch
2) Set NoIssuesChargeGuarantorsWithGuarantees to $14
3) Create a family of four ( 2 guarantors, 2 guarantees ) where the parents guarantee both children
4) Give 3 of the 4 a $5 fine
5) None of them should be able to check out items

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23895: Move installer file into the mandatory directory
Jonathan Druart [Tue, 16 Jun 2020 10:56:56 +0000 (12:56 +0200)]
Bug 23895: Move installer file into the mandatory directory

Prior to this patch we had a confusing situation, mandatory files were
in both installer/data/mysql and installer/data/mysql/mandatory
To make things clearer this patch move them all into the mandatory
subdir.
However kohastructure.sql stay in the "root" directory.

Test plan:
1. Drop and recreate your DB and use the installer to populate the DB
2. Use the merge request code from misc4dev to test the reset_all alias
3. Still with the merge request from misc4dev checkout master (you can
also try 19.11 and/or 19.05) and reset_all again
=> All the data from the SQL mandatory files must have been correctly
inserted into the DB

https://gitlab.com/koha-community/koha-misc4dev/-/issues/46

Note that this patch also remove the x flag for subtag_registry.sql

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24899: (follow-up) Add markup comments
Owen Leonard [Thu, 25 Jun 2020 11:34:25 +0000 (11:34 +0000)]
Bug 24899: (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 interface or functionality.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24899: Reindent record matching rules template
Owen Leonard [Wed, 18 Mar 2020 19:14:40 +0000 (19:14 +0000)]
Bug 24899: Reindent record matching rules template

This patch reindents the template the record matching rules template.
The only non-whitespace changes where lines were combined or split.

The diff using the '-w' flag to ignore whitespace should
highlight only moved lines.

Test that functionality is unaffected: Administration -> Record matching
rules.

Test adding, editing, and deleting record matching rules. Test adding,
editing, and deleting match points and match checks. Confirm that
changes are saved correctly.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 25354: Clean up JavaScript markup in cataloging plugin scripts
Owen Leonard [Sun, 3 May 2020 01:04:41 +0000 (01:04 +0000)]
Bug 25354: Clean up JavaScript markup in cataloging plugin scripts

This patch makes some minor changes to the JavaScript generated by the
cataloging plugins: <script> "type" attribute removed; single-line
comments converted to multi-line style; obsolete //<![CDATA[ marks
removed.

These changes help the JavaScript conform to current coding guidelines.
The comment style change allows for whitespace in the scripts to be
collapsed by the Template::Toolkit "collapse" filter.

Since the patch makes small cosmetic changes to many files it may be
easiest to test this patch by visually inspecting the changes.

It's also simple to test some plugins which are enabled by default (at
least in MARC21): In the basic MARC editor, the leader, 007, and 008. In
the item editor, subfield d - Date acquired.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26327: Add exec flag on .t file
Jonathan Druart [Wed, 14 Oct 2020 09:49:29 +0000 (11:49 +0200)]
Bug 26327: Add exec flag on .t file

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26327: (QA follow-up) Fix colspan in boraccount.tt
Tomas Cohen Arazi [Fri, 18 Sep 2020 19:40:01 +0000 (16:40 -0300)]
Bug 26327: (QA follow-up) Fix colspan in boraccount.tt

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26327: (follow-up) Add transacting library to the transactions tab
Tomas Cohen Arazi [Wed, 2 Sep 2020 13:06:46 +0000 (10:06 -0300)]
Bug 26327: (follow-up) Add transacting library to the transactions tab

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26327: Add to columns settings
Tomas Cohen Arazi [Mon, 31 Aug 2020 20:10:50 +0000 (17:10 -0300)]
Bug 26327: Add to columns settings

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26327: Include transacting library in fines
Tomas Cohen Arazi [Mon, 31 Aug 2020 19:35:10 +0000 (16:35 -0300)]
Bug 26327: Include transacting library in fines

This patch introduces a new column on the fines table to display the
checkout library when the fine is tied to a checkout.

To test:
1. Have an overdue item that generated a fee
2. Look at the 'Accounting' tab, 'Make a payment'
=> FAIL: There's no information about the library
3. Apply this patch
4. Restart all
5. Reload and repeat 2
=> SUCCESS: There's a column with the library name!
6. Identify the issue_id for the mentioned checkout and:
   $ koha-mysql kohadev
   > UPDATE old_issues SET branchcode='TOM' WHERE issue_id=11;
  (i.e. set the branchcode to an invalid value, to emulate a deleted
   branch).
7. Reload
=> SUCCESS: It doesn't explode, it doesn't display a library name.
8. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26327: Add ->library method to Koha::*Checkout
Tomas Cohen Arazi [Mon, 31 Aug 2020 18:25:05 +0000 (15:25 -0300)]
Bug 26327: Add ->library method to Koha::*Checkout

This patch adds a 'library' relationship to the Issue and OldIssue
resultsets, to be used in the Koha::*Checkout classes corresponding
accessors. This way we will be able to eventually embed and filter on
library fields on the API.

The ->library method is then added to the classes-

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Old.t t/db_dependent/Koha/Checkout.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26456: (follow-up) Add markup comments
Owen Leonard [Mon, 14 Sep 2020 15:21:55 +0000 (15:21 +0000)]
Bug 26456: (follow-up) Add markup comments

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

Also changed: Some form hints have been wrapped in <div class="hint"> to
make it consistent with other pages.

This patch should have no effect on functionality.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26456: Reindent MARC subfield structure template
Owen Leonard [Mon, 14 Sep 2020 15:09:26 +0000 (15:09 +0000)]
Bug 26456: Reindent MARC subfield structure template

This patch reindents the MARC subfield structure template.
The only non-whitespace changes where lines were combined or split.

The diff using the '-w' flag to ignore whitespace should
highlight only moved lines.

Test that functionality is unaffected: Administration -> MARC
bibliographic framework -> MARC structure -> Edit subfields..

Test adding, editing, and deleting subfields. Confirm that changes are
saved correctly.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26655: Add ARIA Labels to OPAC Lists
Henry Bolshaw [Sat, 10 Oct 2020 00:24:36 +0000 (00:24 +0000)]
Bug 26655: Add ARIA Labels to OPAC Lists

This patch adds ARIA labels to opac-shelves.tt
so that checkboxes for list items are meaningful
to users of screenreaders and other assistive
technology.

Test Plan:
1/ Open an OPAC list
2/ Inspect the checkbox for a list item
3/ Confirm the aria-label is missing
4/ Apply the patch
5/ Refresh the Opac list page
6/ Inspect the checkbox for a list item
7/ Note that there is now an aria-label with a
meaningful description
8/Sign off

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20804: Add support for "days" to the timeout syspref
Jonathan Druart [Thu, 30 Jul 2020 13:15:46 +0000 (15:15 +0200)]
Bug 20804: Add support for "days" to the timeout syspref

If the timeout syspref did not contain an integer, or was not matching
integer.'d|D', then it "fallback" to 0

We can easily add support for hours and fallback to 600 if the value is
not correct.
It will prevent the session to timeout immediately

Test plan:
0. Do not apply the patches
1. Fill the timeout syspref with "5h"
2. Login
3. Click somewhere
=> Notice that the session timed out
4. Apply the patches, restart_all
5. Login
6. Click somewhere
=> You have 5 hours to enjoy Koha
7. Fill the pref with an incorrect value ("5x" for instance)
8. Logout, login
9. There is a warning in the log, and you have 10 minutes (600 secondes) to enjoy Koha

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 20804: Add tests
Jonathan Druart [Thu, 30 Jul 2020 13:15:36 +0000 (15:15 +0200)]
Bug 20804: Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26018: Fix frameworks errors with subfields in wrong tab
Katrin Fischer [Sat, 18 Jul 2020 12:52:06 +0000 (14:52 +0200)]
Bug 26018: Fix frameworks errors with subfields in wrong tab

All subfields for a MARC21 field should always be in the same tab.
There were some mistakes found by the "MARC bibliographic framework
test" this fixes.

Before you apply the patch:
- Check the "MARC bibliographic framework test" page
- Ideally you should see the "wrong tab" mistakes
- Reset your db (reset_all) or drop your db and run the web installer
- Verify the page no longer points out any issues

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 9118: (QA follow-up) Fix spelling on "To Date :"
Katrin Fischer [Sun, 4 Oct 2020 03:23:24 +0000 (03:23 +0000)]
Bug 9118: (QA follow-up) Fix spelling on "To Date :"

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 9118: Do not show option to create exception on range for unique holiday
Emmi Takkinen [Mon, 5 Oct 2020 08:19:44 +0000 (11:19 +0300)]
Bug 9118: Do not show option to create exception on range for unique holiday

When an unique holiday is edited one can choose
option 'Generate exceptions on a range of dates.'
Exceptions are meant to be used with repeating
holidays and it makes no sense to have option to
be able to create one for an unique holiday.

This patch hides exception on range option when
editing an unique holiday. Also fixes a minor
spelling error.

To test:
1. Create unique holiday and edit it.
2. Note that option to create exception on range is shown.
3. Apply patch.
=> Option is now hidden.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26389: Add auto renewal error to opac-user.tt
Lucas Gass [Sat, 5 Sep 2020 05:26:47 +0000 (05:26 +0000)]
Bug 26389: Add auto renewal error to opac-user.tt

Test plan:
1 Check out an auto-renewing item to a patron
2 confirm in circ rules that the rule allows at least one renewal
3 log into OPAC, confirm your summary shows item is scheduled for auto-renewal
4 click Renew All
5 Get note "Please note: Your loan renewal failed because of the following reason(s):" with no following reasons
6 Apply patch
7 Repeat 3-5
8 See appropriate error

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26429: Show correct expiration date at the request.pl
Emmi Takkinen [Fri, 25 Sep 2020 10:52:06 +0000 (13:52 +0300)]
Bug 26429: Show correct expiration date at the request.pl

Bug 25789 changed holds tables expriration input class as "datepickerto".
This results to past expiration date to be displayed as tomorrows date.
Class "futuredate" should have been used instead.

To test:

1. Have waiting hold with expiration date in past (e.g 24.9)
2. Observe that waiting reserves table displays correct expiration date
3. At the request.pl page expiration date is however displayed as 26.9
=> Apply patch
4. Confirm that expiration date at the request.pl is now 24.9

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26538: Display cities list before input text
Fridolin Somers [Fri, 25 Sep 2020 15:08:38 +0000 (17:08 +0200)]
Bug 26538: Display cities list before input text

In patron creation or edition actually the city field is displayed with input text then cities list.
I propose to display cities list first since it is more likely used.

Test plan :
1) Create some cities
2) Open patron creation form
3) Check you see for each city field : cities list, text "or enter", text input
4) Delete all cities
5) Open patron creation form
6) Check you see for each city field : only text input

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26576: Subfield descriptions on authority detail view are cut off
Owen Leonard [Wed, 30 Sep 2020 15:46:45 +0000 (15:46 +0000)]
Bug 26576: Subfield descriptions on authority detail view are cut off

This patch corrects the authority detail view on the staff interface so
that subfield descriptions are not longer output as truncated strings.

For instance, before this patch the subfield description for 035$a would
be "System control numbe"

After the patch it should be "System control number."

Based on the assumption that the subfield descriptions were truncated at
some point for readability reasons I've also made some style changes
intended to improve the readability of the page.

To test, apply the patch and go to Authorities.

- Search for and view the details for an authority.
- On the authority detail page, confirm that subfield descriptions are
  shown in full.
- Confirm that the style changes look good and make the data more
  readable.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26589: Fix t/db_dependent/OAI/Sets.t failing when OAI-PMH:AutoUpdateSets is enabled
Alex Buckley [Tue, 29 Sep 2020 05:53:34 +0000 (05:53 +0000)]
Bug 26589: Fix t/db_dependent/OAI/Sets.t failing when OAI-PMH:AutoUpdateSets is enabled

Test plan:
1. Check the OAI-PMH:AutoUpdateSets syspref is disabled
2. Run t/db_dependent/OAI/Sets.t tests and confirm tests pass
successfully
3. Enabled the OAI-PMH:AutoUpdateSets syspref
4. Repeat step 2 and confirm the tests fail

5. Apply this patch and restart plack: sudo koha-plack --restart
<instance>
6. Repeat step 2 and confirm the tests now pass
7. Disable the OAI-PMH:AutoUpdateSets syspref and repeat step 2 and
confirm tests still pass

Sponsored-By: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26675: (bug 23463 follow-up) Fix typo onloadn vs onloan
Jonathan Druart [Wed, 14 Oct 2020 09:17:46 +0000 (11:17 +0200)]
Bug 26675: (bug 23463 follow-up) Fix typo onloadn vs onloan

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26529: (follow-up) Remove warning
Jonathan Druart [Mon, 12 Oct 2020 12:48:40 +0000 (14:48 +0200)]
Bug 26529: (follow-up) Remove warning

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: (follow-up 2) DBIC schema changes
Jonathan Druart [Mon, 12 Oct 2020 12:47:30 +0000 (14:47 +0200)]
Bug 26145: (follow-up 2) DBIC schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: Add exec flag on .t file
Jonathan Druart [Mon, 12 Oct 2020 10:36:21 +0000 (12:36 +0200)]
Bug 26145: Add exec flag on .t file

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: (follow-up) DBIC schema changes
Jonathan Druart [Mon, 12 Oct 2020 10:34:43 +0000 (12:34 +0200)]
Bug 26145: (follow-up) DBIC schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: Compiled CSS
Jonathan Druart [Mon, 12 Oct 2020 09:28:16 +0000 (11:28 +0200)]
Bug 26145: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: DBIC schema changes
Jonathan Druart [Mon, 12 Oct 2020 09:26:51 +0000 (11:26 +0200)]
Bug 26145: DBIC schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: DBRev 20.06.00.049
Jonathan Druart [Mon, 12 Oct 2020 09:13:18 +0000 (09:13 +0000)]
Bug 26145: DBRev 20.06.00.049

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: (QA follow-up) Add missing filters
Katrin Fischer [Fri, 25 Sep 2020 19:05:02 +0000 (19:05 +0000)]
Bug 26145: (QA follow-up) Add missing filters

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: Add the new column to the column settings yml file
Jonathan Druart [Mon, 28 Sep 2020 15:00:17 +0000 (17:00 +0200)]
Bug 26145: Add the new column to the column settings yml file

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: Correctly preserve itemnumber value
Jonathan Druart [Fri, 21 Aug 2020 16:14:50 +0000 (18:14 +0200)]
Bug 26145: Correctly preserve itemnumber value

In order to know we are dealing with the cover images of a specific item
we need to pass it though the different forms.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: Add the "Cover image" column to the table settings
Jonathan Druart [Tue, 18 Aug 2020 14:16:50 +0000 (16:16 +0200)]
Bug 26145: Add the "Cover image" column to the table settings

The new column can now be hidden by the table settings

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: Hide 'Upload image' if no CoverImage pref is set
Jonathan Druart [Tue, 18 Aug 2020 13:56:02 +0000 (15:56 +0200)]
Bug 26145: Hide 'Upload image' if no CoverImage pref is set

If LocalCoverImages AND OPACLocalCoverImages are disabled, we should not
let the ability to upload an image for the items.

We should also hide the column "cover image" in the tables

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: Fix image tag
Jonathan Druart [Tue, 18 Aug 2020 13:55:20 +0000 (15:55 +0200)]
Bug 26145: Fix image tag

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: Allow multi covers per item
Jonathan Druart [Tue, 11 Aug 2020 16:26:01 +0000 (18:26 +0200)]
Bug 26145: Allow multi covers per item

In this patch we remove the limitation of 1 cover image per item

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: Refactoring - Move C4::Images to Koha::CoverImages
Jonathan Druart [Wed, 5 Aug 2020 14:27:14 +0000 (16:27 +0200)]
Bug 26145: Refactoring - Move C4::Images to Koha::CoverImages

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: Refactoring - Rename table biblioimages to cover_images
Jonathan Druart [Wed, 5 Aug 2020 14:27:06 +0000 (16:27 +0200)]
Bug 26145: Refactoring - Rename table biblioimages to cover_images

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: Refactoring - Add tests
Jonathan Druart [Wed, 29 Jul 2020 16:29:03 +0000 (18:29 +0200)]
Bug 26145: Refactoring - Add tests

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: Display the cover image at the OPAC
Jonathan Druart [Wed, 29 Jul 2020 16:18:15 +0000 (18:18 +0200)]
Bug 26145: Display the cover image at the OPAC

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: Add the ability to upload a cover image per item
Jonathan Druart [Tue, 28 Jul 2020 19:18:20 +0000 (21:18 +0200)]
Bug 26145: Add the ability to upload a cover image per item

This patchset adds the ability to attach cover images at item level.
This commit message will explain the different patches that are
following.

The main idea is to have cover images for a given item. This is useful
for a bibliographic record linked with a subscription. Each item could
have the cover image for the serial numbers.

In this first patch there is a limitation to allow only 1 cover per
item, but a later patch will remove it. That way we will take advantage
of the recent work done to display nicely cover images (bug 25031), and
reuse it in this development (staff interface only).

In order to use a flexible and robust code, the legacy C4 code
(C4::Images) has been moved to Koha::CoverImages. Also the DB table
biblioimages has been renamed cover_images.

Test plan (for the whole patch set):
0. Turn off AllowMultipleCovers
1. Create a new bibliographic record and items
2. Attach a cover image to the bibliographic record
3. In the item list of the bibliographic detail page, you will notice a
new "Upload image" action. Select it
4. Select an image
=> Notice the new column in the item table
5. Upload another image
=> You cannot upload 2 images, you are going to replace the existing one
6. Turn on AllowMultipleCovers
7. Attach another image to the image
=> Notice the 2 images are displayed nicely, with navigation controls
8. Confirm you can view an image if you click on it and you can delete it
9. Test the OPAC view now
=> Cover image for items are displayed in the table, there is no
navigation controls here however.

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26145: DB changes - Add biblioimages.imagenumber
Jonathan Druart [Tue, 28 Jul 2020 19:13:01 +0000 (21:13 +0200)]
Bug 26145: DB changes - Add biblioimages.imagenumber

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26152: Remove the use of jquery.checkboxes plugin from serial collection page
Owen Leonard [Wed, 5 Aug 2020 17:50:39 +0000 (17:50 +0000)]
Bug 26152: Remove the use of jquery.checkboxes plugin from serial collection page

This patch removes the use of the jquery.checkboxes plugin from the
serial collection page and replaces it with custom JS.

To test, apply the patch and go to Serials.

- Locate a subscription which has multiple issues.
- View the details for that subscription.
- In the sidebar menu click the "Serial collection" link.
- On the serial collection page test the "Select all" and "Clear all"
  links at the top of each table of issues. The controls should work
  correctly and only affect the table on  that tab.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26154: Remove the use of jquery.checkboxes plugin from batch item deletion and...
Owen Leonard [Wed, 5 Aug 2020 18:53:46 +0000 (18:53 +0000)]
Bug 26154: Remove the use of jquery.checkboxes plugin from batch item deletion and modification

This patch removes the use of the jquery.checkboxes plugin from the
batch item modification and batch item deletion pages.

To test, apply the patch and go to Tools -> Batch item
modification.

 - Submit a batch of barcodes.
 - On the results page, test the "Select all" and "Clear all" controls
   at the top of the page. These should work correctly on the checkboxes
   in the table of results.
 - Test that the "Clear on loan" control still works to uncheck
   checkboxes corresponding to items which are checked out.
 - Test the "Show all columns" and "Hide all columns" checkboxes in the
   "Show/hide columns" section. These should work correctly on the
   checkboxes for showing and hiding columns in the table.
 - Go to Tools -> Batch item deletion.
 - Submit a batch of barcodes.
 - Repeat the same testing steps above (except the "Clear on loan"
   step).

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26503: Add unit tests
Katrin Fischer [Mon, 21 Sep 2020 05:52:27 +0000 (05:52 +0000)]
Bug 26503: Add unit tests

Run
  prove t/db_dependent/Acquisition.t

Verify all tests pass.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
JD Amended patch: perltidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26503: Add limit for standing orders to acq advanced search
Katrin Fischer [Mon, 21 Sep 2020 22:32:51 +0000 (00:32 +0200)]
Bug 26503: Add limit for standing orders to acq advanced search

This allows to filter on standing orders on the acq advanced search
checkbox. For this purpose a new checkbox is shown behind the order
status search option.

As both not yet ordered and standing orders have the status
'new' or partially received internally, this seems like a good
placement as it will help distinguish these cases clearly.

new + standing order = standing order, but nothing received yet
partially received + standing order = active standing order
all status + standing order = all standing orders

To test:
- Create some baskets with at least one order, some 'standing' and
  others not
- In the top toolbar choose tab Orders search > Advanced search
- Make some searches with and without the new 'Standing order' option
- Verify the right orders are found
- In the search results standing orders will now show with the
  status + (standing order).

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26519: Compiled CSS
Jonathan Druart [Mon, 12 Oct 2020 09:27:58 +0000 (11:27 +0200)]
Bug 26519: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26519: Clean up OPAC buttons with incorrect classes
Owen Leonard [Wed, 23 Sep 2020 16:14:55 +0000 (16:14 +0000)]
Bug 26519: Clean up OPAC buttons with incorrect classes

This patch makes some corrections to the OPAC templates to add the
correct classes to a few buttons which were missed during the
Bootstrap 4 upgrade, especially in cases where the buttons only appear
when JavaScript is disabled.

To test, apply the patch and rebuild the OPAC CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Locate the bibliographic record for a serial record and view the
  details. The subscription should have patron notification set.
- Under the Subscriptions tab, the "Subscribe to email notifications"
  button should look correct.
- Click to subscribe and confirm that the buttons during and after the
  process look correct.

- Perform a catalog search in the OPAC. On the search results page,
  disable JavaScript. This can be done in the browser's developer tools
  under "Settings."
- At the top of the table of search results there should be a
  correctly-styled "Go" button next to the sorting dropdown menu. It
  should work correctly.

- View the contents of a list with JavaScript disabled.
- The "Resort list" button should be correctly-styled and should work to
  submit the form.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 22343: Make the tests pass on U16
Mason James [Sat, 10 Oct 2020 01:06:28 +0000 (14:06 +1300)]
Bug 22343: Make the tests pass on U16

fix SSL tests for u16, using older Email-Sender-1.300021

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26529: Remove warning
Jonathan Druart [Mon, 12 Oct 2020 07:32:16 +0000 (09:32 +0200)]
Bug 26529: Remove warning

Use of uninitialized value $rule_value in string eq

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26604: "Generate next" button gives error on serials-collection.pl
Kyle M Hall [Fri, 2 Oct 2020 16:11:48 +0000 (12:11 -0400)]
Bug 26604: "Generate next" button gives error on serials-collection.pl

In serials-collection.pl, the line

$frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subscription->{periodicity});

causes the error

Can't use string ("13") as a HASH ref while "strict refs" in use at /usr/share/koha/lib/C4/Serials.pm line 2198.

This function call makes no sense, that subroutine always returns a list and doesn't take any parameters. I think it was meant to be GetSubscriptionFrequency which is in fact already called a few lines down.

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

Test plan:
1. Create a new subscription
  * When there is an irregular issue: Skip issue number
  * Select a frequency (not irregular)
  * Test prediction pattern and mark some "not published" (to fill the subscription.irregular DB field
2. Receive a first serial (mark it arrived, an "expected" one is created)
3. Claim the expected one
=> You have 1 arrived and 1 claimed.
It's the only way to not have an expected one and hit the else block in serials/serials-collection.pl
4. Generate next => boom

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23695: (QA follow-up) Revert 'Orginating library' option
Martin Renvoize [Fri, 9 Oct 2020 10:28:12 +0000 (11:28 +0100)]
Bug 23695: (QA follow-up) Revert 'Orginating library' option

At my request, we added an 'Originating library' option to the manual
transfers form.

However, we did not properly pass this through in the controller and I
have since discovered that my request was ill conceived/a
misunderstanding of requirements.

This patch removes the option from the template and drops the references
to it in the controller.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23852: (QA follow-up) Fix remaining call to biblio-default-view
Nick Clemens [Fri, 9 Oct 2020 10:42:31 +0000 (10:42 +0000)]
Bug 23852: (QA follow-up) Fix remaining call to biblio-default-view

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26137: Remove warnings from viewlog.pl
Jonathan Druart [Thu, 8 Oct 2020 09:33:23 +0000 (11:33 +0200)]
Bug 26137: Remove warnings from viewlog.pl

The warnings are
Use of uninitialized value $val in concatenation (.) or string at /kohadevbox/koha/C4/Templates.pm line 138.
Problem = a value of  has been passed to param without key at /kohadevbox/koha/C4/Templates.pm line 138.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26529: DBRev 20.06.00.048
Jonathan Druart [Fri, 9 Oct 2020 11:04:20 +0000 (11:04 +0000)]
Bug 26529: DBRev 20.06.00.048

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26529: (follow-up) Remove other instance of blanking holdallowed from script
Nick Clemens [Thu, 8 Oct 2020 17:48:22 +0000 (17:48 +0000)]
Bug 26529: (follow-up) Remove other instance of blanking holdallowed from script

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26529: Remove existing blank rules
Nick Clemens [Mon, 28 Sep 2020 13:57:01 +0000 (13:57 +0000)]
Bug 26529: Remove existing blank rules

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26529: Unit tests
Nick Clemens [Mon, 28 Sep 2020 13:39:48 +0000 (13:39 +0000)]
Bug 26529: Unit tests

This tests tries to set some rules to blank, and then fetch the effective rule - nothing should be
returned as these values are 'Not set'

To test:
1 - Apply just this patch
2 - Tests fail
3 - Apply second patch
4 - Tests pass

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26529: Define some rules as not able to be blank
Nick Clemens [Thu, 24 Sep 2020 18:21:45 +0000 (18:21 +0000)]
Bug 26529: Define some rules as not able to be blank

Currently, the 'Default checkout, hold, and return policy' have a conditional to blank
'holdallowed' when not set, but other rules don't get the same treatment

This patch uses the existing hash that controls the scope of rules and adds a
new parameter 'can_be_blank' Default is assumed to be true, can_be_blank, but if set to '0' then
blank rule values will not be save to the database

To test:
 0 - Set CircControl to 'the library the item is from'
 1 - Goto to Admin -> Circulation and fines rules and select a library
 2 - Under "Default checkout, hold, and return policy" set:
    Total current checkouts allowed: 1
    Hold policy: Not set
    Hold pickup library match: Not set
    Return policy: Not set
 3 - Save the rule
 4 - Check the DB
    SELECT * FROM circulation_rules WHERE branchcode = 'BRANCHCODE'
    using the branchcode for the library you chode
 5 - Note returnbranch, and hold_fulfillment_policy rules exist with blank value
 6 - Set 'All libraries'->'Default checkout, hold and return policy'->'Item floats'
 7 - Checkin an item from the library with blank rules at another library
 8 - It returns home rather than floating
 9 - Apply patch and restart all the things
10 - Reload the page and save the rules as before
11 - Check the DB and note the rules no longer exist
12 - Check in the item, it floats!
13 - prove -v t/db_dependent/Koha/CirculationRules.t

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23420: DBRev 20.06.00.047
Jonathan Druart [Fri, 9 Oct 2020 11:04:19 +0000 (11:04 +0000)]
Bug 23420: DBRev 20.06.00.047

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23420: (QA follow-up) Remove more AllowPurchaseSuggestionBranchChoice code
Lucas Gass [Mon, 5 Oct 2020 17:42:29 +0000 (17:42 +0000)]
Bug 23420: (QA follow-up) Remove more AllowPurchaseSuggestionBranchChoice code

Test plan:
1. git grep -i AllowPurchaseSuggestionBranchChoice **/*.pm **/*.pl **/*.t
2. There should no longer be any code related to the old sys pref AllowPurchaseSuggestionBranchChoice

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23420: (QA follow-up) Remove AllowPurchaseSuggestionBranchChoice syspref
Lucas Gass [Wed, 23 Sep 2020 23:00:07 +0000 (23:00 +0000)]
Bug 23420: (QA follow-up) Remove AllowPurchaseSuggestionBranchChoice syspref

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23420: Add OPACSuggestionUnwantedFields system pref
Lucas Gass [Fri, 18 Sep 2020 22:17:58 +0000 (22:17 +0000)]
Bug 23420: Add OPACSuggestionUnwantedFields system pref

To test:
-Apply patch
-Check OPACSuggestionUnwantedFields
-Check some fields as unwanted
-Go to the OPAC suggestion page and make sure these correct fields are hidden
-Turn on the system preference AllowPurchaseSuggestionBranchChoice to see the branch choice on the form
-Make sure you can correctly hide this one and still submit the purchase suggestion for without error.
-Go through each option and make sure it hides properly.

Note: You will only see the patron reason field when there are authorised values in the OPAC_SUG category

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23376: (follow-up) Fix subscription bug in orderreceive.tt
Agustin Moyano [Thu, 8 Oct 2020 14:35:14 +0000 (11:35 -0300)]
Bug 23376: (follow-up) Fix subscription bug in orderreceive.tt

When order has subscription, general order variable gets replaced by other order variable in FOR loop

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 13535: DBIC schema changes
Jonathan Druart [Thu, 8 Oct 2020 14:17:42 +0000 (16:17 +0200)]
Bug 13535: DBIC schema changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 13535: DBRev 20.06.00.046
Jonathan Druart [Thu, 8 Oct 2020 14:14:33 +0000 (14:14 +0000)]
Bug 13535: DBRev 20.06.00.046

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 13535: Add FK constraint on borrowernumber to alert table
Katrin Fischer [Sun, 12 Apr 2020 20:52:11 +0000 (20:52 +0000)]
Bug 13535: Add FK constraint on borrowernumber to alert table

When a patron is deleted, we should clean up the data connected
to the patron. This includes subscriptions to 'new issue arrived'
arrive messages from the serials module.

To test:

Part1:
- Before applying the patch
- Add a subscription and select a notice template for patron notification
- Go to the OPAC and subscribe to the email alert
- Log in as any other patron (not yourself) and subscribe with that patron too
- Verfiy on the subscription detail page, that the patrons are subscribed
- Note the borrowernumber of your patrons
- Delete the second patron
- Note borrowernumber and delete patron
- Run: SELECT * from alert; in a report
- Despite the patron being deleted, you will see entries for both
- Apply patch
- Run updatedatabase - verify no error message
- Run updatedatabase again - verify still no error message
- There should no longer be an entry with the deleted borrowernumber,
  but only the entry for your own patron account
Part 2:
- Start fresh with the web installer, verify there are no errors on
  creating the database tables

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 15436: (follow-up) Fix separator for a single 440 in staff
Katrin Fischer [Sun, 20 Sep 2020 21:48:32 +0000 (21:48 +0000)]
Bug 15436: (follow-up) Fix separator for a single 440 in staff

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 15436: Use semicolon between series name and volume
Katrin Fischer [Thu, 17 Sep 2020 11:25:15 +0000 (11:25 +0000)]
Bug 15436: Use semicolon between series name and volume

MARC21 dictates that we should be using a ; before $v in 440, 490,
810, 811 and 830.

This patch also introduces some additional changes to unify formatting
between the various options for cataloguing series:

- The separator between multiple series is switched form ; to the
  now commonly used | with a class for easy change of formatting.
- There was some missing logic that prevented the separator to show
  up correctly between traced and untraced series.
- For some series $v was included in the link for others not. Now
  $v always appears as text and only $a is linked, as this is what
  we actually search for.

To test this:
- You should be cataloguing multiple series in different ways, using
  - deprecated 440 (still present in old data)
  - 490, Ind. 1 = empty or 0 = not traced
  - 490, Ind. 1 = 1 = traced in combination with an 8xx field

Example (you should try a different combination!)
440 _ _ $aFirst series
490 _ _ $aSecond series ;$v1
490 1 _ $aThird series ;$v1 (this won't show, it will use 830 for display)
830 _ _ $aThird series ;$v1

Without patch:
Series: First Series; Second series ; 1Third series: 1

With patch:
Series: First series | Second series ; 1 | Third series ; 1

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 5927: (QA follow-up) Move part template below show-series to make both *Utils...
Katrin Fischer [Sat, 12 Sep 2020 21:18:33 +0000 (23:18 +0200)]
Bug 5927: (QA follow-up) Move part template below show-series to make both *Utils.xsl match

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 5927: [Alternate] Show series information in staff and opac results pages
Nick Clemens [Fri, 11 Sep 2020 18:44:13 +0000 (18:44 +0000)]
Bug 5927: [Alternate] Show series information in staff and opac results pages

This moves the series info to a template in the XSLT utils files and adds a
few variables to make it work right.

To test:
1 - Create a catalog records with:
    440 series fields
    490 traced series fields
    490 untraced series fields
2 - View the details pages for these records and note the display and the links formed
3 - Apply patch
4 - Confirm the details pages look the same
5 - Search on staff and opac to return the records
6 - Confirm the results pages form the same series as on details
7 - Confirm the links work the same

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 16728: Add MARC21 777 - Issued with entry to staff and OPAC detail pages
Katrin Fischer [Thu, 17 Sep 2020 12:13:36 +0000 (12:13 +0000)]
Bug 16728: Add MARC21 777 - Issued with entry to staff and OPAC detail pages

This adds the 777 - Issued with entry to the staff and OPAC detail pages.
It's built using the template for 773 with minor adjustments.

To test:
- Apply patch
- Catalog several 777 fields in one or more of your records
  - When using 1st indicator = 1, the note won't display
  - When using 2nd indicator empty, label will be "Issued with:"
  - When using 2nd indicator 8, the label will be drawn from $i if present
  - When $w and UseControlNumber pref is used, the link will be built using $w
  - In all other cases the title form $t will be used for the link
- Verify the display is correct

Examples for 777 can be found in the LOC MARC21 documentation:
http://www.loc.gov/marc/bibliographic/bd777.html

Note: Because the label depends on the 2nd indicator, the label is repeated for every
777 on a record.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19616: Compiled CSS
Jonathan Druart [Thu, 8 Oct 2020 14:17:13 +0000 (16:17 +0200)]
Bug 19616: Compiled CSS

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19616: (follow-up) Breaking items according to punctuation
Katrin Fischer [Sun, 13 Sep 2020 17:16:22 +0000 (17:16 +0000)]
Bug 19616: (follow-up) Breaking items according to punctuation

Previously the code assumed that $t indicates a new line in the
listing. But this is not true. The standard tells us that -- or
.-- will indicate a new item.

"In records formulated according to AACR 2, a space-hyphen-hyphen-space
( -- ) is recorded between each item in the contents note unless a
delimiter/subfield code follows in which case there is no ending space.
In pre-AACR 2 records, items are separated by a period-hyphen-hyphen (.--)."

The previous logic did no longer work with $g added. From the LOC
examples:

This would work:
505 2 0 $tBaptisms, 1816-1872 --$tChurch members, 1816-1831 --$tHistory of the Second Presbyterian Church of West Durham /$rby L. H. Fellows.
505 0 0 $tQuatrain II$g(16:35) --$tWater ways$g(1:57) --$tWaves$g(10:49).

This wouldn't:
505 1 0 $gNr. 1.$tRegion Neusiedlersee --$gNr. 2.$tRegion Rosalia/Lithagebirge --$gNr. 3.$tRegion Mettelburgenland --$gNr. 4.$tRegion südliches Burgenland --$gNr. 5.$tRegion Südburgland

With the patches applied, all examples should display nicely now.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19616: (follow-up) Reindent XSLT code used for 505 display
Katrin Fischer [Sun, 13 Sep 2020 16:31:13 +0000 (16:31 +0000)]
Bug 19616: (follow-up) Reindent XSLT code used for 505 display

Also adds a note at the beginning of the code block.
This causes no functional change, just code clean-up.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 19616: Add MARC21 505$g - Formatted Contents Note / Miscellaneous informatoin
Katrin Fischer [Sun, 13 Sep 2020 16:26:31 +0000 (16:26 +0000)]
Bug 19616: Add MARC21 505$g - Formatted Contents Note / Miscellaneous informatoin

This adds the subfield $g to the display of the 505 field in
staff and OPAC detail pages.

To test:
- Catalog some records using variations of 505
  Examples can be found in the LOC documentation:
  https://www.loc.gov/marc/bibliographic/bd505.html
- Verify that the display in staff and OPAC is still nice
  and now includes $g

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23376: (QA follow-up) Remove authnotrequired
Martin Renvoize [Mon, 5 Oct 2020 15:47:00 +0000 (16:47 +0100)]
Bug 23376: (QA follow-up) Remove authnotrequired

The rebased patchset subsequnetly re-introduced the now deprecated use
of authnotrequired on staff client controllers.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23376: Remove unneeded 'count' parameter
Nick Clemens [Mon, 29 Jul 2019 20:11:10 +0000 (20:11 +0000)]
Bug 23376: Remove unneeded 'count' parameter

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23376: Move AcqCreateItem logic to template
Nick Clemens [Mon, 29 Jul 2019 20:05:42 +0000 (20:05 +0000)]
Bug 23376: Move AcqCreateItem logic to template

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23376: Clean up order receipt page code
Nick Clemens [Thu, 25 Jul 2019 19:52:25 +0000 (19:52 +0000)]
Bug 23376: Clean up order receipt page code

This patchset switches from using DB lookups to using an order object for most things on orderreceive.pl

It simplifies the script and makes minimal changes to the template

To test:
1 - Place some orders and receive them
2 - Have orders with or without subscriptions attached
3 - Try with different AcqCreateItems settings
4 - Apply patch
5 - No behaviour should change
6 - Read code to ensure things make sense

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23852: (QA follow-up) Correct scope of breadcrumb title style
Owen Leonard [Mon, 14 Sep 2020 13:09:24 +0000 (13:09 +0000)]
Bug 23852: (QA follow-up) Correct scope of breadcrumb title style

This patch corrects the scope of the ".title" style intended for titles
displayed in the breadcrumbs bar.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 23852: Merge biblio-title.inc and biblio-default-view.inc
Owen Leonard [Mon, 21 Oct 2019 14:13:01 +0000 (14:13 +0000)]
Bug 23852: Merge biblio-title.inc and biblio-default-view.inc

This patch moves the functionality contained in biblio-default-view.inc
into biblio-title.inc. biblio-title.inc can now be called with a "link =
1" parameter in order for the title to be displayed as a link which is
controlled by the IntranetBiblioDefaultView preference.

To test, apply the patch and test the affected pages, especially titles
linked to in breadcrumbs menus

Acquisitions:
 - Add to basket -> From existing record -> Search
   - Title in search results

Catalog:
 - Search for a record
   - Add record to cart
     - Open cart
       - Title in brief display
         - Check that link opens the correct page in the main window
   - View bibliographic record
     - ISBD view
     - MARC view
     - Normal view
      - Local cover image detail page
      - Checkout history
      - Request article
     - Item details
     - From the "Edit" menu -> Attach item
     - Stock rotation rota
     - Place hold

Cataloging:
 - Cataloging search -> Search results

Circulation:
 - Article requests
 - Overdues with fines
 - Overdues
 - Holds queue
 - Holds to pull
 - Hold ratios
 - Holds awaiting pickup
 - Transfers to recevie
 - Renew
 - Batch checkout

Lists:
 - View list contents

Patrons:
 - View patron details
   - Holds history
   - Checkout history

Tools:
 - Rotating collections
   - View collection
     - Add item
 - Tags
   - Click term to see titles tagged with that term

 - Batch record deletion
   - Submit batch

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26280: Add unique class for each problem in returns.tt
Lucas Gass [Fri, 18 Sep 2020 21:06:03 +0000 (21:06 +0000)]
Bug 26280: Add unique class for each problem in returns.tt

1. Checkin an item with a bad barcode and see the prolem class also has
   a class called 'ret_badbarcode'
2. Checkin an item that triggers a lotforloan updated via
   UpdateNotForLoanStatusOnCheckin, notice the class 'ret_nflupdate'.
3. You should also see an updated_from and updated_to class. This
   should make it easier to target those for audio alerts
4. Checkin an item that triggers an location update and see the class
   'ret_locationupdate'
5. Checkin an item that is not at its permenat location and you should
   see the class 'ret_ispermenant'.
6. Checkin an item that is not checkout and you should see the class
   'ret_notissued'
7. Checkin lost items with BlockReturnOfLostItems set to 'Dont block'
   and see the class 'ret_checkedin'
8. Checkin lost items with BlockReturnOfLostItems set to 'block' and
   see the class 'ret_blocked'
9. Checkin lost items with a fee on the patron's account for that lost
   item and see the class 'ret_feeremains'
10. Checkin item that is withdrawn and see the class 'ret_withdrawn'

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26485: Simplify itemnumber handling in returns.pl
Jonathan Druart [Fri, 18 Sep 2020 09:00:20 +0000 (11:00 +0200)]
Bug 26485: Simplify itemnumber handling in returns.pl

This is a follow-up for bug 25969. The way we handle itemnumber is too complicated and error prone.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26506: (QA follow-up) Add Unit Test
Martin Renvoize [Thu, 1 Oct 2020 13:33:46 +0000 (14:33 +0100)]
Bug 26506: (QA follow-up) Add Unit Test

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26506: Fix Koha::Account::pay if called when no user is logged-in
Matthias Meusburger [Tue, 22 Sep 2020 13:16:23 +0000 (15:16 +0200)]
Bug 26506: Fix Koha::Account::pay if called when no user is logged-in

Currently, Koha::Account::pay will fail if no user is logged-in when it is
called.

In this case, this patch will use undef instead of 0 for $manager_id in order
to comply with the foreign key constraint on manager_id.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Biblibre and Libriotech have created a OPAC payment plugin that was
having problems because of this bug. Applying the fix in this patch
to a live server solved the problem.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26599: Unused parameter name in POD of ModZebra
Marcel de Rooy [Fri, 2 Oct 2020 06:20:38 +0000 (06:20 +0000)]
Bug 26599: Unused parameter name in POD of ModZebra

This patch removes the $record reference in POD.
Nothing else ;)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 26600: Missing module in Elasticsearch/Indexer.pm
Marcel de Rooy [Fri, 2 Oct 2020 06:28:06 +0000 (06:28 +0000)]
Bug 26600: Missing module in Elasticsearch/Indexer.pm

Just formally needed. It is already loaded somewhere.
That is: Koha::SearchEngine::Elasticsearch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
4 years agoBug 24598: Remove warning from test
Jonathan Druart [Thu, 8 Oct 2020 10:03:48 +0000 (12:03 +0200)]
Bug 24598: Remove warning from test

t/db_dependent/Koha/Items.t .. 6/12 Use of uninitialized value in string eq at /kohadevbox/koha/C4/Circulation.pm line 1460.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>