]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 23109: DBRev 19.06.00.008
Martin Renvoize [Mon, 24 Jun 2019 16:12:44 +0000 (17:12 +0100)]
Bug 23109: DBRev 19.06.00.008

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23109: (follow-up) fix typo in upgrade script
Mark Tompsett [Thu, 20 Jun 2019 16:42:22 +0000 (16:42 +0000)]
Bug 23109: (follow-up) fix typo in upgrade script

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23109: Improve description of staffaccess permission
Katrin Fischer [Mon, 17 Jun 2019 21:50:01 +0000 (21:50 +0000)]
Bug 23109: Improve description of staffaccess permission

Changes:
Allow staff members to modify permissions for other staff members
To:
Allow staff members to modify permissions and passwords for other staff members.

As suggested by Andre on the initial bug report.

To test:
- Go to any patron account and check More > permissions
- Veriy the description is shown as noted above
- Apply patch and run database update
- Reload the page and verify the description has changed
- Run the following SQL and verify the description in the
  database table matches as well:

SELECT * FROM userflags where flag = "staffaccess";

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23158: Make the assignment statement more readable
Jonathan Druart [Mon, 24 Jun 2019 15:37:54 +0000 (10:37 -0500)]
Bug 23158: Make the assignment statement more readable

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23158: keep on-site checkout info when using itemBarcodeFallbackSearch
Fridolin Somers [Wed, 19 Jun 2019 11:42:16 +0000 (13:42 +0200)]
Bug 23158: keep on-site checkout info when using itemBarcodeFallbackSearch

When using preference itemBarcodeFallbackSearch one can enter a search term instead of a barcode in checkout form.
If on-site is selected this should be transmitted to itemBarcodeFallbackSearch form.

Test plan :
1) Enable system preferences "itemBarcodeFallbackSearch" and "OnSiteCheckouts"
2) Disable system preference "ConsiderOnSiteCheckoutsAsNormalCheckouts"
3) Go to a patron circulation page
4) Check "On-site checkout" in "Checkout settings"
5) Enter a barcode in checkout form and click on "Check out"
6) You see the checkout in table with red "(On-site checkout)"
7) Check "On-site checkout" in "Checkout settings"
8) Enter the title of a record in in checkout form and click on "Check out"
9) Click on "Checkout" on a line
10) You see the checkout in table with red "(On-site checkout)"

Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 5287: Compiled CSS
Martin Renvoize [Mon, 24 Jun 2019 16:07:04 +0000 (17:07 +0100)]
Bug 5287: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 5287: (QA follow-up) update deprecated button
Liz Rea [Sat, 8 Jun 2019 17:57:17 +0000 (17:57 +0000)]
Bug 5287: (QA follow-up) update deprecated button

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 5287: Add floating toolbar to search results in OPAC
Owen Leonard [Tue, 11 Jun 2019 12:16:10 +0000 (12:16 +0000)]
Bug 5287: Add floating toolbar to search results in OPAC

This patch adds the "hc-sticky" JavaScript library to the OPAC and uses
it to make the search results toolbar "stick" to the top of the page as
the user scrolls down.

This patch also moves search results pagination into the toolbar so that
pagination links are available. Font Awesome icons are added to the
pagination include to replace arrow HTML entities.

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

 - Perform a catalog search in the OPAC which will return multiple pages
   of results. Confirm that the toolbar "sticks" and that all controls
   in the toolbar work correctly.
 - Test at various browser widths to confirm that it adapt well to
   various sizes.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23152: (RM follow-up) Add handling for Koha::Plugin::Methods
Martin Renvoize [Mon, 24 Jun 2019 15:56:56 +0000 (16:56 +0100)]
Bug 23152: (RM follow-up) Add handling for Koha::Plugin::Methods

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23152: Implement koha_object[s]_class when needed
Jonathan Druart [Wed, 19 Jun 2019 02:42:07 +0000 (21:42 -0500)]
Bug 23152: Implement koha_object[s]_class when needed

A simple use case is the ->get_from_storage (useful when writing tests)

Test plan:
Apply only the first patch and notice the test failures
Apply the second patch and confirm the the tests are returning green

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23152: Add tests
Jonathan Druart [Wed, 19 Jun 2019 02:39:45 +0000 (21:39 -0500)]
Bug 23152: Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23154: Add pagination to /api/v1/checkouts
Julian Maurice [Wed, 19 Jun 2019 09:10:14 +0000 (11:10 +0200)]
Bug 23154: Add pagination to /api/v1/checkouts

Allow to use _page and _per_page query parameters for
/api/v1/checkouts
Also fix a timezone problem in t/db_dependent/api/v1/checkouts.t

Test plan:
1. With your favorite REST tester tool, or directly in the browser,
   fetch http://koha/api/v1/checkouts and check that you have results
2. Fetch /api/v1/checkouts?_per_page=1&_page=1 and check that only the
   first result is returned. Check that response contains headers
   X-Total-Count and Link
3. Fetch /api/v1/checkouts?_per_page=1&_page=2 and check that only the
   second result is returned. Check that response contains headers
   X-Total-Count and Link
4. prove t/db_dependent/api/v1/checkouts.t

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23159: Add comments to addbiblio.tt
Mark Tompsett [Wed, 19 Jun 2019 14:06:28 +0000 (14:06 +0000)]
Bug 23159: Add comments to addbiblio.tt

This patch adds code comments to the template to clarify indenting over
the page boundary.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23159: Reindent addbiblio.tt
Owen Leonard [Tue, 18 Jun 2019 15:32:24 +0000 (15:32 +0000)]
Bug 23159: Reindent addbiblio.tt

This patch corrects whitespace in the basic MARC editor template,
addbiblio.tt: Tabs converted to spaces, indentation corrected. Some
comments have been added in the markup to clarify the page structure.

