Commit Graph

34374 Commits

Author SHA1 Message Date
Jonathan Druart a02a19ffea
Bug 22020: (bug 21777 follow-up) Fix columns visibility for circulation.pl
The table is used by circulation.pl and moremember.pl
When it is modified we need to take care of the two view.

Test plan:
Use the columns settings to hide/show the "check in" and other columns
Confirm the this patch fixes the display for moremember.pl

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 17a8eb1879)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-10 14:13:35 +00:00
Martin Renvoize 61e3b2d869
Bug 21813: Compiled CSS
RMaint Note: 18.11.x version of a03eed982b
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-10 13:55:03 +00:00
Owen Leonard a6326b80c6
Bug 21813: In-page JavaScript causes error on patron entry page
This patch removes a block of JavaScript from memberentrygen.tt which
was being included in the page before jQuery is loaded. This causes a
JavaScript error.

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

 - In Administration -> Patron categories, confirm that you have two
    patron categories with different default messaging preferences
    defined.
 - Go to Patrons -> New patron
   - Create a new patron using one of the categories with messaging
     preferences.
   - Confirm that when you switch the category selection to the other
     patron category, the patron messaging preference checkboxes are
     changed to the default for that category.
     - A "Loading" indicator should appear above the checkboxes to show
      that an operation is in process. It should disappear when new
      default prefs are loaded.
   - Manually change one or more patron messaging preference checkboxes.
   - Switch the patron category again and confirm that you are prompted
     to confirm resetting the preferences to the default for that
     category.
 - Perform the same set of tests when editing a patron.
   - Defaults should not be loaded during the edit process.
 - Confirm that there are no other JavaScript errors in the console.
 - Test again with EnhancedMessagingPreferences disabled.

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3607fdfe79)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-10 13:52:23 +00:00
Nick Clemens 8102f6dc70
Bug 22052: Refactor DeleteExpiredOpacReigstrations
This patch changes the sub to use Koha::Objects and updates the tests.
Previously the sub would die on borrowers with checkouts and would
delete borrowers if they had fines

To test:
 1 - prove -v t/db_dependent/
 2 - Set your selfreg preferences:
    PatronSelfRegistration: Allow
    PatronSelfRegistrationDefaultCategory: SELFREG (or of your choice)
    PatronSelfRegistrationExpireTemporaryAccountsDelay: 30
 3 - Register a patron into SELFREG or how you set above
 4 - Set their date enrolled to two months ago
 5 - Checkout an item to the patron
 6 - Issue a fine to that patron
 7 - perl misc/cronjobs/cleanup_database.pl --del-exp-selfreg -v
 8 - The job should die with an error
 9 - Check in the item
10 - run the corn again - patron is deleted, oops
11 - Apply patch
12 - Create another patron in the same way
13 - Checkout and fine the patron
14 - run the cron
15 - they are not deleted, and no error
16 - checkin the item
17 - run the cron
18 - they are not deleted and no error
19 - clear the fine
20 - run the cron
21 - patron is deleted, huzzah

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b32756a5d7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-10 13:49:53 +00:00
Nick Clemens 2bc4f25855
Bug 22052: Unit tests
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f44e37b201)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-10 13:49:24 +00:00
Nick Clemens 03e6ecd31c
Bug 22030: DBRev 18.11.01.001
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 70abd7698f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-10 13:44:58 +00:00
Nick Clemens 274271b59d
Bug 22030: Use preference to determine username sent to overdrive
Overdrive configuration generally defaults to cardnumber, however, they
have confirmed that some libraries use usernames. We need to allow for
both scenarios.

To test:
1 - Have an OverDrive account setup with SIP authentication
    Note: You can apply for a testing account at developer.overdrive.com
    and setup an environment
2 - Fill in all your OverDrive system preferences
3 - Test with a patron whose username is their cardnumber
4 - Confirm their overdrive account tab on opac loads
5 - Change the username to be another value like "borked_wont_work"
6 - Note the overdrive account tab won't load
7 - Apply patch, update database, not new system preference
OverDriveUsername (default to 'cardnumber)
8 - Note the OD account loads successfully
9 - Change the system preference to 'user name' - the account load fails

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 96adab7af8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-10 13:43:17 +00:00
Marcel de Rooy fee85191b0
Bug 21605: (follow-up) Simple ternary boolean to number conversion
Imo it is much easier to do just "$a ? 1 : 0" than testing defined($a) etc.
in the additional loop.
Less code, more readable?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 482b323da1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-10 13:42:04 +00:00
Colin Campbell ae409c2fb3
Bug 21605: Ensure EDI acct fields set to boolean val
Validate the input to the fields indicating account
functionality. The only valid values are 1 and 0
non-integer (or integers other than 0/1) are invalid

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c9c3fc4368)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-10 13:41:35 +00:00
Tomas Cohen Arazi 7a9c838b63
Bug 22059: Fix exception params in Koha::Patron->set_password
This simple patch fixes a wrong call to ->throw. Parameters shouldn't be
enclosed in curly brackets.

