]> git.koha-community.org Git - koha.git/log
koha.git
6 years agoBug 14716: Fix more unencoded url parameters.
Ere Maijala [Fri, 26 Oct 2018 15:13:10 +0000 (18:13 +0300)]
Bug 14716: Fix more unencoded url parameters.

Fixes issues found during QA and unifies the SubfieldSelect function across the utils xsl's.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 14716: URI-encode URLs in NORMARC xsl templates.
Ere Maijala [Fri, 14 Sep 2018 22:32:07 +0000 (01:32 +0300)]
Bug 14716: URI-encode URLs in NORMARC xsl templates.

https://bugs.koha-community.org/show_bug.cgi?id=14716

Test plan:

1. Catalog a record with series name "Series & more"
2. Find the record
3. Make sure clicking the "Series & more" link works and the ampersand is properly encoded in the URL.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 14716: URI-encode URLs in UNIMARC xsl templates.
Ere Maijala [Thu, 22 Feb 2018 13:37:25 +0000 (15:37 +0200)]
Bug 14716: URI-encode URLs in UNIMARC xsl templates.

https://bugs.koha-community.org/show_bug.cgi?id=14716

Test plan:

1. Catalog a record with series name "Series & more"
2. Find the record
3. Make sure clicking the "Series & more" link works and the ampersand is properly encoded in the URL.
4. Also try the attached test records and make sure their links work.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 14716: URI-encode URLs in MARC21 xsl templates.
Ere Maijala [Thu, 22 Feb 2018 13:37:25 +0000 (15:37 +0200)]
Bug 14716: URI-encode URLs in MARC21 xsl templates.

https://bugs.koha-community.org/show_bug.cgi?id=14716

Test plan:

1. Catalog a record with series name "Series & more"
2. Find the record
3. Make sure clicking the "Series & more" link works and the ampersand is properly encoded in the URL.
4. Also try the attached test records and make sure their links work.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21581: (QA follow-up) Update comment according to code in SearchAuthorities
Josef Moravec [Mon, 29 Oct 2018 22:35:57 +0000 (22:35 +0000)]
Bug 21581: (QA follow-up) Update comment according to code in SearchAuthorities

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21581: Pass through authorities indexes
Nick Clemens [Tue, 16 Oct 2018 15:09:32 +0000 (15:09 +0000)]
Bug 21581: Pass through authorities indexes

To test:
 1 - Define a rule:
  Matching rule code: LCAUTH
  Match threshold: 100
  Record type: Authority record
  MATCH POINTS
  Search index: LC-card-number
  Score: 100
  Tag: 010
  Subfield: a
 2 - Have a record with an LC number in 010
 3 - Export it
 4 - Edit the record in Koha, move the value from 010 to another field
 5 - Import the original record
 6 - Use the matching rule above, you expect it won't match (nothing in 010 anymore)
 7 - It matches?!?!?!
 8 - Enable zebra logging in koha-conf.xml
  <zebra_loglevels>none,fatal,warn,request,info</zebra_loglevels>
 9 - tail -f /var/log/koha/kohadev/zebra-output.log
10 - On manage marc apply matchign with no rule, then reapply with rule
11 - View the output in the log - the index searched is 'Any'
12 - Apply patch
13 - Reapply matching
14 - Note we search the expected index and no match is found

NOTE: By applying bug 21579, I was able to view the difference, and
      see that it didn't match identically, because I had moved the
      value from 010 to 155. No log checking needed. clean/delete batch.
      Apply patch, no match. clean/delete batch.
      Edit authority back, matches.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21581: Unit tests and updated data
Nick Clemens [Wed, 24 Oct 2018 11:53:07 +0000 (11:53 +0000)]
Bug 21581: Unit tests and updated data

To test:
1 - Apply this patch only
2 - prove -v t/db_dependent/Search.t
3 - It fails
4 - Apply second patch
5 - prove -v t/db_dependent/Search.t
6 - It passes!

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21702: (follow-up) Simplify checks and use standard fallback behaviour
Tomas Cohen Arazi [Sat, 27 Oct 2018 12:22:00 +0000 (09:22 -0300)]
Bug 21702: (follow-up) Simplify checks and use standard fallback behaviour

This patch acknowledges the fact that some checks here are done in a way
that is not standard these days. This checks are originally done
multiple times in different ways. output_and_exit_if_error should be
used.

This implies a minor behaviour change: if the passed (in the URL)
borrowernumber doesn't exist, it sends the user to a 'Patron doesn't
exist page' instead of the circulation page for the borrowernumber.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21702: Make mancredit.pl use the patron id for the staff user
Tomas Cohen Arazi [Sat, 27 Oct 2018 12:11:33 +0000 (09:11 -0300)]
Bug 21702: Make mancredit.pl use the patron id for the staff user

I think unsafe SQL modes and the fact that manager_id has no FK allowed this to go unnoticed. But now we catch it!

To test:
- On a patron, try adding a new manual credit of any type
=> FAIL: It fails telling the userid of the logged user is not a valid integer!
- Apply this patch
- Try adding a manual credit of any type
=> SUCCESS: Manual credit added!
- Sign off!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13098: Fix POD for Koha::Account::Offsets::total
Tomas Cohen Arazi [Sat, 27 Oct 2018 11:34:39 +0000 (08:34 -0300)]
Bug 13098: Fix POD for Koha::Account::Offsets::total

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13098: Sum at DBMS level
Jonathan Druart [Thu, 25 Oct 2018 19:13:27 +0000 (16:13 -0300)]
Bug 13098: Sum at DBMS level

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13098: Do not compare with precision
Jonathan Druart [Thu, 25 Oct 2018 19:06:14 +0000 (16:06 -0300)]
Bug 13098: Do not compare with precision

Formating will be done TT side

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13098: Make _FixAccountForLostAndReturned refund the right thing
Tomas Cohen Arazi [Thu, 18 Oct 2018 16:08:42 +0000 (13:08 -0300)]
Bug 13098: Make _FixAccountForLostAndReturned refund the right thing