To test, apply the patch and open the basic MARC editor. Confirm that
everything works correctly, including:

 - Showing/hiding subfields
 - Re-ordering subfields
 - Removing tags and subfields
 - Cloning tags and subfields
 - Plugin links

Use the "-w" flag when using diff to examine the patch. The only changes
should be places where single lines were broken up and where comments
were added.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23146: (QA follow-up) Make sure we use the absolute path
Tomas Cohen Arazi [Wed, 19 Jun 2019 15:30:28 +0000 (12:30 -0300)]
Bug 23146: (QA follow-up) Make sure we use the absolute path

When making a request using any tool (like cUrl or Postman) you get a
'Basic authentication disabled' error (if it is actually disabled) or an
'invalid password' error if it is disabled. This is because the
comparisson of the path we do passes on oauth.t but fails on external
tools. This is probably related to our stack including Apache URL
mappings and then in the plack.psgi file. The safest way is to just ask
Mojo::URL the absolute path to be sure.

To test:
- Having the rest of the patches applied and plack restarted, run: [1]
  $ curl -X POST -H 'Authorization: Basic ZGQ2NjlmNGUtZmI1NS00Y2YzLWE4ZmYtYmFiYzJiNDIwNWY1OmM0ZDJmYmYzLWYwOWMtNGJkZi1iNWE4LTgxMDJmNjcwYTI1Mw' -i 'http://kohadev.myDNSname.org:8081/api/v1/oauth/token' --data grant_type=client_credentials
=> FAIL: It fails saying Basic auth is disabled
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/oauth.t
=> SUCCESS: Tests pass
- Apply this patch
- Replicate your curl/postman test
=> SUCCESS: It now works as expected
- Run:
 k$ prove t/db_dependent/api/v1/oauth.t
=> SUCCESS: Tests still pass!
- Sign off :-D

[1] You need to generate a client_id and client_secret, and encode them
using: encode_base64url( "$client_id:$client_secret" );

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23146: Add support for Basic auth on the OAuth2 token endpoint
Tomas Cohen Arazi [Tue, 18 Jun 2019 19:09:01 +0000 (16:09 -0300)]
Bug 23146: Add support for Basic auth on the OAuth2 token endpoint

The original implementation only contemplated the option to pass the
client_id and client_secret on the request body. It is very common that
clients expect to be able to pass them as a Basic authorization header:

Authorization: Basic encode_base64(client_id:client_secret)

This patch introduces support for this, by:
- Adding a check for the presence of the Authorization header in the
OAuth token request handling code and making that case extract the
client_id and client_secret from the header instead of the original
implementation. No behaviour changes.
- The Auth#under sub is changed so it doesn't go through the
authenticate_api_request chain step, as it would be in conflict with
general Basic authentication.
- Original tests are generalized so they are run in both ways, with the
same expected results.

To test:
- Apply the unit tests patch
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/oauth.t
=> FAIL: Tests fail because the current API doesn't support the feature
- Apply this patch
- Run:
 k$ prove t/db_dependent/api/v1/oauth.t
=> SUCCESS: Tests pass!
- Sign off :-D

Sponsored-by: ByWater Solutions
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23146: Unit tests
Tomas Cohen Arazi [Tue, 18 Jun 2019 19:08:54 +0000 (16:08 -0300)]
Bug 23146: Unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22935: Compiled CSS
Martin Renvoize [Mon, 24 Jun 2019 14:42:04 +0000 (15:42 +0100)]
Bug 22935: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22935: Improve style of Bootstrap pagination
Owen Leonard [Fri, 17 May 2019 15:03:24 +0000 (15:03 +0000)]
Bug 22935: Improve style of Bootstrap pagination

This patch makes some updates to the staff client CSS and adds Font
Awesome icons to the Bootstrap pagination include.

To test, apply the patch and rebuild the staff client CSS.

Perform a search in the staff client which will return multiple pages of
results. Check that the pagination links look good.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20292: Filter/censor info sent via SIP
Kyle M Hall [Fri, 30 Nov 2018 17:23:43 +0000 (12:23 -0500)]
Bug 20292: Filter/censor info sent via SIP

Some libraries would like to limit the amount of personal information a SIP server sends
to arbitrary parties on a per-login basis.

Test Plan:
1) Add a new key/value pair to one of your existing login stanzas in your SIP config file
   For example: hide_fields="BD,BE,BF,PB"
2) Restart SIP
3) Send a SIP message that would normally return those fields ( in this example, a Patron Information Request )
4) Note the response has had those fields removed

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Christopher Davis <tubaclarinet@protonmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22509: (RM follow-up) Add use of Koha::Script base class
Martin Renvoize [Mon, 24 Jun 2019 14:07:53 +0000 (15:07 +0100)]
Bug 22509: (RM follow-up) Add use of Koha::Script base class

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22509: Clarify with an example the usage of --unless-exists
Jonathan Druart [Sat, 11 May 2019 23:58:20 +0000 (18:58 -0500)]
Bug 22509: Clarify with an example the usage of --unless-exists

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22509: Add more POD and fix --where
Jonathan Druart [Sat, 11 May 2019 23:53:25 +0000 (18:53 -0500)]
Bug 22509: Add more POD and fix --where

We should not need the "WHERE" keyword to have the same behavior as
existing script (rebuild_zebra.pl)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22509: Fix POD error
Jonathan Druart [Fri, 10 May 2019 12:55:49 +0000 (07:55 -0500)]
Bug 22509: Fix POD error

1. "Apparent command =item not preceded by blank line"
2. Display the options for help
3. Do not run if no --field passed

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22509: Add the --unless-exists option to the script
Jonathan Druart [Fri, 5 Apr 2019 02:02:09 +0000 (23:02 -0300)]
Bug 22509: Add the --unless-exists option to the script