To test:
- Apply the tests patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Patrons.t
=> FAIL: Tests fail because the throw call is wrong
- Apply this patch
- Run:
 k$ prove t/db_dependent/Koha/Patrons.t
=> SUCCESS: Tests pass!
-Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 4d671103f4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-10 13:25:15 +00:00
Tomas Cohen Arazi 9f88e1aa1e
Bug 22059: regression tests
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3ef3ecfe99)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-10 13:24:46 +00:00
Martin Renvoize 965d86ecf8
Bug 21802: Compiled CSS
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-07 15:41:32 +00:00
Jonathan Druart 8e73dc678f
Bug 21802: Align fieldset with accordion headers when editing notice's template
Test plan:
Regenerate the css using `yarn css`
Edit a notice's template and confirm that the fieldsets are aligned with
the accordion headers

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0a68a662ee)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-07 15:23:57 +00:00
Jonathan Druart 1f5aa58a2c
Bug 21990: Replace dialog .error with .alert
<div class="dialog error"> will display a div without background color, the correct class is "dialog alert".

https://wiki.koha-community.org/wiki/Interface_patterns#Error_messages

Test plan:
Hit /cgi-bin/koha/acqui/parcel.pl
Notice the background color change with and without this patch

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>
(cherry picked from commit d44a42e417)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-07 15:20:30 +00:00
Jonathan Druart 270138aa67
Bug 22034: Handle default framework for MARC view with framework
To test:

- Create a record in any framework that is not default
- Search for the record in your catalog
- Switch to the MARC tab
- Change framework pull down to default on top
- Note the page reloads and the framework stay default
- Verify it works for other frameworks

Also test the "labeled MARC" view (you will need the pref viewLabeledMARC turned on)

Signed-off-by: Nazlı Çetin <nazli@devinim.com.tr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 54e295e4c1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-07 15:17:28 +00:00
Jonathan Druart 5a255af085
Bug 22007: Generated with add_missing_filters.pl
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>
(cherry picked from commit 464bf007d6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-07 15:14:11 +00:00
Jonathan Druart bfe255f861
Bug 22007: Also handle Price and HtmlTags
Those 2 filters should return safe output as well

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>
(cherry picked from commit a8fa74ab02)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-07 15:13:54 +00:00
Jonathan Druart dbb15a2c97
Bug 22007: Handle safe filtered output (KohaDates)
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>
(cherry picked from commit 912fb42458)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-07 15:13:31 +00:00
Jonathan Druart b6cf429827
Bug 22007: Remove html filters when KohaDates called with a parameter
Bug 13618 took care of the KohaDates output but not if it is called
with a parameter (eg. [% var | $KohaDates with_hours => 1 %]).

We could avoid unnecessary processing by removing the extra html filter.

Patch generated with the following command:
  % perl -p -i -e 's/KohaDates([^%\|]*)\s?\|\s?html\s?/KohaDates $1/g' **/*.inc **/*.tt

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>
(cherry picked from commit 5d49ea039c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-07 15:13:11 +00:00
Jonathan Druart 25a22f2e63
Bug 21928: (bug 18789 follow-up) Fix CircAutoPrintQuickSlip=clear
caused by commit 105b3e10e8

bug 18789

To recreate:
1 - Set CircAutoPrintQuickSlip to 'clear'
2 - Bring up a patron in circulation
3 - Click in checkout box and hit enter to submit empty
4 - Patron is partially loaded
5 - Apply patch
6 - Restart all the things
7 - Test again
8 - Patron is cleared correctly

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>
(cherry picked from commit a440f6a410)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-07 15:10:07 +00:00
Tomas Cohen Arazi 86c2e32296
Bug 21909: Add return type explanation to POD
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 94bdfc2bee)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-07 15:01:30 +00:00
Tomas Cohen Arazi 52c696006c
Bug 21909: Make Koha::Account::outstanding_* preserve context
This patch modifies the methods so they preserve the caller's context
(list and scalar).

To test:
- Apply the first patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Account.t
=> FAIL: outstanding_credits and outstanding_debits tests fail
- Apply this patch
- Run:
 k$ prove t/db_dependent/Koha/Account.t
=> SUCCESS: We are so happy now :-D
- Sign off :-D

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d3ff671f21)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-07 15:01:03 +00:00
Tomas Cohen Arazi 5cc46f9b9c
Bug 21909: Unit tests
This patch introduces regression tests for the behaviour to be
introduced. Both outstanding_credits and outstanding_debits methods
should return a Koha::Account::Lines object in scalar context, and a
list of Koha::Account::Line objects in list context.