This patch changes the logic inside the method, to make it match the
behaviour described on the tests.

It uses the existing offsets on the account_offsets table to gather
information about the right things to refund.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/Circulation.t
=> FAIL: Tests don't pass!
- Apply this patch
- Run
 k$ prove t/db_dependent/Circulation.t
=> SUCCESS: Tests pass!
- Sign off :-D

Followed test plan, patch works as described. All three patches pass QA
test tool
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13098: Tests for all _FixAccountForLostAndReturned use cases
Tomas Cohen Arazi [Fri, 12 Oct 2018 13:27:06 +0000 (10:27 -0300)]
Bug 13098: Tests for all _FixAccountForLostAndReturned use cases

This patch introduces tests for all the use cases for
_FixAccountForLostAndReturned. This includes the following scenarios
before _FixAccountForLostAndReturned is called:

- Full write off (the original issue)
- Full payment
- No payment or write off
- Partial payment and partial write off

Written off debts (L lines) are just skipped, any kind of payment is
added and then refund as a single credit (CR). Amount outstanding is set
to 0. Offsets need to be generated for paper trail of this decisions.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/Circulation.t
=> FAIL: Tests fail because _FixAccountForLostAndReturned is not doing
the right thing :-D

Followed test plan, patch works as described
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13098: Add Koha::Account::Offsets->total
Tomas Cohen Arazi [Thu, 18 Oct 2018 15:57:33 +0000 (12:57 -0300)]
Bug 13098: Add Koha::Account::Offsets->total

This patch introduces this trivial method for returning the sum0 result
of the amount columns of a Koha::Account::Offsets set.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Account/Offsets.t
- Sign off :-D

Followed test plan, patch worked as described
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21596: (follow-up) Handle updated_on part 2
Jonathan Druart [Mon, 29 Oct 2018 20:27:52 +0000 (17:27 -0300)]
Bug 21596: (follow-up) Handle updated_on part 2

It seems that I have over complicated things here, now
t/db_dependent/Koha/Object.t is failing

Apparently everything is ok with this change.
Test plan:
prove -r prove -r t/db_dependent/Koha/Object.t t/Auth_with_shibboleth.t
t/db_dependent/Patrons.t t/db_dependent/Koha/Patron*

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20720: (QA follow-up) Some minor corrections
Katrin Fischer [Sun, 28 Oct 2018 05:43:30 +0000 (05:43 +0000)]
Bug 20720: (QA follow-up) Some minor corrections

Made some corrections to countries, spelling and
changed OPUS entry.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20720: Found some more sponsors to add to 'about'
Martin Renvoize [Sat, 20 Oct 2018 12:49:51 +0000 (13:49 +0100)]
Bug 20720: Found some more sponsors to add to 'about'

git log|grep -i "sponsored-by"|sort -n | uniq
git log|grep -i "sponsored by"|sort -n | uniq

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20720: Using git Sponsored-by lines to update 'about'
Martin Renvoize [Fri, 19 Oct 2018 16:17:41 +0000 (17:17 +0100)]
Bug 20720: Using git Sponsored-by lines to update 'about'

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21242: If not searching for patron, move to log viewer
Nick Clemens [Fri, 17 Aug 2018 12:22:50 +0000 (12:22 +0000)]
Bug 21242: If not searching for patron, move to log viewer

To test:
1 - Bring up a patron
2 - Click 'Modification log'
3 - Note you get borrower info
4 - Move the object field into info field
5 - Submit
6 - You are now on the 'Log viewer' page with admin options, not
borrower circ options

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21634: Keep "circulation" module selected when viewing patron's logs
Jonathan Druart [Tue, 23 Oct 2018 13:15:11 +0000 (10:15 -0300)]
Bug 21634: Keep "circulation" module selected when viewing patron's logs

To recreate:
- View a patron detail page
- Click "Modification log"
- Notice that the url has "modules=MEMBERS&amp;modules=circulation", but
the "Circulation" option is not selected in the "Modules" dropdown list.
This is because of uppercase vs lowercase.

The bug:
- Right after you click "Modification log" you will see all the
"members" and "circulation" logs
- Submit the form without changing any input/select from the form
=> Now you only see the "members" logs.

Test plan:
- Apply the patch
- Click "Modification log"
- Notice that the url now contains "modules=MEMBERS&amp;modules=CIRCULATION"
- Submit the form without changing any input/select from the form
=> Now you have the "members" and "circulation" modules selected.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21613: (QA follow-up) Resolve warning on $ENV{_} - avoid autovivification
Jonathan Druart [Fri, 19 Oct 2018 14:36:16 +0000 (11:36 -0300)]
Bug 21613: (QA follow-up) Resolve warning on $ENV{_} - avoid autovivification

See C4::Circulation::SendCirculationAlert
3355     my $do_not_lock = ( exists $ENV{_} && $ENV{_} =~ m|prove| ) || $ENV{KOHA_NO_TABLE_LOCKS};

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21613: (QA follow-up) Resolve warning on $ENV{_}
Marcel de Rooy [Fri, 19 Oct 2018 08:15:56 +0000 (10:15 +0200)]
Bug 21613: (QA follow-up) Resolve warning on $ENV{_}