It will avoid to create the fields several times if it is not needed.

Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22509: Add new script to add MARC fields with date formatted stringsto bib records
Jonathan Druart [Wed, 13 Mar 2019 14:23:13 +0000 (11:23 -0300)]
Bug 22509: Add new script to add MARC fields with date formatted stringsto bib records

Say you want to add, into a new MARC fields, the following string:
  2/2019/Mar-03/13
Depending on today's date.

Test plan:
Use the script after with the different options (see --help option for the list)

Sponsored-by: Orex Digital
Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22862: (QA follow-up) Make regexes match
Kyle M Hall [Thu, 9 May 2019 18:14:25 +0000 (14:14 -0400)]
Bug 22862: (QA follow-up) Make regexes match

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22862: Normalize SMS messaging numbers before validating them
Kyle M Hall [Tue, 7 May 2019 18:53:29 +0000 (14:53 -0400)]
Bug 22862: Normalize SMS messaging numbers before validating them

Librarians often copy and paste patron data, including phone numbers. SMS phone numbers are now being validated to conform to the E.164 specification. It would be nice to try to normalize that data by stripping non-numeric data from the paste (i.e. dashes, parens, etc ).

Test Plan:
1) Apply this patch
2) On the staff side, Attempt to enter invalid characters the SMS number field
3) Note you cannot enter invalid characters
4) Attempt to paste a phone number with invalid characters
5) Note those characters are removed on paste
6) Repeat these steps on the OPAC

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22888: Compiled CSS
Martin Renvoize [Mon, 24 Jun 2019 13:59:04 +0000 (14:59 +0100)]
Bug 22888: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22888: Use DataTables for Koha news table filtering
Owen Leonard [Thu, 9 May 2019 16:55:00 +0000 (16:55 +0000)]
Bug 22888: Use DataTables for Koha news table filtering

This patch modifies the Koha news page so that filtering the table of
news is done using DataTables' built-in search functionality. This
allows for the table to be filtered without requiring a reload of the
page.

The patch also moves the table filter into a sidebar form and adds a
keyword field. A minor change has been made to the global CSS to improve
the display of the form in the sidebar.

To test, apply the patch and rebuild the staff client CSS.

 - Go to Tools -> News.
 - Test the various table filter options: keyword, display location, and
   library. Confirm that all work as expected.
   - Changes to the keyword search text should be reflected in the
     search field at the top of the table, and vice versa.
 - Changes to the sidebar filter should trigger the correct state of the
   "Clear filter" button at the top of the news table (enabled or
   disabled).

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21588: Add expand/collapse all links to the "Acquisition details" subscriptions
Jonathan Druart [Thu, 9 May 2019 17:27:15 +0000 (12:27 -0500)]
Bug 21588: Add expand/collapse all links to the "Acquisition details" subscriptions

In order to make the view cleaner, a librarian may need to expand or
collapse all the orders at once.

Test plan:
- Create a subscription
- Create several orders from this subscription (quantity > 1)
- Receive partially the orders
- Go to the subscription detail page, "Acquisition details" tab
=> Notice the 2 new links "Expand all" and "Collapse all"
Make sure they work as expected.

Also note that a bug has been fixed, when the page is loaded the tree is
now expanded.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 15704: Split up Zebra indexing of RDA 264 information
Nick Clemens [Mon, 18 Dec 2017 15:41:33 +0000 (15:41 +0000)]
Bug 15704: Split up Zebra indexing of RDA 264 information

To test:
1 - Add a record with a unique publisher "Supercalifragilistic" in the
264 b field
2 - Search for the value
3 - Record not found
4 - Apply patch (may need ot copy the .xml file into koha install)
5 - Reindex all the things
6 - Search for the value
7 - Success!

Signed-off-by: Felicia Martin <felicia.martin@dncr.nh.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23034: (RM follow-up) Consistent coding style
Martin Renvoize [Mon, 24 Jun 2019 13:48:27 +0000 (14:48 +0100)]
Bug 23034: (RM follow-up) Consistent coding style

We had a mix of q||, q{} and '' in this one script. This followup just
makes them all conform to our standard style of q{}.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23034: Remove uninitialized value warning in Mana KB settings
Joonas Kylmälä [Mon, 3 Jun 2019 14:58:34 +0000 (14:58 +0000)]
Bug 23034: Remove uninitialized value warning in Mana KB settings

This gets rid of the warning "Use of uninitialized value $auto_share
in string ne at [...]" by initializing the variable with empty string.

Test plan:
1) Go to page cgi-bin/koha/admin/share_content.pl and unselect "Auto
   subscription sharing". Click "Save".
2) Check plack-error.log and notice the warning "Use of uninitialized
   value $auto_share [...]"
3) Apply the patch and repeat the previous steps but now this time the
   warning is gone in plack-error.log.
4) Make sure the AutoShareWithMana syspref with and without the patch
   is in unselected state after clicking "Save".

Sponsored-by: The National Library of Finland
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23098: Reword success message of KOC upload process
Katrin Fischer [Mon, 17 Jun 2019 21:20:41 +0000 (23:20 +0200)]
Bug 23098: Reword success message of KOC upload process

When uploading KOC files the processing of transactions needs
to happen in a separate second step. This is why the success
message "Your file was processed" was found to be misleading.

This patch changes it to the wording suggested by Benjamin
Daeuber in the original bug report. Thx!

To test:
- Create a KOC file either manually or by downloading it
  from the plugin
- Upload the KOC file into Koha using Circulation >
  Upload offline circulation file (.koc)
- Verify the new message is clear and has no typos :)

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22944: remove obsolete unit test
Fridolin Somers [Tue, 11 Jun 2019 13:31:45 +0000 (15:31 +0200)]
Bug 22944: remove obsolete unit test

Test 'AnonymiseIssueHistory should not return any error if success' is obsolete,
previous statement will explode if something went wrong.