To test:
- Apply this patch
- Run
  $ kshell
 k$ prove t/db_dependent/Koha/Account.t
=> FAIL: The current behaviour doesn't match the described

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 85c474e597)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-07 15:00:39 +00:00
Jonathan Druart c24fded0f9
Bug 21817: Fix 2 failing tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8748d80109)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-07 14:50:28 +00:00
Jonathan Druart 336fedc15d
Bug 21817: Centralize the mock of userenv from tests
This patch adds a new method mock_userenv from t::lib::Mocks in order to
simplify the mock of the userenv.

Test plan:
prove all the test files modified by this patch

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ca124b5c14)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-07 14:49:50 +00:00
Tomas Cohen Arazi 1d9b0fa57e
Bug 21547: (follow-up) Rely on Koha::Patron->set_password checks
This patch makes the controller just call $patron->set_password and use
the exceptions it might raise instead of manually checking the passwor
strength.

No behaviour change should be expected. It also removes some leftovers.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3f734900f0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-03 14:29:50 +00:00
Marcel de Rooy 8b27475331
Bug 21547: Use set_password in opac-passwd and remove sub goodkey
Remove sql statement to change password by calling set_password.
Remove sub goodkey by calling C4::Auth::checkpw_hash.
Adding the scalar before param Oldkey (from bug 21036).

Rebased on top of 21178 (using set_password instead of update_password).

Test plan:
Try to change password in OPAC with good and bad pw.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 085cfc6bca)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-03 14:29:38 +00:00
Andrew Isherwood 66502804d2
Bug 21929: Typo in orderreceive.tt
lass -> class

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3c14a0d352)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-03 14:26:51 +00:00
Jonathan Druart ddfa48bf70
Bug 21571: Make ACCTDETAILS translatable
This patch makes the notice "ACCTDETAILS" translatable.

Test plan:
1. Switch on TranslateNotices and AutoEmailOpacUser
2. Define templates for different languages for ACCTDETAILS
3. Create a new patron, define an email address, userid and password.
Also pick a different "preferred language" then the default value
4. You should receive the email with the correct, translated, email.

Signed-off-by: Hugo Agud <hagud@orex.es>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit a200aafd3b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-03 14:25:23 +00:00
Julian Maurice af6136fad7
Bug 21789: Example usage of I18N Template::Toolkit plugin
Signed-off-by: Marc Véron <veron@veron.ch>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 727f33d858)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-03 14:20:26 +00:00
Jonathan Druart ee0711bac4
Bug 22033: Remove related_resultset from the list of available methods
It is not covered by tests.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ccbed38e21)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-01-03 14:17:07 +00:00
Nightly Build Bot 46d725c128
Bug 17108: Automatic debian/control updates (stable/18.11.x)
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-12-21 12:18:10 +00:00
Martin Renvoize 03f5bcd918
Update release notes for 18.11.01 release
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-12-20 12:20:17 +00:00
Martin Renvoize 1574d9f2c7
Increment version for 18.11.01 release
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-12-20 11:57:05 +00:00
Koha translators 0b2ebdf8f2
Translation updates for Koha 18.11.01
(cherry picked from commit 90fefba069472ddf827bfec820c0860f4917eb45)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-12-20 11:54:44 +00:00
Marcel de Rooy 7f4a7c42ad
Bug 21848: Remove Text::Unaccent from C4::Members
At refactoring time the unac_string call was moved to Koha::Patron.

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: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5e17032700)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-12-20 09:59:28 +00:00
Marcel de Rooy 4dbb5e6360
Bug 21848: Resolve unac_string warning from Circulation.t
Just add "use utf8".