Some shells may not pass the program name in underscore, and cron also
does not like it here:
Use of uninitialized value $ENV{"_"} in pattern match (m//) at Koha/Database.pm line 79.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21613: Turn strict SQL modes on for tests
Jonathan Druart [Thu, 18 Oct 2018 23:06:07 +0000 (20:06 -0300)]
Bug 21613: Turn strict SQL modes on for tests

This patch will turn the strict SQL modes on When tests are ran with prove.

Test plan:
- Apply the first patch
- prove t/db_dependent/Koha/Database.t
=> Will pass if you have <strict_sql_modes>1</strict_sql_modes> in your
koha-conf.xml
=> Will fail otherwise
- Apply the second patch
- prove t/db_dependent/Koha/Database.t
=> Will pass whatever the value of strict_sql_modes in your
koha-conf.xml

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21613: Add a test
Jonathan Druart [Thu, 18 Oct 2018 23:06:03 +0000 (20:06 -0300)]
Bug 21613: Add a test

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21349: Instructors with special characters in cardnumber cannot be removed from...
Mark Tompsett [Fri, 14 Sep 2018 23:06:49 +0000 (16:06 -0700)]
Bug 21349: Instructors with special characters in cardnumber cannot be removed from course reserves

The cardnumber can contain strange non-javascript-friendly
characters. This patch converts all the internal references
to borrowernumber, but displays the cardnumber when showing
list of matching users.

TEST PLAN
---------
1) Make sure Course Reserves is being used. Check system preferences.
2) Make sure there is a Course entered.
3) Make sure there is a patron with an cardnumber which breaks
   the existing javascript (eg. Ka-boom:Ka-boom!KABOOM@#$!)
4) Go into the course list.
5) Click the course name link
6) In the "Instructor Search" box enter the patron name.
7) Select the patron which has the ugly cardnumber.
8) Click Save
   -- The course listing should have the new teacher listed.
9) Click the course name link again.
10) Click 'Remove' beside the instructor's name.
    -- nothing happens, and inspecting the error console gives
       you the ugly error described in comment #0
11) apply this patch
12) restart_all
13) sudo service apache2 restart
14) refresh the page.
15) click 'Remove' beside the instructor's name.
    -- name is removed.
16) Click Save
    -- the course listing no longer lists the new teacher.
17) Actually confirm that adding and removing others normally
    works as expected.
18) run koha qa test tools.

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21186: (follow-up) Incorrect Bootstrap modal event name in multiple templates
Owen Leonard [Thu, 25 Oct 2018 15:24:29 +0000 (15:24 +0000)]
Bug 21186: (follow-up) Incorrect Bootstrap modal event name in multiple templates

This patch addresses a few more instances of this problem which I didn't
catch in my first pass.

To test, apply the patch and clear your browser cache if necessary.

- Go to Circulation -> Check in and check in an item which has a hold.
  - When the 'Hold found' modal appears the checkin barcode field
    behind it should be disabled.
  - When the modal is dismissed the checkin field should be enabled
    again and focus should be on that field.

- Go to Administration -> Library groups.
  - Click the "Add group" button. The cursor focus should be on the
    title field.

- Go to Tools -> MARC modification templates.
  - Click the "New template" button. The cursor focus should be on the
    name field.

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21186: Incorrect Bootstrap modal event name in multiple templates
Owen Leonard [Wed, 8 Aug 2018 19:03:38 +0000 (19:03 +0000)]
Bug 21186: Incorrect Bootstrap modal event name in multiple templates

Modals in the staff client which load data via AJAX require an "on
close" action in order to clear the modal of the loaded data. The
problem presents itself the second time the modal is opened: The
"loading" message doesn't appear, and the data from the previous link
is shown until the new data loads.

To test, apply the patch and test the following pages. In each case,
click multiple instances of the modal trigger link/button to confirm
that the "loading" message always appears between re-displays of the
modal.

- Acquisitions -> Vendor -> Add to basket -> From a staged file -> Add orders
  - Test the "MARC" and "Card" links
- Acquisitions -> EDIFACT messages
  - Test the "View message" button
- Acquisitions -> Vendor -> Add to basket -> From an existing record
  - Test "View MARC" link
- Acquisitions -> Vendor -> Invoices -> Invoice -> Receipt page
  - Test the "Order," "MARC," and "Card" links.
- Catalog -> Bibliographic record details
  - Test the MARC Preview link.
- Cataloging -> Cataloging search results
  - Test the Actions -> MARC preview and Actions -> Card preview menu
    items
- Cataloging -> Cataloging search results -> Merge
  - Test the "View MARC" linkscataloguing/merge.tt
- Tools -> Patron lists -> Actions -> Print patron cards
- Tools -> Batch record modification -> Results -> Show MARC
- Tools -> Staged MARC record management -> View batch
  - Test MARC preview shown when you click a staged title

Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21621: Remove incorrect GROUP BY from tools/letter.pl
Jonathan Druart [Fri, 19 Oct 2018 15:06:43 +0000 (12:06 -0300)]
Bug 21621: Remove incorrect GROUP BY from tools/letter.pl

Fix:
  'koha_kohadev.letter.name' isn't in GROUP BY

DBD::mysql::db selectall_arrayref failed: 'koha_kohadev.letter.name' isn't in GROUP BY [for Statement "SELECT branchcode, module, code, name, branchname
            FROM letter
            LEFT OUTER JOIN branches USING (branchcode)
     GROUP BY branchcode,module,code ORDER BY module, code, branchcode"] at /home/vagrant/kohaclone/tools/letter.pl line 383.

Test plan:
- Copy some default notice templates for specific libraries
- List the different notice templates
- Confirm that notices appear only one, with "all libraries" you will see all

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21703: Fix filter on dataurl variable to allow placing holds in staff again
Jonathan Druart [Sun, 28 Oct 2018 11:59:51 +0000 (08:59 -0300)]
Bug 21703: Fix filter on dataurl variable to allow placing holds in staff again

We must not encode & again and use the url filter, instead of uri.

To test:
- Search for a record in staff
- Go to holds
- Search for patrons, multiple should be displayed
- Pick a patron by clicking on the name
- Verify an error is shown and the URL is incorrect
- Apply patch
- Repeat test above, placing a hold should now work.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21311: (follow-up) Adjust wording of failed login message
Marcel de Rooy [Thu, 25 Oct 2018 09:37:42 +0000 (11:37 +0200)]
Bug 21311: (follow-up) Adjust wording of failed login message

Based on the feedback of Jonathan, Katrin, Mark and Martin (thx), adding
the general remark that if lockout is enabled, an account may be locked
out after x attempts. This does not say that the account on hand is
locked or not.