Test plan :
Run t/db_dependent/Koha/Patrons.t

Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22944: avoid AnonymousPatron in search_patrons_to_anonymise
Fridolin Somers [Tue, 21 May 2019 09:55:40 +0000 (11:55 +0200)]
Bug 22944: avoid AnonymousPatron in search_patrons_to_anonymise

In Koha::Patrons::search_patrons_to_anonymise() old issues already affected to the anonymous patron should be avoided. It is useless and can impact performance.

It is already working if AnymousPatron is not defined or 0 because of :
  'old_issues.borrowernumber' => { 'not' => undef }

In theory the anymous patron should have privacy=0 but in case its not it should be explicitly avoided.

Test plan :
Run t/db_dependent/Koha/Patrons.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22944: change unit tests
Fridolin Somers [Tue, 21 May 2019 09:17:11 +0000 (11:17 +0200)]
Bug 22944: change unit tests

Add a dedicated UT and correct a test return value

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23115: Compiled CSS
Martin Renvoize [Mon, 24 Jun 2019 13:24:26 +0000 (14:24 +0100)]
Bug 23115: Compiled CSS

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23115: (QA follow-up) Address QA tools complaints
Nick Clemens [Fri, 21 Jun 2019 16:20:28 +0000 (16:20 +0000)]
Bug 23115: (QA follow-up) Address QA tools complaints

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23115: (follow-up) Move switches to a TT block
Nick Clemens [Fri, 21 Jun 2019 16:18:15 +0000 (16:18 +0000)]
Bug 23115: (follow-up) Move switches to a TT block

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23115: Tweak display of totals on 'Fines and charges' page
Martin Renvoize [Thu, 13 Jun 2019 10:42:02 +0000 (11:42 +0100)]
Bug 23115: Tweak display of totals on 'Fines and charges' page

This patch tweaks the display of totals on the OPAC 'Fines and charges'
page to clarify between the totals before and after applying credits.

Test Plan:
1) Add some debts and credits to a patrons account
2) Look at the 'Fines and charges' page before applying the patch
3) Look at the 'Fines and charges' page after applying the patch
4) Varify the new layout is an improvment or not

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23106: Tweak display of totals on payment page
Martin Renvoize [Thu, 13 Jun 2019 09:02:35 +0000 (10:02 +0100)]
Bug 23106: Tweak display of totals on payment page

This patch tweaks the display of totals on the fines payments page to
clarify between the totals before and after applying credits.

Test Plan:
1) Add some debts and credits to a patrons account
2) Look at the pay page before applying the patch
3) Look at the pay page after applying the patch
4) Verify the new layout is an improvment or not

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22571: (follow up) fix Donald cut-&-paste error
Mark Tompsett [Mon, 17 Jun 2019 17:57:46 +0000 (17:57 +0000)]
Bug 22571: (follow up) fix Donald cut-&-paste error

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22571: Handle control fields in MMT for conditionals
Jonathan Druart [Sun, 5 May 2019 17:41:46 +0000 (12:41 -0500)]
Bug 22571: Handle control fields in MMT for conditionals

Control fields are not handled correctly by Koha::SimpleMARC when
comparaison (with or without regex) is done.

Which means we did not support something like:
Do something if control field 008 equals or matches "a string"

Test plan:
Create a new MARC modification template and a new action, like:
Add new field 100$a with value "foo bar" if 008 (or any other control
fields) matches (or equals) a regex
Then use the record mofication tool and confirm that the new field is
create if the regex matches 008 of the bib record

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22571: Add tests
Jonathan Druart [Sun, 5 May 2019 17:41:43 +0000 (12:41 -0500)]
Bug 22571: Add tests

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22617: Fix checkout notes typo in manage_checkout_notes permission usage
Fridolin Somers [Fri, 14 Jun 2019 08:43:15 +0000 (10:43 +0200)]
Bug 22617: Fix checkout notes typo in manage_checkout_notes permission usage

When logged into the staff client with an account with full circulate permissions (and therefore including the manage_checkout_notes permission) an error occurs when clicking on the Checkout notes pending link.  The account is logged out automatically with the message:  "Error: you do not have permission to view this page.  Log in as a different user".
The same error occurs for both the link on the home page dashboard and from the Circulation module button.  Works as expected if Superlibrarian permission is set.

This is just a typo in perl script : circulation instead of circulate

Test plan :
1) Set preference "AllowCheckoutNotes" to "Allow"
2) Create a user with only permissions "catalogue" and "circulate > manage_checkout_notes"
3) Loggin with this user
4) Go to "Circulation" home page
5) Click on "Checkout notes"
6) You should be allowed to access

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23153: In framework management action subfields must not go directly to edition
Fridolin Somers [Wed, 19 Jun 2019 05:04:25 +0000 (07:04 +0200)]
Bug 23153: In framework management action subfields must not go directly to edition

Since 18.11, when viewing a framework field clicking on Actions >
Subfields goes to subfields edition instead of subfields table view.

This is because link contains op=add_form.
This is is also missing /cgi-bin/koha/admin.

Test plan :
1) Go to Administration > MARC bibliographic framework
2) On a line click Actions > MARC structure
3) On a line click Actions > Subfields
4) You see subfields table
5) Click on Edit subfields
6) You see subfields edition tabs

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 15814: Add missing filters
Jonathan Druart [Tue, 18 Jun 2019 01:07:29 +0000 (20:07 -0500)]
Bug 15814: Add missing filters

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 15814: Handle correctly MMTA edit button
Jonathan Druart [Thu, 30 May 2019 02:28:23 +0000 (21:28 -0500)]
Bug 15814: Handle correctly MMTA edit button

The MARC modification template action edit buton does not correctly
handle variable escaping.
Assigning a JS variable containing the JSON representation of the
hashref will make the processing much more easier.