Test plan:
Run Circulation.t; verify there are no warnings.

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: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3e731ce094)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-12-20 09:59:08 +00:00
Nick Clemens 4aaaf2eecd
Bug 22022: Correct ordering for authorised values
To test:
1 - Add a shelving location with code "ZZZZ" and lib "Awake"
2 - Load some items in batch modification
3 - Note shelving location dropdown is wrong
4 - Apply patch
5 - Reload page
6 - Note order is correct

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e6cec898e0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-12-20 09:58:14 +00:00
Nick Clemens cc6b9593c4
Bug 22024: DBRev 18.11.00.003
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f56dd2e829)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-12-20 09:57:34 +00:00
Jonathan Druart 141423906b
Bug 22024: Fix number of fields in uk-UA
ERROR 1136 (21S01) at line 23: Column count doesn't match value count at row 22

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit fe147e9df6)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-12-20 09:55:59 +00:00
Katrin Fischer 84248f3542
Bug 22024: Correct new installations with missing data
For a new installation the data in the class_* will be
missing as class_sources.sql couldn't be executed. It will
fail with:

DBD::mysql::st execute failed: Cannot add or update a child row:
a foreign key constraint fails (`koha_kohadev`.`class_sources`,
CONSTRAINT `class_source_ibfk_2` FOREIGN KEY (`class_split_rule`)
REFERENCES `class_split_rules` (`class_split_rule`)) at /usr/share/perl5/DBIx/RunSQL.pm line 273.

As this might have been missed and the web installer can still
be completed, this patch checks for the tables being empty and
adds the default data if they are.

To test:
- Without the patch
- Run the de-DE or another translated installer
- Verify the error is shown
- Complete the installer
- Verify class_sources table is empty
- Apply patches
- Run the database update
- Verify data classification sources, filing rules, and
  slitting rules are now complete

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c904db832e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-12-20 09:55:36 +00:00
Katrin Fischer b55f0079e2
Bug 22024: Update translated web installer files with new class splitting rules
When adding the new splitting rules for classification sources
with bug 15836, we missed updating the translated installers.

This has the danger of data missing for new installations already
set up with 18.11.

This patch corrects the installer files.

To test:
- Verify the class_sources.sql installs correctly for all languages

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3e7fc75f50)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-12-20 09:54:32 +00:00
Jonathan Druart fe09955137
Bug 21956: (bug 21775 follow-up) Use set_preference to reset the value
Test plan:
Set AudioAlerts to 0
Prove t/db_dependent/selenium/regressions.t
=> Without this patch the value of the pref is not reset to 0

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 674a34471f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-12-20 09:53:42 +00:00
Nick Clemens f7f5d6f2e2
Bug 21984: Pass param_name in pagination URL
To test:
 1 - Create a report like:
    SELECT <<cat>>,<<dog>>,<<cat>> FROM items
 2 - Run the report, enter 'CATS' and 'DOGS'
 3 - Get results LIKE "CAT | DOG | CAT"
 4 - Try to go to page 2
 5 - FAIL! (last column is blank)
 6 - Apply patch
 7 - Run the repot, enter 'CATS' and 'DOGS'
 8 - Verify first page looks right
 9 - Go to page 2
10 - Results are correct!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: “Lucas Gass” <lucas@bywatersolutions.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f28a97034d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-12-20 09:52:35 +00:00
Nick Clemens 852be591db
Bug 21065: DBRev 18.11.00.002
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5ea668056a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-12-20 09:34:47 +00:00
Martin Renvoize b4f55f8019
Bug 21065: (QA follow-up) Make the update idempotent
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6d44f9dac8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-12-20 09:30:41 +00:00
Jonathan Druart af9910f872
Bug 21065: Set ON DELETE SET NULL on accountlines.borrowernumber
Note: Why do we have ON UPDATE SET NULL on accountlines.itemnumber?
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7f322d7ff8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-12-20 09:29:56 +00:00
Jonathan Druart f899e44014
Bug 21065: Add koha_object(s)_class methods to accountline
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 457e560a06)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-12-20 09:29:24 +00:00
Jonathan Druart 554cee5b3c
Bug 21065: Add tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 09ef91653b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-12-20 09:29:02 +00:00
Jonathan Druart 10148dc26b
Bug 14334: Remove AutoCommit from tests
And use a DBIx transaction instead.

Test plan:
prove that the test files modified by this patch are passing

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 64242cabea)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2018-12-17 12:08:58 +00:00