Adding a <p> tag between 'Log in'-button and 'Forgot your password' for
presentation.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21311: Remove locked message from opac-auth.tt
Marcel de Rooy [Wed, 10 Oct 2018 14:04:38 +0000 (16:04 +0200)]
Bug 21311: Remove locked message from opac-auth.tt

We should not expose more information than needed when someone tries
to login with invalid credentials. Saying that an account is locked
reveals that the account exists (or perhaps an email address).

Trivial fix. Keeping the var too_many_login_attempts for staff.
Note: We do not remove this distinction for the staff client here (in the
assumption that a library may well have additional security measures in
place for staff client). But it could be done too (on another report).

Test plan:
Enable lockout feature.
Enter invalid credentials until account locks out (on OPAC !!)
Note that message does no longer change to 'Account is locked'.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21641: (follow-up) Address wrong call method
Andrew Isherwood [Thu, 25 Oct 2018 13:17:59 +0000 (14:17 +0100)]
Bug 21641: (follow-up) Address wrong call method

This patch substitutes C4::Accounts->getnextacctno for
C4::Accounts::getnextacctno since getnextacctno is only expecting to be
passed a borrowernumber

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21641: (follow-up) Address additional call
Andrew Isherwood [Thu, 25 Oct 2018 12:23:31 +0000 (13:23 +0100)]
Bug 21641: (follow-up) Address additional call

This patch makes the same change as the main patch, just for an
additional occurance of getnextacctno

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21641: Added C4::Accounts to getnextacctno() call
Alex Buckley [Wed, 24 Oct 2018 03:37:57 +0000 (03:37 +0000)]
Bug 21641: Added C4::Accounts to getnextacctno() call

Test plan:
1. Fetch and checkout the master branch
2. Checkout an item with a rental charge associated with it to a user
and notice an error is thrown
3. Apply patch
4. Restart memcached and plack
5. Repeat steps 1 and 2 and notice the checkout happens successfully

Sponsored-By: Catalyst IT
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21611: Fix priority dropdown for holds
Nick Clemens [Thu, 25 Oct 2018 11:29:28 +0000 (11:29 +0000)]
Bug 21611: Fix priority dropdown for holds

To Test:
 1 - Find a record
 2 - Place several holds some with differing pickup locations
 3 - Check in one hold to confirm as waiting
 4 - Check another in to set a hold in transit
 5 - View the holds queue for the record:
    /cgi-bin/koha/reserve/request.pl?biblionumber=##
 6 - Confirm found holds are incorrect
 7 - Apply patch
 8 - Reload
 9 - Confirm holds look correct
10 - Alter the values of HoldsSplitQueue and HoldsSplitQueueNumbering
11 - Confirm things still look right

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21704: (QA follow-up) Fix evil tabs
Katrin Fischer [Sun, 28 Oct 2018 16:10:52 +0000 (16:10 +0000)]
Bug 21704: (QA follow-up) Fix evil tabs

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21704: (follow-up) Remove unused 'frameworkcode' template param
Tomas Cohen Arazi [Sun, 28 Oct 2018 12:56:17 +0000 (09:56 -0300)]
Bug 21704: (follow-up) Remove unused 'frameworkcode' template param

This patch removes the 'frameworkcode' template parameter. Now the
'framework' object is passed, and everytime the frameworkcode is needed
on the template, framework.frameworkcode is called.

To test:
- Apply this patch
- Run:
  $ grep ' frameworkcode ' koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt
=> SUCCESS: There's no use of 'frameworkcode' in the template
- Sign off :-D

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21704: Edit framework subfield link is broken (TT filter)
Tomas Cohen Arazi [Sun, 28 Oct 2018 12:36:32 +0000 (09:36 -0300)]
Bug 21704: Edit framework subfield link is broken (TT filter)

This patch removes URL building from the controller
(admin/marctagstructure.pl) and does it on the templates, using the
right 'uri' filter for the query parameters.

It also removes:
- No longer used attributes that are passed to the template
- Duplicated code in the templates

To test:
- Go to Home > Administration > MARC bibliographic framework
- On any of the listed frameworks, pick the 'MARC structure' action in
the dropdown
- On any subfield, hover on the actions dropdown
=> FAIL: The URLs are wrongly formed
- Click on the links
=> FAIL: You get errors because of the bad URL
- Apply this patch
- Reload the 'MARC structure' page
- On any subfield, hover on the actions dropdown
=> SUCCESS: LInks look correct
- Click on any of them
=> SUCCESS: They work!
- Use the 'Display only used tags/subfields' checkbox
=> SUCCESS: No behaviour change!
- Sign off :-D

Sponsored-by: Theke Solutions
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 18591: Fix pluralization of type
Nick Clemens [Sat, 27 Oct 2018 15:53:34 +0000 (15:53 +0000)]
Bug 18591: Fix pluralization of type

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 18591: Add missing schema file
Nick Clemens [Sat, 27 Oct 2018 15:03:03 +0000 (15:03 +0000)]
Bug 18591: Add missing schema file

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21435: Update two-column templates with Bootstrap grid: Tools part 3
Owen Leonard [Thu, 3 May 2018 17:06:54 +0000 (17:06 +0000)]
Bug 21435: Update two-column templates with Bootstrap grid: Tools part 3

This patch modifies several tools templates to use the
Bootstrap grid instead of YUI.

This patch also removes obsolete "text/javascript" attributes from
<script> tags and "text/css" attributes from <style> tags in the
modified templates.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:

 - Tools -> MARC modification templates
   - View and edit templates
 - Tools -> Batch patron modification
   - Test each step of the process
 - Tools -> Overdue notice/status triggers
 - Tools -> Upload patron images
   - Test each step of the upload process
 - Tools -> Quote editor
   -> Quote uploader
     - Import quotes

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21434: (follow-up) Switch two-column templates to Bootstrap grid: Tools part 2
Owen Leonard [Fri, 12 Oct 2018 14:23:49 +0000 (14:23 +0000)]
Bug 21434: (follow-up) Switch two-column templates to Bootstrap grid: Tools part 2

This follow-up corrects CSS which was dependent on YUI-specific markup
context.