Test plan:
Create a MARC Modification Template with several actions.
In the description you should use the following characters, to try to
break this patch: \ ' " \n \r
(not sure what we handled \n and \r)
Then edit the action, modify and save again.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23150: (follow-up) Make gdpr_proc_consent mandatory for create
Marcel de Rooy [Thu, 20 Jun 2019 12:37:27 +0000 (12:37 +0000)]
Bug 23150: (follow-up) Make gdpr_proc_consent mandatory for create

When updating (patron modification), the field should not be required.

Test plan:
Check patron modification on opac.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23150: Do not consider gdpr_proc_consent a mandatory field
Jonathan Druart [Wed, 19 Jun 2019 19:49:15 +0000 (14:49 -0500)]
Bug 23150: Do not consider gdpr_proc_consent a mandatory field

It introduced a regression in the patron's self modification feature.
Patron's details are no longer modificable, the screen displays
"You have not filled out all required fields. Please fill in all missing
fields and resubmit."

Test plan:
- Set GDPR_Policy to either Enforced or Permissive
- Set PatronSelfRegistrationBorrowerMandatoryField to empty
- Set OPACPatronDetails to Allow
- Log into the OPAC
- Accept the GDPR screen
- Go to opac-memberentry.pl, change something, submit modification
request

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22946: Markup error in OPAC search results around selection links
Owen Leonard [Tue, 21 May 2019 12:39:09 +0000 (12:39 +0000)]
Bug 22946: Markup error in OPAC search results around selection links

This patch makes minor corrections to the template for OPAC search
results. These corrections fix errors returned by the HTML validator.

To reproduce the problem, make sure holds and/or tags are enabled in the
OPAC. Perform a search in the OPAC which will return multiple results.
Run the page through the W3C validation service:
https://validator.w3.org. Either by pasting in the URL for the search
results (if web accessible) or by viewing source, copying, and pasting
into "Validate by Direct Input."

This patch addresses one specific error:

 - "Element div not allowed as child of element span in this context."

To test, apply the patch and try again to reproduce the validation
errors. Those errors should no longer be present. There should be no
visible change to the search results view.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23097: Fix regression on overdues report and link patrons to moremember
Katrin Fischer [Mon, 17 Jun 2019 21:35:19 +0000 (21:35 +0000)]
Bug 23097: Fix regression on overdues report and link patrons to moremember

The link from the patron name in the circulation > overdues report
shouldn't point to the reserves tab, as this report is about checkouts.

The patch restores the behaviour as it was in 17.11.

To test:
- Make sure you have a patron account with overdue items
- If you don't have one, check out an item with specified due date in the
  past
- Go to Circulation > Overdues
- Veriy the overdue shows
- Click on the patron name that is linked
- Verify you go to the checkouts tab in patron account with holds tab selected
- Apply patch
- Reload Overdues report
- Verify the link now leads to the Details tab with the checkouts tab in front

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23103: (QA follow-up) Return undef implicitly
Kyle M Hall [Wed, 19 Jun 2019 11:00:01 +0000 (07:00 -0400)]
Bug 23103: (QA follow-up) Return undef implicitly

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23103: Cannot checkin items lost by deleted patrons with fines attached
Kyle M Hall [Wed, 12 Jun 2019 19:08:08 +0000 (15:08 -0400)]
Bug 23103: Cannot checkin items lost by deleted patrons with fines attached

Test Plan:
1) Checkout an item to a patron
2) Ensure the item has a replacement cost (or itemtype has default)
3) Ensure patrons are charged when items lost
4) Mark the item lost
5) Confirm patron has a fine
6) Write off the fine
7) Delete the patron
8) Check in the item
9) Note the internal server error
10) Apply this patch
11) Repeat steps 1-8
12) Note there is no internal server error!
13) prove t/db_dependent/Circulation.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23177: (RM follow-up) Further test clarifications
Martin Renvoize [Fri, 21 Jun 2019 11:28:48 +0000 (12:28 +0100)]
Bug 23177: (RM follow-up) Further test clarifications

This patch makes a few minor improvements to Circulation.t
1) Adds a name to some of the scoped blocks by converting them to
   subtests.
2) Adds output messages to some tests where they were missing.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23177: (QA follow-up) Remove subtest txn_begin and rollback
Marcel de Rooy [Fri, 21 Jun 2019 09:15:18 +0000 (09:15 +0000)]
Bug 23177: (QA follow-up) Remove subtest txn_begin and rollback

This resolves:
DBIx::Class::Storage::txn_rollback(): A txn_rollback in nested transaction is ineffective! (depth 1)
Removing unneeded subtest txn's. We should probably add them everywhere or
just at global level.

Test plan:
With all three patches applied, run Circulation.t a few times.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23177: (QA follow-up) Move rollback to the end
Marcel de Rooy [Fri, 21 Jun 2019 09:03:27 +0000 (09:03 +0000)]
Bug 23177: (QA follow-up) Move rollback to the end

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23177: (QA follow-up) Move three subs from the middle to the top in Circulation.t
Marcel de Rooy [Fri, 21 Jun 2019 09:00:27 +0000 (09:00 +0000)]
Bug 23177: (QA follow-up) Move three subs from the middle to the top in Circulation.t

Removed trailing comma for last sub too.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23140: Fix typo in branchcode parameters for print slip
Nick Clemens [Mon, 17 Jun 2019 17:58:56 +0000 (17:58 +0000)]
Bug 23140: Fix typo in branchcode parameters for print slip

To test:
1 - Have [% branch.branchcode %] in your TRANSFERSLIP
2 - Checkin an item from another branch (with AutomaticItemReturn = do )
3 - Inspect the button in the browser to see the typo
4 - Click 'Print slip'
5 - Note the branchcode is not populated
6 - Clear the transfer
7 - Apply patch
8 - Repeat
9 - Note typo is fixed and slip correctly populated

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13640: (QA follow-up) Allow NULL values for default_branch_item_rules.holdallowed
Marcel de Rooy [Fri, 21 Jun 2019 07:08:39 +0000 (07:08 +0000)]
Bug 13640: (QA follow-up) Allow NULL values for default_branch_item_rules.holdallowed