To test, apply the patch, regenerate the staff client CSS, go to Tools
-> Calendar.

- Click any date on the calendar
- In the entry form the checkbox and radio button options should be
  styled correctly.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21434: Update two-column templates with Bootstrap grid: Tools part 2
Owen Leonard [Thu, 3 May 2018 16:48:34 +0000 (16:48 +0000)]
Bug 21434: Update two-column templates with Bootstrap grid: Tools part 2

This patch modifies several tools templates to use the
Bootstrap grid instead of YUI.

This patch also removes obsolete "text/javascript" attributes from
<script> tags and "text/css" attributes from <style> tags in the
modified templates.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:

 - Tools -> Export data
 - Tools -> Calendar
 - Tools -> Import patrons
 - Tools -> Inventory
 - Tools -> Staged MARC management
   - View batches and batch details

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20450: (follow-up) Add missing template filters
Owen Leonard [Thu, 27 Sep 2018 15:36:28 +0000 (15:36 +0000)]
Bug 20450: (follow-up) Add missing template filters

This patch adds two missing template filters as pointed out by the
template test.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20450: Add collection to item table when placing a hold on a specific copy (OPAC)
Katrin Fischer [Thu, 9 Aug 2018 22:13:32 +0000 (22:13 +0000)]
Bug 20450: Add collection to item table when placing a hold on a specific copy (OPAC)

This patch adds a new collection column to the item table when selecting
a specific item for a hold. The column will only appear if at least
one item has a collection set.

To test, in OPAC:
- Place a specific hold on
  - a record with one or more items with collections
  - a record with one or more items without collections
- Verify the collections display correctly when they exist
- Verify the table still works as expected

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20450: Add collection to item table when placing a hold on a specific copy (Intranet)
Katrin Fischer [Thu, 9 Aug 2018 21:28:30 +0000 (21:28 +0000)]
Bug 20450: Add collection to item table when placing a hold on a specific copy (Intranet)

This patch adds a new collection column to the item table when selecting
a specific item for a hold. The column will only appear if at least
one item has a collection set.

To test, in staff:
- Place a specific hold on
  - a record with one or more items with collections
  - a record with one or more items without collections
- Verify the collections display correctly when they exist
- Verify the table still works as expected

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20896: Move serial enumeration after callnumber on intranet detail page
Katrin Fischer [Wed, 8 Aug 2018 19:52:26 +0000 (19:52 +0000)]
Bug 20896: Move serial enumeration after callnumber on intranet detail page

The column with serial enumeration/chronology information is moved
from the back to the right of itemcallnumber on the intranet detail
page.

To test:
- Apply patch
- Look at different detail pages in staff:
  - 1 or more items have serial enumeration information
  - no item has serial enumeration informatoin
- Verify
  - itemcallnumber is now followed by serial information, if
    an item with the field filled in exists for the record
  - all other functionality, like sorting, works as expected

https://bugs.koha-community.org/show_bug.cgi?id=20896

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19263: DBRev 18.06.00.047
Nick Clemens [Sat, 27 Oct 2018 14:20:37 +0000 (14:20 +0000)]
Bug 19263: DBRev 18.06.00.047

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19263: Rancor - 001 widget - changes to address QA issues
Cori Lynn Arnold [Fri, 12 Oct 2018 13:13:12 +0000 (13:13 +0000)]
Bug 19263: Rancor - 001 widget - changes to address QA issues

Changes were made to address QA issues from Comment 17

Tests:

1) Verify that a new entry for CONTROL_NUM_SEQUENCE is added to table authorised_value_categories
2) Edit a bib record using advanced editor and note that the 001 widget isn't there when adding/editing 001 field
3) Add a new row into authorised_values table with:
     a) CONTROL_NUM_SEQUENCE in category column
     b) authorised_value column has a string ending with a number i.e. sprLib0001
     c) lib column has a short string indicating the type of control number i.e. "Springfield Library"
4) Edit a bib record using the advanced editor and note that the 001 widget is there when adding / editing 001 field

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19263: Rancor - 001 widdget only for configured client
Cori Lynn Arnold [Tue, 9 Oct 2018 12:48:58 +0000 (12:48 +0000)]
Bug 19263: Rancor - 001 widdget only for configured client

Tests:

1) Verify that a new entry for CONTROL_NUM_SEQUENCE is added to table
authorised_value_categories
2) Edit a bib record using advanced editor and note that 001 widget
isn't there when adding/editing 001 field
3) Add a new row into authorised_values table with:
    a) CONTROL_NUM_SEQUENCE in category column
    b) authorised_value column has a string ending with a number i.e.
    "faw0001"
    c) lib column has a short string indicating type of control number
    i.e. "FAW"
4) Edit a bib record using the advanced editor and note that the 001
widget is there when adding / editing 001 field

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19263: Rancor - 001 widget - db update
Cori Lynn Arnold [Mon, 8 Oct 2018 16:10:16 +0000 (16:10 +0000)]
Bug 19263: Rancor - 001 widget - db update

    In advanced editor mode for cataloging, the 001 widget will
    automatically assign the next control number if a format is defined
    in  authorised_values table.

    To test you need access to the database.
    1) Verify that a new entry for CONTROL_NUM_SEQUENCE is added to
    table  authorised_value_categories
    2) Enter a new value for authorised_values with the authorised_value
    column ending in a number
    3) Edit a record using the advanced editor, specifically the 001
    field
    4) Note the new widget and option to increment or assign manually.

    The buttons fit within the widget now, and there's a database update
    to create the CONTROL_NUM_SEQUENCE.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 19263: Rancor - Add auto-001 widget
Jesse Weaver [Tue, 10 Nov 2015 19:04:14 +0000 (12:04 -0700)]
Bug 19263: Rancor - Add auto-001 widget

To test:

1 - Define a new authorised valued category "CONTROL_NUM_SEQUENCE"
2 - Add a value/sequence
    The authorised_value is the starting value - shoudl end in a number
    that can be incremented e.g. "control_sequence_001"
    The description field is the name for the seqeuence
    Opac description is unused
3 - Edit a record in rancor
4 - Note the new widget and option to increment or assign manually

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 18591: (RM follow-up) Fix filter
Nick Clemens [Sat, 27 Oct 2018 13:24:30 +0000 (13:24 +0000)]
Bug 18591: (RM follow-up) Fix filter

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 18591: DBRev 18.06.00.046
Nick Clemens [Sat, 27 Oct 2018 13:21:09 +0000 (13:21 +0000)]
Bug 18591: DBRev 18.06.00.046

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 18591: (follow-up) Add more POD
Andrew Isherwood [Fri, 5 Oct 2018 13:31:48 +0000 (14:31 +0100)]
Bug 18591: (follow-up) Add more POD

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 18591: (follow-up) Add missing html filters
Andrew Isherwood [Fri, 5 Oct 2018 13:20:11 +0000 (14:20 +0100)]
Bug 18591: (follow-up) Add missing html filters

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 18591: Allow any number of comments on ILLs
Magnus Enger [Mon, 20 Nov 2017 14:14:30 +0000 (14:14 +0000)]
Bug 18591: Allow any number of comments on ILLs

This patch makes it possible to add arbitrary comments to ILL
requests. Comments are read only and displayed in chronological
order. Comments can be added by librarians, but also added automatically
based on comments in the different protocols, so that comments from the
lending library can also be added.

To test:
- Enable the ILL module ("ILLModule" syspref + config in koha-conf.xml)
- Install the Dummy backend from here:
  https://github.com/PTFS-Europe/Dummy
- Create a Dummy ILL request
- Add comments to the request, checking that the name and borrowernumber
  of the person that added the comment is displayed ok
- Check that the displayed date and time the comment was submitted follows
  the "dateformat" syspref
- On the "List requests" page, check that the correct number of comments
  is displayed in the "Comments" column
- Check that the tests pass:
  prove t/db_dependent/Illcomments.t

Signed-off-by: andrew.isherwood@ptfs-europe.com
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 18591: Database updates
Magnus Enger [Sat, 11 Nov 2017 14:02:22 +0000 (14:02 +0000)]
Bug 18591: Database updates

Signed-off-by: andrew.isherwood@ptfs-europe.com
Bug 18591: (QA follow-up) Fix merge error in kohastructure.sql

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21526: (RM follow-up) Fix merge markers and a few extra filters
Nick Clemens [Fri, 26 Oct 2018 19:43:20 +0000 (19:43 +0000)]
Bug 21526: (RM follow-up) Fix merge markers and a few extra filters

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21680: Remove dead code - C4::Accounts::fixaccounts
Josef Moravec [Fri, 26 Oct 2018 09:28:01 +0000 (09:28 +0000)]
Bug 21680: Remove dead code - C4::Accounts::fixaccounts

Test plan:

git grep fixacccounts
-- without patch there are 3 occurences
-- with patch - no occurence of fixaccounts

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21654: Remove refund_lost_item_fee_rules.sql from the installer process
Jonathan Druart [Wed, 24 Oct 2018 22:50:02 +0000 (19:50 -0300)]
Bug 21654: Remove refund_lost_item_fee_rules.sql from the installer process

This is a follow-up patch for bug 14048 comment 97

Test plan:
  git grep refund_lost_item_fee_rules.sql
should not return any results

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21526: (QA follow-up) Fix all the tabs
Katrin Fischer [Fri, 26 Oct 2018 14:45:28 +0000 (14:45 +0000)]
Bug 21526: (QA follow-up) Fix all the tabs

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21526: Remove duplicated USE raw statement
Jonathan Druart [Wed, 17 Oct 2018 14:34:00 +0000 (11:34 -0300)]
Bug 21526: Remove duplicated USE raw statement

See patch on bug 21576 comment 14

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21526: uri escape TT variables when used in 'a href'
Jonathan Druart [Mon, 15 Oct 2018 22:44:51 +0000 (19:44 -0300)]
Bug 21526: uri escape TT variables when used in 'a href'

This patch has been generated with the script provided on bug 21576.
It only affects variable used in the href attribute of a link *when*
href it the first attribute of the node (grep "a href")

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21576: Preserve chomp chars for USE raw
Jonathan Druart [Wed, 17 Oct 2018 14:29:16 +0000 (11:29 -0300)]
Bug 21576: Preserve chomp chars for USE raw

See bug 21526 comments 5-7

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21576: Handle complex uri
Jonathan Druart [Mon, 15 Oct 2018 22:44:06 +0000 (19:44 -0300)]
Bug 21576: Handle complex uri

Only the first TT params in a href was taken into account.
This also takes care to replace into href attributes only (for instance not
title, etc.)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21576: Keep compatibility with QA script
Jonathan Druart [Mon, 15 Oct 2018 20:29:35 +0000 (17:29 -0300)]
Bug 21576: Keep compatibility with QA script

The QA script call 'missing_filters', it sounds better to keep it in
order to avoid fixing it and have a weird condition (if
module->can('subroutine_name')) to maintain

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21576: Add a developer script to fix missing TT filters
Jonathan Druart [Fri, 12 Oct 2018 16:57:49 +0000 (13:57 -0300)]
Bug 21576: Add a developer script to fix missing TT filters

See bug 13618 and bug 21526.

We need a script to add missing filters, or replace wrong ones.

Test plan:
- Add unescaped variables to .tt files
- prove xt/find-missing-filters.t
will warn about them
- perl misc/devel/add_missing_filters.pl
will add the missing/wrong filters
- prove xt/find-missing-filters.t
will now be happy

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21562: Fix sort by checkout date in the circulation table
Jonathan Druart [Mon, 22 Oct 2018 19:51:25 +0000 (16:51 -0300)]
Bug 21562: Fix sort by checkout date in the circulation table

The sort is done in SQL but resort by DataTables when displaying the
results.
iDataSort should be used to mimick date_due sort behavior.

Test plan:
- Check some items out
- Modify the checkout and due dates, like:
    2018-10-22
    2018-01-23
    2018-05-27