If a rule has not been defined for an itemtype or you submit a biblio level
hold, you cannot filter on holdallowed<>0.

Test plan:
Test with a biblio level hold. Have two items; one item should be blocked
with a policy.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 13640: Do not display unreserveable items on the Holds to pull screen
Jonathan Druart [Mon, 13 May 2019 14:57:52 +0000 (09:57 -0500)]
Bug 13640: Do not display unreserveable items on the Holds to pull screen

We should only display the items that meet the hold policies

Test plan:
It would be good to have a huge list of holds displayed on the "Holds to
pull" and confirm that the display is now correct.

One of the possible test plan has been let in a comment on the bug
report:
Bib Record A has 2 items:

Item Record X (can be placed on hold)
Item Record Y (cannot be placed on hold)

If you place a bib-level hold on Bib Record A, both Item Record X and
Item Record Y show up as available items in the Holds To Pull List.

With this patch applied you must not see Y

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23090: Add some special characters
Mark Tompsett [Mon, 10 Jun 2019 18:36:49 +0000 (14:36 -0400)]
Bug 23090: Add some special characters

TEST PLAN
---------

$ sudo mysql -u root
> CREATE USER 'bug23090_test1'@'localhost' IDENTIFIED BY 'badpassword';
[Magical MySQL Error]
> CREATE USER 'bug23090_test1'@'localhost' IDENTIFIED BY 'GoodP@ssw0rd';
[Should be okay]
> DROP USER 'bug23090_test1'@'localhost';
> QUIT
$ sudo koha-create --create-db fail23090
[Magical MySQL Error]
[Apply this patch and put it (debian/scripts/koha-create) into place in
/usr/sbin/koha-create]
$ sudo koha-create --create-db pass23090

(Clean up and databases made)

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 9834: (QA follow-up) API Corrections
Tomas Cohen Arazi [Mon, 17 Jun 2019 15:16:53 +0000 (12:16 -0300)]
Bug 9834: (QA follow-up) API Corrections

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23168: Enable plugins using plain SQL
Tomas Cohen Arazi [Thu, 20 Jun 2019 15:03:30 +0000 (12:03 -0300)]
Bug 23168: Enable plugins using plain SQL

To test:
- On a clean 18.11.x, install a plugin [1]
- Run:
  $ sudo koha-mysql kohadev
  > SELECT * FROM plugin_data;
=> SUCCESS: Notice there's a __INSTALLED_VERSION__ line for your plugin
- Checkout latest master, restart all the things
- Run:
  $ updatedatabase
=> FAIL: It fails on 18.12.00.069 because the plugin_methods table doesn't exist
- Run:
  $ sudo koha-mysql kohadev
  > SELECT * FROM plugin_data;
=> FAIL: No __ENABLED__ line for your plugin
- Apply the patch
- Run:
  $ updatedatabase
=> SUCCESS: Update passes the 18.12.00.069 step correctly
- Run:
  $ sudo koha-mysql kohadev
  > SELECT * FROM plugin_data;
=> SUCCESS: There's an __ENABLED__ line for your plugin
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23130: Add David Nind to contributors
Martin Renvoize [Thu, 20 Jun 2019 08:46:50 +0000 (09:46 +0100)]
Bug 23130: Add David Nind to contributors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22966: Add Petter von Krogh to contributors
Martin Renvoize [Thu, 20 Jun 2019 08:44:26 +0000 (09:44 +0100)]
Bug 22966: Add Petter von Krogh to contributors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23132: Fix encoding issues in facets with show more link
Fridolin Somers [Mon, 17 Jun 2019 14:28:22 +0000 (16:28 +0200)]
Bug 23132: Fix encoding issues in facets with show more link

When one uses characters like Ã, ç ... the first searcshow up correctly but when you refine your search with "Show more", the encoding becomes bad and so, results of the search too.

Test plan :

Without the patch:
- check if you have your SysPref SearchEngine with Elasticsearch as value,
- put your SysPref FacetMaxCount at 10,
- search in the catalog "a" and then in Refine your search click on show more (just to see how it works),
- then search with special characters like "é", ç" ... and make the same test, the research should be wrong when you click on show more and the page is realoaded.

Then apply the patch:
- and make the same with a classic reasearch, then with special characters,
- verify that when you click on show more the page isn't realoded and the reasearch is correct.
- same with show less
- and finnaly, add some facets and test show more/less

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23130: Fix alternative mana server URL in etc/koha-conf.xml
David Nind [Sat, 15 Jun 2019 01:43:39 +0000 (01:43 +0000)]
Bug 23130: Fix alternative mana server URL in etc/koha-conf.xml

If the alternative mana KB server URL in etc/koha-conf.xml is used it
causes an error message like 'malformed JSON string, neither tag,
array, object, number, string or atom, at character offset 0 (before
"<html>\r\n<head><tit...") at /usr/share/perl5/JSON.pm line 171.' when
submitting an account creation request, and the account creation
request fails.

This patch updates the alternative mana KB server URL in
etc/koha-conf.xml from http://mana-test.koha-community.org to
https://mana-test.koha-community.org (the URL should start with https
instead of http). If the updated URL is used the account creation
request succeeds without causing any error messages.

To test:
1) Add <mana_config>http://mana-test.koha-community.org</mana_config> to
   /etc/koha/sites/<instancename>/koha-conf.xml (see etc/koha-conf.xml
   in the Koha code repository for an example of where to add this;
   <instancename> if using koha-testing-docker is kohadev).
2) Clear memcached and restart services so that the changes to your Koha
   instance configuration are recognised (if using koha-testing-docker
   run flush_memcached and then restart_all).
3) From the staff client home page go to Koha administration >
   Additional parameters > Share content with Mana KB.
4) Enable content sharing: change 'Use Mana KB for sharing content' to
   Yes and press Save.
5) Enter your first name, last name and email address in the Configure
   Mana KB section of the page and then click on 'Send to Mana KB'.
6) An error message is displayed, this may be something like:
   'malformed JSON string, neither tag, array, object, number, string
   or atom, at character offset 0 (before "<html>\r\n<head><tit...") at
   /usr/share/perl5/JSON.pm line 171.'
7) Change the mana server URL to https://mana-test.koha-community.org
   (see step 1), and repeat steps 2, 3 and 5.
8) Instead of an error message you should get 'You successfully created
   your Mana KB account. Check your mailbox and follow instructions.'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23144: (QA follow-up) Fix another POD error in svc/barcode
Julian Maurice [Wed, 19 Jun 2019 12:22:00 +0000 (14:22 +0200)]
Bug 23144: (QA follow-up) Fix another POD error in svc/barcode

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23144: Replace missing =cut in svc/header
Nick Clemens [Mon, 17 Jun 2019 19:20:55 +0000 (19:20 +0000)]
Bug 23144: Replace missing =cut in svc/header

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21073: (QA follow-up) Fix plugin-related tests
Tomas Cohen Arazi [Wed, 19 Jun 2019 18:38:20 +0000 (15:38 -0300)]
Bug 21073: (QA follow-up) Fix plugin-related tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22851: Style navigation links in serials modules like same links in other modules
Owen Leonard [Mon, 10 Jun 2019 16:49:36 +0000 (16:49 +0000)]
Bug 22851: Style navigation links in serials modules like same links in other modules

This patch makes minor markup changes to the serials sidebar menu
include so that links are displayed in a style consistent with similar
menus in other areas of the staff client.

This patch contains whitespace changes, so please use the "-w" flag when
viewing the diff.

To test, apply the patch and go to the Serials module. The links in the
sidebar menu should be displayed in the same style as the corresponding
menu on the Acquisitions home page.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23122: When searching callnumber in simple search, search option is not retained
Owen Leonard [Fri, 14 Jun 2019 14:59:34 +0000 (14:59 +0000)]
Bug 23122: When searching callnumber in simple search, search option is not retained

This patch copies some code and markup from the staff client where call
number phrase searches are correctly handled. A check for
'ms_callnumcommaphr' is copied from search_indexes.inc. Handling of
commas and dashes is copied from search.pl.

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

 - From the OPAC main page, select "Call number" from the search pull
   down at the top of the page.
 - Perform any search (it need not return results).
 - Verify that the search option retains the "Call number" selection.
 - Repeat the test with and without the OPACNumbersPreferPhrase system
   preference enabled.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 23061: Add column/print/export feature on checkout history page
Owen Leonard [Thu, 6 Jun 2019 12:24:41 +0000 (12:24 +0000)]
Bug 23061: Add column/print/export feature on checkout history page

This patch adds columns configuration and export features to the
checkout history page.

This patch also removes some inline CSS: "overflow:hidden" from both the
checkout and holds history pages. This was breaking the table controls
tooltips, and didn't appear to me to be necessary.

To test, apply the patch and restart Plack (or restart_all on
kohadevbox).

 - Open a patron's checkout history page in the staff client.
 - The table of checkouts should have controls at the top.
   for columns configuration and export/print.
 - These controls should work correctly.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22966: Add Norwegian library and patron names for installer
Petter von Krogh [Wed, 22 May 2019 15:38:21 +0000 (15:38 +0000)]
Bug 22966: Add Norwegian library and patron names for installer

 THe Norwegian installer had reused english smaple atrons and libraries,
 this patch fixes this.

 test plan:
 empty database
 install norwegian translation
 run the web-installer and choose norwegian language
 select sample libraries and patrons
 make sure there are no errors

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
I trust Petter with Norwegian names, so I didn't spell check them :)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22653: DBRev 19.06.00.007
Martin Renvoize [Wed, 19 Jun 2019 12:07:23 +0000 (13:07 +0100)]
Bug 22653: DBRev 19.06.00.007

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22653: Remove unimplemented RotationPreventTransfers system preference
Katrin Fischer [Mon, 17 Jun 2019 21:12:25 +0000 (21:12 +0000)]
Bug 22653: Remove unimplemented RotationPreventTransfers system preference

This removes the RotationPreventTransfers system preference
from updated and new installations.

To test:
- Verify you have the RotationPreventTransfers pref
- Apply patch and run database update
- Verify the preference no longer exists in your system
  - in the sys pref editor
  - in your database:

SELECT * from systempreferences WHERE variable = "RotationPreventTransfers";

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21073: (QA follow-up) Fix typo in class name
Tomas Cohen Arazi [Tue, 18 Jun 2019 19:36:42 +0000 (16:36 -0300)]
Bug 21073: (QA follow-up) Fix typo in class name

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22835: (follow-up) Remove comented code
Agustin Moyano [Thu, 16 May 2019 03:09:38 +0000 (00:09 -0300)]
Bug 22835: (follow-up) Remove comented code

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22835: (follow-up) Remove unwanted warn
Agustin Moyano [Fri, 3 May 2019 03:15:12 +0000 (00:15 -0300)]
Bug 22835: (follow-up) Remove unwanted warn

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22835: Serve plugin static files through API
Agustin Moyano [Thu, 25 Apr 2019 05:13:37 +0000 (02:13 -0300)]
Bug 22835: Serve plugin static files through API

This patch serves static files declared within plugins.

To declare static files the plugin must implement the method 'static_routes' which retrieves the spec of static file routes to add to the API.

Once those routes are added to the API, the become available through the /api/v1/contrib/<api_namespace>/static/<path>/<to>/<file>/<filename> endpoint.