- Sort by checkout date, then due date. The sort should be correct for
all values of the DateFormat syspref

Followed test plan, patch works as described and passes QA test tool

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21629: Use cn_sort instead of itemcallnumber when displaying a list
Jonathan Druart [Mon, 22 Oct 2018 20:02:51 +0000 (17:02 -0300)]
Bug 21629: Use cn_sort instead of itemcallnumber when displaying a list

DBMS can sort callnumbers correctly using cn_sort. We should use it
showing a list's content.

Test plan:
- Add items with callnumber to a list
- Display the list
- List the content by callnumbers
=> Confirm that the records are correctly sorted by callnumber

Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21639: DBRev 18.06.00.045
Nick Clemens [Fri, 26 Oct 2018 17:09:18 +0000 (17:09 +0000)]
Bug 21639: DBRev 18.06.00.045

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21639: (follow-up) Adjust the other languages
Jonathan Druart [Thu, 25 Oct 2018 15:00:35 +0000 (12:00 -0300)]
Bug 21639: (follow-up) Adjust the other languages

uk-UA was wrong.
We should use the same file for all languages

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21639: Adjust the other languages
Nick Clemens [Wed, 24 Oct 2018 19:43:18 +0000 (19:43 +0000)]
Bug 21639: Adjust the other languages

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21639: Add phone transports to new and existing installs
Nick Clemens [Wed, 24 Oct 2018 01:33:42 +0000 (01:33 +0000)]
Bug 21639: Add phone transports to new and existing installs

To test:
1 - Confirm if you do or do not have 'phone' transports defined in the
message_transports table
2 - Apply patch
3 - Run updatedatabase
4 - If you didn't have them you should now
5 - Run updatedatabase again, confirm it doesn't error
6 - sudo koha-mysql kohadev
7 - DELETE from message_transports WHERE message_transport_type =
'phone'
8 - Run updatedatabase again
9 - Confirm the message transports table is restored
10 - Drop your DB (or reset_all in kohadevbox)
11 - Ensure the table is fully populated including phone notices

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21587: don't drop patrons to notify in order creation
Victor Grousset [Thu, 18 Oct 2018 09:54:58 +0000 (11:54 +0200)]
Bug 21587: don't drop patrons to notify in order creation

It only worked on modification.

== Test plan ==
1. have/create a active budget
2. have/create a fund
3. have/create a vendor with minimal info
4. create a basket with minimal info
5. add an order line to the basket
     Add a user in "To notify on receiving"
6. Modify the order
7. The patrons isn't here. This is the bug
8. Add a user in "To notify on receiving"
9. Save
10. Modify the order
11. The patron is here now
12. Apply this patch
13. Retry step 5 to 11 and patron should be saved on order creation
14. Celebrate! :D

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21669: Do not html filter TT assignement statements
Jonathan Druart [Thu, 25 Oct 2018 15:55:43 +0000 (12:55 -0300)]
Bug 21669: Do not html filter TT assignement statements

Why? Because we must filter the variables when we display them.
If we escape them on assignement, they will be double escaped:
  [% XXX = "<span>pouet</span>" | html %]
  [% XXX | html %]
  => &lt;span&gt;pouet&lt;/span&gt;

Also it will bring trouble if we are assigning a structure (see bug
21663 for instance).

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21663: Incorrect filter prevents predefined notes from being added to patron...
Owen Leonard [Thu, 25 Oct 2018 13:30:34 +0000 (13:30 +0000)]
Bug 21663: Incorrect filter prevents predefined notes from being added to patron acccounts

This patch removes an "html" filter from the template include which
allows one to add predefined nots to a patron's account.

To test, apply the patch and open a patron record for viewing or
checkout. Click the "Add message" button. The "predefined notes"
dropdown should contain the authorised_values you have with the
'BOR_NOTES' category.

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21603: Remove incorrect GROUP BY from C4::CourseReserves
Jonathan Druart [Thu, 18 Oct 2018 21:00:15 +0000 (18:00 -0300)]
Bug 21603: Remove incorrect GROUP BY from C4::CourseReserves

'koha_kohadev.c.department' isn't in GROUP BY

Test plan:
Prove that the test fail without this patch and pass with this patch
applied (switch on the SQL modes)

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21612: Remove incorrect GROUP BY's from Koha::VirtualShelves
Jonathan Druart [Thu, 18 Oct 2018 20:37:35 +0000 (17:37 -0300)]
Bug 21612: Remove incorrect GROUP BY's from Koha::VirtualShelves

'koha_kohadev.me.shelfname' isn't in GROUP BY

Same as
  commit 7e220e0d8f107cce63f32bfaa1919c04b4dea6e2
  Bug 20179: [sql_modes] Remove GROUP BY in get_shelves_containing_record

Test plan:
- Add public and privates shelves
- Shares some of them
- List them
=> The correct numbers of shelves must be displayed

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21635: [sql_modes] Remove GROUP BY clause in batchMod.pl
Jonathan Druart [Tue, 23 Oct 2018 13:35:24 +0000 (10:35 -0300)]
Bug 21635: [sql_modes] Remove GROUP BY clause in batchMod.pl

batchMod.pl: DBD::mysql::st execute failed: 'koha_kohadev.authorised_values.authorised_val
ue' isn't in GROUP BY [for Statement "SELECT authorised_value, lib FROM authorised_values LEFT JOIN authorised_values_branches ON ( id = av_id )  WHERE category = ? AND ( branchcode = ? OR branchcode IS NULL )
GROUP BY lib ORDER BY lib, lib_opac" with ParamValues: 0='WITHDRAWN', 1="CPL"] at /home/vagrant/kohaclone/tools/batchMod.pl line 396.

We must use Koha::AuthorisedValues->search instead of a raw SQL query.

Test plan:
Edit some items in a batch
Confirm that the dropdown list (AV) are correctly filled

We will lose speed efficiency here, but better to be consistent, then cache AV in Koha::AuthorisedValues

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 7143: Update about page for new devs Margaret Hade and Isobel Graham
Nick Clemens [Fri, 26 Oct 2018 16:25:02 +0000 (16:25 +0000)]
Bug 7143: Update about page for new devs Margaret Hade and Isobel Graham

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 20758: Fix for BrowseResultSelection typo
Isobel Graham [Sat, 20 Oct 2018 08:12:19 +0000 (09:12 +0100)]
Bug 20758: Fix for BrowseResultSelection typo

To test:
1) The  BrowseResultSelection description should no longer contain
"fromt"

Mentored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21337: (QA follow-up) Rename exception code
Marcel de Rooy [Thu, 25 Oct 2018 12:25:10 +0000 (14:25 +0200)]
Bug 21337: (QA follow-up) Rename exception code

Patron::Delete becomes Patron::FailedDelete.
Trivial replace.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: Remove html filter for LAST
Jonathan Druart [Thu, 25 Oct 2018 15:56:38 +0000 (12:56 -0300)]
Bug 13618: Remove html filter for LAST

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 13618: remove wrong html filter in 'Item search fields' admin
Jonathan Druart [Tue, 2 Oct 2018 11:46:58 +0000 (08:46 -0300)]
Bug 13618: remove wrong html filter in 'Item search fields' admin

The dropdown list contain the arrayref: ARRAY(0x...)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21596: (follow-up) Handle updated_on
Jonathan Druart [Thu, 25 Oct 2018 13:24:46 +0000 (10:24 -0300)]
Bug 21596: (follow-up) Handle updated_on

Default value should only used if not exist.
We got a failing test with the previous patch:
 #   Failed test 'borrowers.updated_on should have been kept to what we set on creating'
 #   at t/db_dependent/Patrons.t line 78.
 #          got: '1'
 #     expected: '0'

Test plan:
prove -r t/Auth_with_shibboleth.t t/db_dependent/Patrons.t t/db_dependent/Koha/Patron*

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15486: Fix failing test in GetHardDueDate.t
Jonathan Druart [Wed, 24 Oct 2018 20:08:05 +0000 (17:08 -0300)]
Bug 15486: Fix failing test in GetHardDueDate.t

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15766: Update tests
Nick Clemens [Wed, 24 Oct 2018 19:28:44 +0000 (19:28 +0000)]
Bug 15766: Update tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21596: Handle updated_on
Jonathan Druart [Wed, 24 Oct 2018 17:35:16 +0000 (14:35 -0300)]
Bug 21596: Handle updated_on

This has been picked from the solution proposed on bug 21610. It may not
be pushed soon and so we need a fix for the failing tests
(t/Auth_with_shibboleth.t)

Test plan:
 prove -r t/Auth_with_shibboleth.t t/db_dependent/Koha/Patrons*
must return green

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15766: (RM follow-up) Schema updates
Nick Clemens [Wed, 24 Oct 2018 17:35:18 +0000 (17:35 +0000)]
Bug 15766: (RM follow-up) Schema updates

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21511: (RM follow-up) Use orders.count instead of new variable
Nick Clemens [Tue, 23 Oct 2018 13:17:06 +0000 (13:17 +0000)]
Bug 21511: (RM follow-up) Use orders.count instead of new variable

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 21511: Don't show acquisition details on subscription detail when there is no...
Owen Leonard [Tue, 9 Oct 2018 17:19:09 +0000 (17:19 +0000)]
Bug 21511: Don't show acquisition details on subscription detail when there is no acq data

This patch modifies the subscription detail page so that acquisitions
details section is not shown when there is no acquisitions data.

The acquisitions details are moved into a new tab similar to how it
appears on the bibliographic details page. A count of orders is now
passed to the template so that the check for existing acquisitions data
will work correctly.

To test, apply the patch and view the detail page for subscriptions.

- When viewing a subscription for which there are orders you should see
  an "Acquisitions details" tab containing the acquisitions data.
- When viewing a subscription with no orders the tab should not appear.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15766: DBRev 18.06.00.044
Nick Clemens [Wed, 24 Oct 2018 17:19:19 +0000 (17:19 +0000)]
Bug 15766: DBRev 18.06.00.044

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15766: Fix incorrect GROUP BY
Jonathan Druart [Wed, 24 Oct 2018 14:51:12 +0000 (11:51 -0300)]
Bug 15766: Fix incorrect GROUP BY

'koha_kohadev.creator_batches.description' isn't in GROUP BY

Fix t/db_dependent/Creators/Lib.t if strict sql modes is on

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15766: (follow-up) Fixing layout of description button
Aleisha Amohia [Wed, 6 Jun 2018 01:48:33 +0000 (01:48 +0000)]
Bug 15766: (follow-up) Fixing layout of description button

This patch moves the 'Save' button to the toolbar as suggested. The
description textbox and 'Save' button are hidden if the batch is new and
appears when items are added.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15766: (follow-up) Correct merge errors
Owen Leonard [Thu, 31 May 2018 16:54:43 +0000 (16:54 +0000)]
Bug 15766: (follow-up) Correct merge errors

This patch corrects some problems applying this on current master and
removes an old merge conflict marker.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15766: (follow-up) Hide description field if the batch is empty
Aleisha Amohia [Wed, 18 Oct 2017 22:40:13 +0000 (22:40 +0000)]
Bug 15766: (follow-up) Hide description field if the batch is empty

Because if it's empty, it hasn't actually been created yet. Hiding the
field prevents a lot of errors

Sponsored-by: Catalyst IT
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15766: (follow-up) Save description link as button on patroncard side
Aleisha Amohia [Tue, 10 Oct 2017 03:21:33 +0000 (03:21 +0000)]
Bug 15766: (follow-up) Save description link as button on patroncard side

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
6 years agoBug 15766: (follow-up) Making 'Save description' link a button
Aleisha Amohia [Fri, 22 Sep 2017 02:29:54 +0000 (02:29 +0000)]
Bug 15766: (follow-up) Making 'Save description' link a button

For consistency's sake in response to Comment 17.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>