To test:
1) Install bug-22835-plugin.kpz
2) Point your browser to /api/v1/contrib/kitchensink/static/static_files/mm.gif
CHECK => No file is served
3) Apply this patch
4) restart_all
5) Repeat step 2.
SUCCESS => File is served!
6) Sign off

Sponsored-by: Theke Solutions
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22834: Add Koha::Plugins::Base->bundle_path
Tomas Cohen Arazi [Thu, 2 May 2019 18:51:30 +0000 (15:51 -0300)]
Bug 22834: Add Koha::Plugins::Base->bundle_path

This patch adds a 'bundle_path' method that return the base path for
assets included in the plugin. The idea is that it will be used for
calculation of the absolute path in the filesystem for static content.

To test:
- Apply the unit tests patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Plugins.t
=> FAIL: The method is not implemented
- Apply this patch
- Run:
 k$ prove t/db_dependent/Plugins.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22834: Add tests for Koha::Plugins::Base->bundle_path
Tomas Cohen Arazi [Thu, 2 May 2019 18:51:17 +0000 (15:51 -0300)]
Bug 22834: Add tests for Koha::Plugins::Base->bundle_path

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21073: DBRev 19.06.00.006
Martin Renvoize [Tue, 18 Jun 2019 16:23:15 +0000 (17:23 +0100)]
Bug 21073: DBRev 19.06.00.006

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21073: (QA follow-up) Avoid unnecessary unless/else construct
Tomas Cohen Arazi [Mon, 17 Jun 2019 11:18:48 +0000 (08:18 -0300)]
Bug 21073: (QA follow-up) Avoid unnecessary unless/else construct

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21073: (QA follow-up) Don't call -> twice!
Tomas Cohen Arazi [Mon, 17 Jun 2019 11:17:43 +0000 (08:17 -0300)]
Bug 21073: (QA follow-up) Don't call -> twice!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21073: (QA follow-up) Simplify logic
Tomas Cohen Arazi [Mon, 17 Jun 2019 11:07:03 +0000 (08:07 -0300)]
Bug 21073: (QA follow-up) Simplify logic

This patch simplifies the logic inside GetPlugins so:
- It uses Koha::Plugins::Methods instead of plain SQL
- It doesn't do more DB calls than needed, by filtering on method in the
  initial query to Koha::Plugins::Methods.

It also relies on the (newly introduced) ->is_enabled method in
Koha::Plugins::Base, for better readability.

To test:
- Run the tests and notice no behaviour changes are introduced.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21073: (QA follow-up) Add ->is_enabled and tests
Tomas Cohen Arazi [Mon, 17 Jun 2019 11:06:23 +0000 (08:06 -0300)]
Bug 21073: (QA follow-up) Add ->is_enabled and tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21073: (QA follow-up) Only public subs should be considered
Tomas Cohen Arazi [Fri, 14 Jun 2019 19:51:07 +0000 (16:51 -0300)]
Bug 21073: (QA follow-up) Only public subs should be considered

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21073: (follow-up) Add Class::Inspector to PerlDependencies
Tomas Cohen Arazi [Fri, 14 Jun 2019 19:38:15 +0000 (16:38 -0300)]
Bug 21073: (follow-up) Add Class::Inspector to PerlDependencies

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21073: (follow-up) QA fixes after rebase
Agustin Moyano [Wed, 15 May 2019 23:49:08 +0000 (20:49 -0300)]
Bug 21073: (follow-up) QA fixes after rebase

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21073: Restore filtering by metadata
Tomas Cohen Arazi [Thu, 2 May 2019 16:15:49 +0000 (13:15 -0300)]
Bug 21073: Restore filtering by metadata

This patch restores filtering the plugins by metadata. That got lost on
rebase at some point. Regression tests are added on a prior patch.

To test:
- Have the 'regression tests for GetPlugins' patch applied
- Run:
  $ kshell
 k$ prove t/db_dependent/Plugins.t
=> FAIL: Tests fail!
- Apply this patch
- Run:
 k$ prove t/db_dependent/Plugins.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21073: Regression tests for GetPlugins
Tomas Cohen Arazi [Thu, 2 May 2019 17:00:52 +0000 (14:00 -0300)]
Bug 21073: Regression tests for GetPlugins

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21073: (QA follow-up) Remove unused libraries
Tomas Cohen Arazi [Thu, 2 May 2019 15:12:10 +0000 (12:12 -0300)]
Bug 21073: (QA follow-up) Remove unused libraries

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21073: (QA follow-up) Restore check on template
Tomas Cohen Arazi [Thu, 2 May 2019 15:14:50 +0000 (12:14 -0300)]
Bug 21073: (QA follow-up) Restore check on template

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21073: (QA follow-up) Atomic update shouldn't fail if plugins are disabled
Tomas Cohen Arazi [Thu, 2 May 2019 14:42:18 +0000 (11:42 -0300)]
Bug 21073: (QA follow-up) Atomic update shouldn't fail if plugins are disabled

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21073: Upgrade the kitchen sink plugin to get rid of warnings
Kyle M Hall [Mon, 22 Apr 2019 13:58:18 +0000 (09:58 -0400)]
Bug 21073: Upgrade the kitchen sink plugin to get rid of warnings

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21073: Improve plugin performance
Kyle M Hall [Fri, 13 Jul 2018 16:40:52 +0000 (12:40 -0400)]
Bug 21073: Improve plugin performance

Right now, to check if a plugin is functional and what methods it exposes we load the module and test for a given method at run time. This is highly inefficient. It makes far more sense to do this at install time and store the data in the db. I believe we should store a table of methods that each plugin exposes and check that instead. Then, at install time we can test that a) the plugin can be loaded and b) add the available methods to the plugin_methods table.

Test Plan:
1) Apply this patch
2) Restart all the things
3) Run updatedatabase.pl
4) Verify you can use existing plugins
5) Verify you can install new plugins

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>