Looks like it's caused by bug 13190.
Variable export_remove_fields is not sent to the template, let's
retrieve the syspref's value using the TT plugin.
Test plan:
Fill ExportRemoveFields with something (100a for instance)
Go on a checkout list page
At the bottom, the "do not export fields" input box should be pre-filled
with the content of the syspref
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c6e09ca3877ced4afb05ea27175c46aa134dc3b3) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 34eff6378614572735d768824695b104564ce76f) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Nick Clemens [Fri, 3 Feb 2017 11:38:53 +0000 (11:38 +0000)]
Bug 18047 - JavaScript error on item search form unless LOC defined
If LOC is not present, the item search form will raise a JS error:
SyntaxError: expected expression, got '}'
This patch fixes it by handling this specific case.
Note that the "Status" column is still displayed.
Test plan:
Remove your LOC authorised values
Go on the item search form
=> You will not get the JS error and the "Shelving location" bloc is no longer
displayed. There is no need to display it if empty.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit da3ccdc14379816ea849eeb56ab321d8e7db59a2) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit b441c89f4f71bb6036dcb9d2ac5a4e24392714bc) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Adrien Saurat [Thu, 13 Dec 2012 09:13:19 +0000 (10:13 +0100)]
Bug 8306: Patrons statistics, fix for patron activity choice
The "inactive" for "patron activity" choice is now effective.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 680e6ce7d1aa53e716ea9fdab9c67e621fb828e2) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 7e3ffc7f87b09c0b33c2f82ba04fee89e789c2d2) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Zoe Schoeler [Wed, 18 Jan 2017 00:55:43 +0000 (00:55 +0000)]
Bug 17838 Availability limit broken until an item has been checked out.
TEST PLAN
1. Make sure you have no items checked out.
2. Run sudo koha-rebuild-zebra -f -v kohadev.
3. Go to search the catalog and search.
4. Check items availability and then click on limit to currently
available items.
5. This should return no results.
6. Apply patch and reload.
7. Results should show.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Attribute 14: " Specifies whether un-indexed fields should be ignored. A
zero value (default) throws a diagnostic when an un-indexed field is
specified. A non-zero value makes it return 0 hits."
From http://www.indexdata.com/zebra/doc/querymodel-zebra.html
Magnus Enger [Thu, 10 Nov 2016 14:32:44 +0000 (14:32 +0000)]
Bug 4126 - Exit bulkmarcimport if -a and -b given
Currently it is possible to spceify both --biblios and --authorities
as command line switches to bulkmarcimport.pl. This does not make sense
so we should exit early and explain that these switches are mutually
exclusive.
To test:
- Run one of these and check that there is no complaint about missing
options:
perl misc/migration_tools/bulkmarcimport.pl -a -b
sudo koha-shell -c "perl misc/migration_tools/bulkmarcimport.pl -a -b"
kohadev
- Observe that this displays the perldoc, but does not complain about
mutually exclusive switches.
- Apply the patch
- Rerun the command(s) from earlier.
- Verify that the script is now halted and a small explanation given.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit dbada67196818834f158890c0c348c0259085f7e) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 83ec31965824b4d632bb62f5569fde430fa3858e) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Mason James [Sat, 28 Jan 2017 11:47:20 +0000 (00:47 +1300)]
Bug 18009 - IssueSlip.t test fails if launched between 00:00 and 00:59
to test patch...
1/ set date between 00:00 and 00:59
$ sudo date -s 'Sun Jan 29 00:41:55 NZDT 2017'
2/ run prove, see fail
$ prove -v t/db_dependent/Members/IssueSlip.t
...
t/db_dependent/Members/IssueSlip.t (Wstat: 65280 Tests: 1 Failed: 0)
Result: FAIL
3/ apply patch
4/ run prove, see pass
$ prove -v t/db_dependent/Members/IssueSlip.t
...
All tests successful.
Result: PASS
NOTE: for code obscurity you could have also done a modulus 24. ;)
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit add15799229df7a1910d759f487c0006bf3f30ae) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit f45cd420d1bed73b9a85c5260ae4a781041a6626) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Bug 17788: (MARC21) Add $9 fields to Koha-Auth-Number:w index
Looking at the default framework's fields that are linked to authority
records, there's a divergence with the Zebra index definitions.
This yields to authority usage count be incorrect for users searching
for authority records.
MariaDB [koha_kohadev]> SELECT tagfield,tagsubfield,authtypecode FROM
marc_subfield_structure WHERE authtypecode IS NOT NULL AND
authtypecode<>'' AND frameworkcode='' GROUP BY
tagfield,tagsubfield,authtypecode ;
+----------+-------------+--------------+
| tagfield | tagsubfield | authtypecode |
+----------+-------------+--------------+
| 100 | a | PERSO_NAME |
| 110 | a | CORPO_NAME |
| 111 | a | MEETI_NAME |
| 130 | a | UNIF_TITLE |
| 440 | a | UNIF_TITLE |
| 600 | a | PERSO_NAME |
| 610 | a | CORPO_NAME |
| 611 | a | MEETI_NAME |
| 630 | a | UNIF_TITLE |
| 648 | a | CHRON_TERM |
| 650 | a | TOPIC_TERM |
| 651 | a | GEOGR_NAME |
| 654 | a | TOPIC_TERM |
| 655 | a | GENRE/FORM |
| 656 | a | TOPIC_TERM |
| 657 | a | TOPIC_TERM |
| 658 | a | TOPIC_TERM |
| 662 | a | GEOGR_NAME |
| 690 | a | TOPIC_TERM |
| 691 | a | GEOGR_NAME |
| 696 | a | PERSO_NAME |
| 697 | a | CORPO_NAME |
| 698 | a | MEETI_NAME |
| 699 | a | UNIF_TITLE |
| 700 | a | PERSO_NAME |
| 710 | a | CORPO_NAME |
| 711 | a | MEETI_NAME |
| 730 | a | UNIF_TITLE |
| 796 | a | PERSO_NAME |
| 797 | a | CORPO_NAME |
| 798 | a | MEETI_NAME |
| 799 | a | UNIF_TITLE |
| 800 | a | PERSO_NAME |
| 810 | a | CORPO_NAME |
| 811 | a | MEETI_NAME |
| 830 | a | UNIF_TITLE |
| 896 | a | PERSO_NAME |
| 897 | a | CORPO_NAME |
| 898 | a | MEETI_NAME |
| 899 | a | UNIF_TITLE |
+----------+-------------+--------------+
This patch adds the missing ones to the authority number index as it is
done for the rest of the fields.
To test:
- Verify that
etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml
contains intries pointing the $9 subfield of all the fields in the
'tagfield' column above, to the Koha-Auth-Number:w index.
- Sign off :-D
Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 21d63c8fb0c2ae3a8ca7caaf0d4041b7189213c3) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit c4f977b76f171130d7f9c370ef6e27b6c0fd2384) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Marcel de Rooy [Thu, 27 Oct 2016 13:07:29 +0000 (15:07 +0200)]
Bug 17512: Improve handling dates in C4::Items
This is a follow-up on the internal server error on 0000-00-00 in the items
column onloan. This patch deals with preventing to have such dates at all
in the date fields of items.
It is accomplished by:
[1] Adding a (private) subroutine _mod_item_dates. It takes an item hash
and replaces date values if needed.
[2] AddItem and ModItem call _koha_new_item resp. koha_modify_item. In these
routines a call to the new _mod_item_dates is inserted.
[3] Although the routine is actually private, I have added some unit tests
to Items.t.
Test plan:
[1] Add a new item. Fill a correct date in dateaccessioned and an invalid
date in Price effective from (=replacementpricedate).
[2] Verify that dateaccessioned is saved correctly and replacementpricedate
is still null (does not contain 0000-00-00).
[3] Edit the item again. Fill some text in dateaccessioned and put a correct
date in replacementpricedate. Verify the results.
[4] Run t/db_dependent/Items.t
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 137cbd8d09be549c9ae97dfad746a9c52d27b9a6) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit cb1bc00361bf3e468470b8e1500a4e752e60d161) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Sat, 21 Jan 2017 07:48:20 +0000 (08:48 +0100)]
Bug 16115: Remove JS error on item search if NOT_LOAN values do not exist
If NOT_LOAN is not present, the item search form will raise a JS error:
SyntaxError: expected expression, got '}'
This patch fixes it by handling this specific case.
Note that the "Status" column is still displayed.
Test plan:
Remove your NOT_LOAN authorised values
Go on the item search form
=> You will not get the JS error and the "Status" bloc is no longer
displayed. There is no need to display it if empty.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 27a4149625252e4c28dc97df998d82fd6f2652b8) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit e0b64c0f4ae29eae1a7c71d3d9e328683aa51317) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Luke Honiss [Thu, 19 Jan 2017 02:55:31 +0000 (02:55 +0000)]
Bug 11450: Hold Request Confirm Deletion
==TEST PLAN==
1) Go to an item with a hold and click on the holds tab on the
left
2) Click the red 'X'
3) The hold will be deleted immediately
4) Apply patch
5) Return to an item with a hold and click the 'X'
6) There will now be a confirmation dialog
7) Click cancel and the dialog will disappear and the hold will not be
deleted
8) Click OK and the hold will be deleted
Restored indentations - Mark Tompsett
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6ce97d9b06843fa65d6fb4a6d7c8cecd322bc8d6) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 2d363f136d8d9c4b35dfac455ea4f877fac7905d) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Lari Taskula [Mon, 12 Dec 2016 14:49:44 +0000 (16:49 +0200)]
Bug 16387: Fix default shortened loan period time
When a loan period is shortened due to using decreaseLoanHighHolds* the time is
always set to the current time in X days, even if the original loan period is
given in days and not in hours.
It should default to 23:59 as is normal for loan periods given in days.
As original due date time defaults to 23:59 when given in days, this patch
modifies the hours and minutes of shortened due date to be equal to original due
date.
To test:
1. prove t/db_dependent/DecreaseLoanHighHolds.t
Signed-off-by: Grace McKenzie <grace.mcky@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 21ac9fcdc2ca449a491cc79e68cc854ee248d911) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 090f2885b7a910ee84212fa5bb0141611121eb77) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Julian Maurice [Wed, 18 Jan 2017 10:29:57 +0000 (11:29 +0100)]
Bug 17922: Use correct number of digits when replacing date placeholders
This patch also fixes a typo ("<<MM><" should be "<<MM>>")
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 95e94766af653de4bc721af64981140cacecf567) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit fdf1f974770247dc4b8decfb3318e31b940be48d) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Bug 17871: (followup) Remove zebra::* from the packages templates
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 58e7a0a5d510de6a035329ea86a130996dda5849) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 0e50ef7c2afad535a42e428c3a3f92341465ae83) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
David Cook [Tue, 10 Jan 2017 01:36:25 +0000 (12:36 +1100)]
Bug 17871: Remove zebra::snippet to allow access to facets in YAZ 5.8.1+
This patch restores access to zebra facets (or zebra::snippet) with YAZ 5.8.1 or higher.
It was failing due to The <retrieval syntax="xml" name="zebra::*" /> entry in
retrieval-info-bib-dom.xml which IndexData said it wasn't even needed to
get that access.
Edit: I amended the commit message (tcohen)
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
I tested on kohadevbox and found no regression or behaviour change. I
will provide a followup for the packages.
Jonathan Druart [Mon, 6 Feb 2017 08:18:29 +0000 (09:18 +0100)]
Bug 18044: Add a test
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 80a43833f89ea1f31753245cb2d6f20acb7216a4) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit d13835de10ecc8e7035931c4eab8c358d63c49f4) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
SQL expects lists to be comma separated. A trailing comma must also
be avoided.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 544cf17d6f3279d95835ba42d40d49982e97f0a2) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit b61ff540611f0dfd28dd7818dc1d03062cb4c159) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Bug 17775 - Add new user with LDAP not works under Plack
This patch fixes internal server error:
Undefined subroutine &C4::Auth_with_ldap::AddMember called at /srv/koha_ffzg/C4/Auth_with_ldap.pm line 213.
It occurs only under plack, and it's strange since C4::Members
does EXPORT AddMember and we are importing it into Auth_with_ldap.pm
(and it does work under CGI).
Signed-off-by: Liz Rea <liz@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I did not test but trust author and signoffer. The change cannot hurt.
Jonathan Druart [Thu, 12 Nov 2015 12:28:38 +0000 (12:28 +0000)]
Bug 15030: Add tests
This test will prevent regression on the lost of data when
items.itemcallnumber is linked with a plugin.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit eee1f23bc49d233bca6c8a8004dd6e79e2425484) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 6f959cd149c0484417056f50b0fb6590c837c428) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Blou [Wed, 21 Oct 2015 18:35:18 +0000 (14:35 -0400)]
Bug 15030 - Fixes the serials fields associated with a plugin, to not overwrite the previously saved value
This fixes the remaining fields from serials-edit.pl that were seeing their previously entered values
be oblitarated with each new edit. The fields associated to a plugin (dateaccessioned and barcode) were
always displaying <empty> with each new edit, losing the previous effort.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1017edad1c27d2624fb8ed6f8fb0018985b33295) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 18ad4150eadff0f229c1cc73950f8e53568ed249) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Blou [Mon, 19 Oct 2015 16:16:05 +0000 (12:16 -0400)]
Bug 15030 - Certain values in serials' items are lost on next edit
When editing serials subscription, we can edit them but some values are not pulled from the DB correctly to be put in the edit box. If not noticed, the value will be overwritten on the next save.
Test:
- Create a subscription
- Edit itemcallnumber (952o?) and make sure to have a different value than the default one.
- Save.
- Edit it again
- The saved value is not there.
This is true for itemcallnumber and a few other fields.
This was caused by calls to ->field($subfield). This would always fail, of course.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 4cdcdb3cb5ebefedcb44766745078a949227f0a5) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 3f084924e6df501e4256089c7a641911f378286f) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
radiuscz [Sun, 23 Oct 2016 22:57:03 +0000 (00:57 +0200)]
Bug 17487: Styling moved from style attribute into staff-global.css
Test plan:
1) Apply patch
2) Display Z39.50 search dialogs:
- cataloguing / new from Z39.50
- authorities / new from Z39.50
- acquisition / new from an external source
3) Select all / Clear all should be placed below "Search targets" header
4) [Optionally] Set some style in IntranetUserCSS for class z3950checks
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit aaf6b6724f5c7c6e29433600d55b9f1e8836a77b) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 2cf8c4b3c22a73b9a7d1429aeb7ba07d7f78c27b) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
radiuscz [Sun, 23 Oct 2016 00:51:53 +0000 (02:51 +0200)]
Bug 17487: Links to "select/clear all" moved below the header tag
Test plan:
1) Apply patch
2) Display Z39.50 search dialogs:
- cataloguing / new from Z39.50
- authorities / new from Z39.50
- acquisition / new from an external source
3) Select all / Clear all should be placed below "Search targets" header
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f05b2986da26717f70134b07020c509821aeb3f7) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 5089001faa40c42e5d90e1e76059c3b5d3a0ab1f) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Nick Clemens [Fri, 13 Jan 2017 18:06:34 +0000 (18:06 +0000)]
Bug 8361 (QA Followup) Add warnings
- Added message to circulation.tt to warn if rule undefined for
patron/itemtype combination
To test:
1 - Remove all circ rules
2 - Add one rule
3 - Checkout to patron an itemtype that is outside of rule
defined above
4 - Note explanation that no rule is defined
Jonathan Druart [Tue, 22 Nov 2016 11:23:23 +0000 (11:23 +0000)]
Bug 8361: Do not allow checkouts if no rules are defined
We should require a circulation rule to allow checkouts and reject them
if no rules are defined.
Test plan:
- Delete all issuing rules
- Check an item out
=> Without this patch the checkout is allowed
=> With this patch applied it is rejected
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 11dfb2e0b2d32c313f556b623ee8522b4342af26) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 32c8bf4a3dbcd1b15de5221589c974ef78b6b1e6) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Karen Jen [Tue, 17 Jan 2017 22:46:02 +0000 (22:46 +0000)]
Bug 17823: Add label for MARC 583 - Action note
test plan
Edit a record
Edit field 583a to add an action note
Save the record and confirm that the note does not show up in staff
client or opac
Apply patch and refresh page
Action note should now show up in staff client and opac
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 16dcea233008c0560c5a9783a3e6dd60470b06b1) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 36685a439a438dd12bd12e65287cc3f0c1b6c198) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Katrin Fischer [Mon, 30 Jan 2017 15:47:23 +0000 (16:47 +0100)]
Bug 17902: Follow-up fixing SQL statement
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 40cb8e3b7579987d0d461e8da6e350228722727c) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit dea3bc855d011b47541ed664566940c08ca52ceb) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
The SQL query is not constructed correctly, placeholders must be used.
Subscription id and status list can be provided by the user.
This vulnerability has been reported by MDSec.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f42dbd67d1b960906fd2b98560e7e3724452bce9) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 14e2c2e5f70dc24a0621545aac8a1f8c568331d3) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Fri, 13 Jan 2017 16:07:34 +0000 (17:07 +0100)]
Bug 17901: Force context to scalar
See bug 15809 for more references.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit cb4fa17a2712d04590d218635913bfe794510615) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Fri, 13 Jan 2017 16:03:41 +0000 (17:03 +0100)]
Bug 17901: Fix possible SQL injection in shelf editing
It has been reported that
/cgi-bin/koha/opac-shelves.pl?op=edit&referer=view&shelfnumber=146&owner=4&shelfname=testX&sortfield=titleaaaaaa\`&category=1
Could lead to SQL injection
Actually it explodes because the generated SQL query is not correctly formated.
However it would be good to limit the possible values for sortfield.
This vulnerability has been reported by MDSec.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 45cffd874c62c7b090390c5fb3c955c31f524608) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Fri, 27 Jan 2017 09:01:42 +0000 (10:01 +0100)]
Bug 17900: Update the tests to the new API
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 42460b871472d2a408bc38a747fd375062af4d7e) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Fri, 13 Jan 2017 16:43:25 +0000 (17:43 +0100)]
Bug 17900: Fix possible SQL injection in patron cards template editing
To recreate:
/cgi-bin/koha/patroncards/edit-template.pl?op=edit&element_id=23%20and%201%3d2+union+all+select+1,user(),@@version+--%20
Look at the Profile dropdown list.
To fix this problem and to make sure it does not appears anywhere else
in the label and patroncards modules, I have refactored the way the
queries are built in C4::Creators::Lib
Now all of the subroutine takes a hashref in parameters with a 'fields'
and 'filters' parameters.
From these 2 parameters the new internal subroutine _build_query will
build the query and use placeholders.
Test plan:
1/ Make sure you do not recreate the vulnerability with this patch
applied.
2/ With decent data in the labels and patroncards modules, compare all
the different view (undef the New and Manage button groups) with and
without this patch applied.
=> You should not see any differences.
This vulnerability has been reported by MDSec.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a70980d8255a66c33539926796c06b29b26fbb40) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Thu, 19 Jan 2017 10:46:21 +0000 (11:46 +0100)]
Bug 9569: Security patch for AutoLocation
If a patron is not allowed to access the staff interface because its IP
address in the authorised range of IPs, the cookie should not contain
the CGISESSID.
If it is, the patron is logged in and will be able to access the staff
interface if he reload the page (or hit another one).
Test plan:
Confirm the that AutoLocation feature is now working as expected.
Note: It seems that this feature has never really worked as intended. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 93cc0956a923e94663ae74d1f435604844536571) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Thu, 19 Jan 2017 09:00:40 +0000 (10:00 +0100)]
Bug 9569: Update warning message
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 7afddcb157a8d8e27cfdee3cdbeb0eae483aa24c) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Tue, 16 Aug 2016 13:01:40 +0000 (14:01 +0100)]
Bug 9569: Do not check the IP for login at the OPAC
At the OPAC, the AutoLocation feature should not be taken into account:
login to the OPAC from outside the IP range should work
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit af0af36bb9a520c31c31067b9b68fd565eef0e63) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Tue, 16 Aug 2016 12:56:25 +0000 (13:56 +0100)]
Bug 9569: Remove unused occurrence of AutoLocation
`git grep ManualLocation` does not return any results
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 936b23e17a4b7d76d94be276ed1ceb9be8872299) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Tue, 16 Aug 2016 12:56:19 +0000 (13:56 +0100)]
Bug 9569: AutoLocation should not depend on IndependentBranches
Those 2 prefs can be independent and it does not make sense to consider
AutoLocation only if IndependentBranches is set.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit acabdc87c9a883e36def78dcff6fccb4980d35ab) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Tue, 16 Aug 2016 13:02:58 +0000 (14:02 +0100)]
Bug 9569: Fix AutoLocation - handle .* for subnets
The example in branches.tt is:
Can be entered as a single IP, or a subnet such as 192.168.1.*
But actually the regex in C4::Auth does not handle subnets.
Test plan:
0/ Apply all the patches
1/ Switch AutoLocation on
2/ Define a subnet (192.168.0.* if your ip is like 192.168.0.X) in the IP
range of your library
3/ Log in on the staff interface
=> Should work
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a8fdac38d8a1cf9e996195c5b04702d1d2eaa106) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Fri, 13 Jan 2017 15:40:59 +0000 (16:40 +0100)]
Bug 17903: Fix possible SQL injection in serial claims
To recreate:
/cgi-bin/koha/serials/claims.pl?serialid=1)and%20(select*from(select(sleep(20)))a)--%20&letter_code=0
Notice the delay.
The SQL query is not constructed correctly, placeholders must be used.
This vulnerability has been reported by MDSec.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 179ff58b0980f348821c727c2fa79a5eca310901) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Thu, 12 Jan 2017 09:44:46 +0000 (10:44 +0100)]
Bug 17234: Need to separate KEY and FOREIGN KEY checks
In the previous patch we use the constraint_exists subroutine to verify
if an index or a foreign key exists.
But the `SHOW INDEX` query does not return foreign keys (as its name
suggests!).
We need another subroutine foreign_key_exists to check the FK existence.
I have found that because t/db_dependent/TestBuilder.t fails on
oai_sets_biblios, because oai_sets_biblios_ibfk_1 has not been removed.
Test plan:
0/ Do not apply this patch
1/ Use a 3.20 DB
2/ update the DB
3/ SHOW CREATE TABLE oai_sets_biblios
will display oai_sets_biblios_ibfk_1
Apply the patch and repeat 1, 2, 3
=> Will not display oai_sets_biblios_ibfk_1
It has been removed as expected.
Jonathan Druart [Mon, 2 Jan 2017 10:36:53 +0000 (11:36 +0100)]
Bug 17234: Test the column and constraint non-existence
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 435b7badc22d9c05cb16623d6f423206992ec476) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit cd6782d5b4be87f724b5d2d36ff1dedd4cfab503) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Mark Tompsett [Fri, 30 Dec 2016 19:08:33 +0000 (14:08 -0500)]
Bug 17234: Two new functions lack tests
This adds two tests to t/db_dependent/Installer.t
TEST PLAN
---------
1) Apply patch
2) prove -v t/db_dependent/Installer.t
-- column and constraint tests were added.
3) run koha qa test tools
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8938631f38bb22456424219d3c3453493df6f848) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 4518ec795d253901215621235f3c1bf6e76f4df0) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Tue, 27 Sep 2016 07:28:09 +0000 (08:28 +0100)]
Bug 17234: Move new subroutines to C4::Installer
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0b15c5e2cc5d5a84b062c5c5738fe54ab5df98ab) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit a34a60823fc2ed3f92a68e85e2591c0d82f5b4d3) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Tue, 20 Sep 2016 15:55:40 +0000 (16:55 +0100)]
Bug 17234: Add constraint_exists and column_exists to updatedatabase.pl
These 2 subroutines will help us deal with the absense of ALTER IGNORE
TABLE
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c08922180e83b0222dc3d54a292aaf49cc15000a) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 70fe225bea608b61b40f237a13195eb028da4231) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Bug 17234 - updatedatabase.pl's ALTER IGNORE break with mysql 5.7.4+
The doc says: "As of MySQL 5.7.4, the IGNORE clause for ALTER TABLE is removed and its use produces an error."
This fix replaces ALTER IGNORE with ALTER in updatedatabase.pl
To TEST, try an upgrade from 3.18 to 3.22 after installing the latest mysql (at least 5.7.4, by the doc).
Some will fail with error
DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IGNORE TABLE aqbasket
ADD KEY authorisedby (authorisedby)' at line 1 [for Statement "
ALTER IGNORE TABLE aqbasket
ADD KEY authorisedby (authorisedby)
"] at ./installer/data/mysql/updatedatabase.pl line 10563.
0) Find a database on 3.18, save it.
1) Set your code base to 3.22(or master)
2) run updatedatabase.pl
3) See the errors.
4) Apply the patch
5) Reload the 3.18 database
6) succeed with updatedatabase.pl
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit acf425bbbcb8c22f3655472f90285869c3ad7164) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit e2e61a798cd9e07dfdb4026b1ab455f1a07cd301) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Mark Tompsett [Fri, 2 Dec 2016 19:37:07 +0000 (19:37 +0000)]
Bug 15711: Follow up batch_id not used
Changed batch_id to image_id in the template, as the multiparam
would catch the array case.
TEST PLAN
---------
1) attempt to delete a selected item, but get a warning.
2) apply this follow up
3) attempt to delete a selected item, it deletes.
4) run koha qa test tools
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2ee5cd27129d487fee26987118a8675033139c53) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit c1768e08cd82c8d2eaa9ac667004b8ad6ab36faf) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Aleisha Amohia [Wed, 24 Aug 2016 01:08:11 +0000 (01:08 +0000)]
Bug 15711: Fixing the 'Delete selected' button on patroncard images
To test:
1) Go to Tools -> Patron Card Creator -> Manage images
2) Upload an image if you haven't already
3) Click Delete selected without selecting any images
4) Notice broken behaviour as described in Description
5) Apply patch, refresh page
6) Click Delete selected without selecting any images
7) Notice alert. Click OK
8) Select one image or more, click Delete selected
9) Notice confirm delete message.
Sponsored-by: Catalyst IT Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit bd3879e037727cdc2cc851aa910c68bd257ee6f4) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 70c55a6d69d68e04b50e8fbcf0eb7e62457350d7) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Aleisha Amohia [Wed, 21 Dec 2016 02:46:57 +0000 (02:46 +0000)]
Bug 17799: MARC bibliographic frameworks breadcrumbs broken for Default framework
To test:
1) Go to Admin -> MARC frameworks -> Default framework actions -> MARC
structure
2) Click New tag
3) Notice the breadcrumbs say '()' instead of 'Default MARC framework'
or something more appropriate
4) Apply patch and refresh page
5) Confirm breadcrumbs are now filled correctly
6) Go back to tag structure and try deleting a tag (Actions -> Delete)
7) Confirm breadcrubs are filled correctly
Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fdc15cb7623ed2ed8cd2d0b3fcfbd96d90f59041) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 87e3be143b99f7094848045b044ea7685605cf64) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Aleisha Amohia [Tue, 10 Jan 2017 22:20:40 +0000 (22:20 +0000)]
Bug 17879: Use image filename if no image name is entered
This patch changes the code to use the filename of the uploaded image if
no specific image name is entered.
To test:
1) Go to Tools -> Patron card creator -> Manage images
2) Upload an image and leave the image name field empty
3) Notice this works and 'Name' is left empty.
4) Apply patch and refresh page
5) Upload an image and leave the image name field empty
6) Notice the image name is given the filename so that 'Name' is no
longer empty.
Sponsored-by: Catalyst IT Signed-off-by: Claire Gravely <claire_gravely@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d3752c85dc2f5af974ec2fe4585efa8510302968) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit d8ff6f0ea8a0839c4689897fa27857b33f9bfb81) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Magnus Enger [Thu, 8 Sep 2016 12:13:46 +0000 (14:13 +0200)]
Bug 17265 - Make koha-create-defaults less greedy
koha-create-defaults substitutes the instance name with the placeholder
__KOHASITE__ in the SQL file that it creates. If the instance name is
something common, like "data", this means that way too many substitutions
will be made, and when koha-create uses the SQL file as a template, broken
data can be the result.
The solution in this patch was suggested by drojf on IRC.
To test:
- Create an instance called "data"
- Run "sudo koha-dump-defaults data > test.sql"
- Take a look at test.sql and verify there are way too many occurences
of __KOHASITE__, like "-- Dumping __KOHASITE__ for table `accountlines`"
- Apply the patch
- Copy the resulting koha-create and koha-dump-defaults to somewhere
running off the packages
- Run "sudo koha-dump-defaults data > test.sql" again and verify there
are only 4 occurrences of __KOHASITE__, in places that make sense
- Create an instance with something like:
$ gzip test.sql
$Â sudo koha-create --create-db --defaultsql test.sql.gz test17265
- Verify that you have a working Koha install
Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Works as expected.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Kyle M Hall [Fri, 23 Dec 2016 11:31:00 +0000 (11:31 +0000)]
Bug 15415 [QA Followup] - Make code more readable
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 8e68e41df448e9bde7baf69ebab2646d2138cca4) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Aleisha Amohia [Fri, 2 Dec 2016 03:04:07 +0000 (03:04 +0000)]
Bug 15415: Warn when creating a new print profile
As per Jonathan's comment in Comment 3, I've put that line of code in an
if statement that will only call the get_attr method if we are editing
an existing profile (therefore the profile id will exist).
To test:
1) Go to Tools -> Patron Card Creator -> New printer profile
2) Notice warn
3) Apply patch
4) Refresh page
5) Confirm warn is gone and page still works as expected
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 0b915fbd9735d2585944253fc5230fdb7417fb80) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 2263c97b729f56e917fb7aee41080a3711a022a3) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
The translation scripts have an historical tendency to chomp newlines
and we introduced an empty_line.inc file to force newlines when building
CSV output out of our templates (in item search and late orders).
This patch makes the mentioned templates use TT ability to force newlines
plus some misuses of the 'minus' sign.
Test plan:
- Apply the patch
- Do an item search that returns more than one result
- Export as CSV
=> SUCCESS: The CSV file is correctly formed.
- Install any translation:
$ sudo koha-shell kohadev
k$ cd kohaclone/misc/translator
k$ perl translate install <chosen language>
- Enable <chosen language> (e.g. es-ES)
- Repeat the item search
- Export as CSV
=> SUCCESS: The CSV file is correctly formed in your chosen language.
- Have more than one late orders (bummer)
- Go to late orders
- Choose them
- Export as CSV (in english)
=> SUCCESS: The CSV file is correctly formed.
- Switch language
- Go to late orders
- Choose them
- Export as CSV (in english)
=> SUCCESS: The CSV file is correctly formed in your chosen language.
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 152ce671eca4b5d74329b518d9d71106f4e60c84) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit a72c8c630cec81f527db8325683e166ee7add97b) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Thu, 15 Dec 2016 10:47:24 +0000 (10:47 +0000)]
Bug 17743: Item search - Fix indexes build on MARC
Searching items by custom search fields does not work because these
fields are not correctly processed in JS.
In case of custom search field, the parent of the option is not the
select but the optgroup element.
Test plan:
Create a custom search field on 245$c for instance
On the items search form, select this field and launch a search
=> Without this patch, the results will not be filtered and you will get
all your items
=> With this patch applied, the results should be correctly filtered
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c86a9e4d300fe746fe542e38a60148de6501f7a6) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 9e68a7d42d3d0c9c2c8961c32e3348ff4b5d5abf) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Thu, 15 Dec 2016 12:50:42 +0000 (13:50 +0100)]
Bug 16951: Replace some more
In order to avoid warnings in the logs, $cgi->param should be forced to
scalar context
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit e16ec2fcdb8bf67c507591386f94b9d024fec596) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit ae61f7c4f170e292781598c3123cc4a70863d933) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
The change was wrong, we wanted to retrieve a scalar (the string), not
an array.
We want to retrieve a string with the different column' names, not an
array of 1 element.
Test plan:
Launch an item search and play with column sort
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 2184fa6ab1a7449857df15894c8de075aac729ec) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 01f495673f61eb5fced39f1f47ea2c04b5074a35) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Kyle M Hall [Mon, 12 Dec 2016 11:59:30 +0000 (06:59 -0500)]
Bug 17761 - Renewing or returning item via the checkouts table causes lost and damaged statuses to disappear
Due to the fact that the lost and damaged status are contained within the due_due span,
when the item is renewed or returned these statuses disappear.
Some librarians find this disconcerting and it seems that it would be better to keep the visible.
Test Plan:
1) Find a lost item checked out to a patron
2) Renew that lost item via the checkouts table
3) Notice the lost status disappears from that row
4) Apply this patch
5) Refresh the page ( you may want to clear your browser cache as well )
6) Renew the item again
7) The lost status should remain visible!
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Edie Discher <edischer@cityoffargo.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 97eb773c0a4054f0538c8966e207734f6f56bdd5) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 75c3cda017e4998974fad285e21bf63b08e4fce6) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Chris Kirby [Mon, 28 Nov 2016 05:15:02 +0000 (00:15 -0500)]
Bug 17652: opac-account.pl does not include login branchcode
opac-account.pl does not include the login branchcode, whereas the other pages
available to users (opac-user, opac-memberentry, opac-passwd, opac-readingrecord,
opac-suggestions, opac-messaging, opac-shelves, etc.) on login DO provide
the login branchcode. Having the login branchcode available on opac-account.pl
would facilitate customization of the OPAC for individual branches.
To test:
1) Login to the OPAC and open /cgi-bin/koha/opac-account.pl
2) Inspect the body tag and observe the class attribute does not include
the login branchcode.
3) Apply the patch.
4) Repeat step 2.
5) Observe that the login branchcode is present.
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 1bfcebfb7fa0837428fb577a6fc059886fe37afb) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 2bfd9a95f09c29d1ae116213f83b416a3922cf8c) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Marcel de Rooy [Fri, 25 Nov 2016 12:22:42 +0000 (13:22 +0100)]
Bug 17681: Exiisting typos might thow some feees when recieved
Yes, we are fixing these four typos here.
Test plan:
[1] Read the changes.
[2] Run t/Auth_with_shibboleth.t
[3] Run git grep recieved| grep -v -e 'recievedlist' | grep -v -e 'serials-recieve.tt'
Note: serials-recieve.tt is just history. Bonus points for the one who makes
us get rid of that column recievedlist.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
EDIT:
Rebased. Change in Accounts has been corrected already.
Removed the po file.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit b5c1a965b165093fb66a5db356da84b4a62bf9a6) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 327c2ba63612c56599d590a0a2dd8539d255b145) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Bug 17547: (MARC21|NORMARC) have Chronological term field $9 indexed
This patch makes Zebra index the 648$9 link for chronological terms on
bibliographic records. This way an authority search on chronological terms
will show the right number in 'Used in X records' message.
To test:
- Have a record with a 648 field, linked to an authority record (i.e. with an authid on 648$9).
- Search for the record, notice it is indexed.
- Perform an authority search for the chronological term
=> FAIL: the term is linked to our record, but koha shows '0' count.
- Apply the patch
- Run:
$ cd kohaclone
$ xsltproc etc/zebra/xsl/koha-indexdefs-to-zebra.xsl \
etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml \
> etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl
$ git diff
=> SUCCESS: Notice the shipped etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl
is up-to-date
- Run:
$ sudo cp etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \
/etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl
$ sudo koha-restart-zebra kohadev
$ sudo koha-rebuild-zebra -f -b -v kohadev
- Search for the record, notice it is indexed.
- Perform an authority search for the chronological term
=> SUCCESS: the term is linked to our record, usage count is 1
- Sign off :-D
I assume NORMARC is similar on this regard. Feel free to fail it if the NORMARC part of the
patch is wrong.
Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit cb3f899826966b5da1242292091aa71ab4831618) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 80955d365af98627110783bc16b12964d117273d) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Nick Clemens [Thu, 8 Dec 2016 19:41:33 +0000 (19:41 +0000)]
Bug 17749 - Missing l in '.pl' in link on waitingreserves.tt
Fixes a small typo introduced by Bug 17010
waitingreserves.p#[% tab %]
should be
waitingreserves.pl#[% tab %]
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a1592ec10be56569b64774a3dde1e85c53ba36d9) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 45bd59064f117f984b4bc041c12136a7d6a880c5) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Owen Leonard [Mon, 21 Nov 2016 13:26:13 +0000 (08:26 -0500)]
Bug 11274 Sent Notices Tab Not Working Correctly
This patch implements the notices toggle event using a different method.
Using on() lets us bind the event to a parent element, allowing the
event to attach to elements which may not exist on the page yet.
Test plan the same as original patch:
1) have a patron with more then 20 notices sent
2) go to patron profile -> notices
-> without patch, the showing/hidding of notices content does work
correctly only on first loaded page
-> with patch, it should work correctly everywhere - try to use
paginator, searching, ordering....
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6163337cd8caab98db993e4d51ac73abbdd83b86) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 9af15e2cb487280e3c4b5859a5edb77a0403c09e) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
David Cook [Mon, 23 May 2016 01:57:04 +0000 (11:57 +1000)]
Bug 16376 - Koha::Calendar->is_holiday date truncation creates fatal errors for TZ America/Santiago
Using a DateTime object with a timezone of America/Santiago
was causing fatal errors for Koha::Calendar->is_holiday
and Koha::Calendar->exception_holidays, when the objects
were truncated to an invalid local time.
Using a floating zone allows us to use the same day, month, year
for comparison purposes without running into the possibility of
creating an invalid local time and thus a fatal software error.
Edit:
While the changes to is_holiday and single_holiday make sense (Jonathan agrees too)
I didn't manage to have them fail, because truncate is not failing in my trials, but
days_between. So to me, it narrows down to have exception_holiday return floating tz
datetime objects so it doesn't break days_between.
Anyway, it is ok to push this patch, and the regression test I provide covers this scenario
I'm describing.
To test:
- Apply the regression tests patch
- Run:
$ prove t/db_dependent/Holidays.t
=> FAIL: Unexpected error due to bad timezone/date combination
- Apply this patch
- Run:
$ prove t/db_dependent/Holidays.t
=> SUCCESS: Tests pass
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 32354d8322afd05704d87cb38d9bc032ce8c4ec1) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 5e9056a99cf37acad6c2d4fe5f3ebd1f61171327) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
This patch introduces a regression test for exception_holidays. This routine
returns a list of datetimes to be used in date comparison and some datetimes don't exist
in some timezones, so floating timezones should be used instead.
To test:
- Apply the patch on master
- Run:
$ prove t/db_dependent/Holidays.t
=> FAIL: The new test fails
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c6a0848ff0b7acbec4d7bf817447d7cc84c0615e) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit aa5c67486f297dbdaa1ba7b6665916a3d2cc05f5) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Nick Clemens [Thu, 8 Dec 2016 17:19:03 +0000 (17:19 +0000)]
Bug 14541 (QA followup) Add warning to gist system preference
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 36c608ab846c97aa76ea2fd721c7ce09f2c638ed) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 317bd60f18b3ceaec91709ec56f26c27f16359b9) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Wed, 9 Nov 2016 09:13:27 +0000 (09:13 +0000)]
Bug 14541: Do not truncate tax rate values
Tax rates are stored in decimal(6,4) fields which means that 4 decimals
are allowed.
If a tax rate is 8.42%, it is stored as 0.0842
If a tax rate has more precision than that, Koha won't deal correctly
with it. We will need to update the DB structure.
With this patch, the tax rate will be displayed with the same precision
as in the DB. So if you enter 8.42, you will see 8.42% instead of 8.4%
without this patch.
Test plan:
Do a full acquisition workflow with a tax rate like 8.42% and confirm
that it is correctly displayed.
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit cb3d6625e87fbc861c11e181cea36f9f9cd329cc) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit ff33093591f903c22e251ba694ed59d8a0fb7500) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Wed, 23 Nov 2016 10:06:04 +0000 (10:06 +0000)]
Bug 15822: Fix 500 error when searching if items.onloan=0000-00-00
The calls
output_pref({ dt => dt_from_string( $date ) })
are wrong and should be replaced with
output_pref({ str => $date })
For better error handling.
Here we fix the problem of items.onloan when searching
Test plan:
- Set items.onloan=0000-00-00 (UPDATE items SET onloan='0000-00-00')
This can come from old data or bad migration
- Execute a search
=> Without this patch you get
Can't locate object method "ymd" via package "dateonly" (perhaps you forgot to load "dateonly"?) at /home/vagrant/kohaclone/Koha/DateUtils.pm line 225.
=> With this patch you won't get the error
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 167c74bfd386287783e101989b804077b1020369) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit a5ce343c9d7d8790a8dbd98b3833ea6cf155c180) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Mirko Tietgen [Tue, 9 Aug 2016 09:52:15 +0000 (11:52 +0200)]
Bug 15200 - t/Creators.t fails when using build-git-snapshot
ttf-dejavu was missing from the build dependencies.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit f1ce002823a51cd2b3ab033f1c38110eeef7fcf3) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Tue, 22 Nov 2016 07:33:50 +0000 (07:33 +0000)]
Bug 17278: Fix test compilation errors
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit 7a7a9c7958e21112c6d18313b41c6605ec1b3d08) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Mon, 3 Oct 2016 11:27:21 +0000 (12:27 +0100)]
Bug 17278: Fix "show all items" link
Then we need to remove the "available" part from the query.
They are really awkward patches...
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit 1a27bd10dabe4905c115d4caf7ea566b2a19c073) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Mon, 3 Oct 2016 09:45:13 +0000 (10:45 +0100)]
Bug 17278: Use available limit when requesting zebra when ccl query is used
When a ccl query is used, the buildQuery subroutine does not handle
the available limit (not an index).
This available limit is handle later in the subroutine.
This affect the author links on the detail page for instance (an=xx).
A much better solution would be to keep an 'available' zebra index up-to-date.
Test plan:
(OPAC or staff interface, it does not matter)
- Launch a search, click on a result and then on an author link to
launch another query (an:xx)
- Limit to available items without the 'facet'
=> Without this patch you won't get any results
=> With this patch applied you should get relevant result (regarding the
known bugs 16970, 13715, 13658, 5463, etc.)
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit 6391564606507c6edf80b2e5425cee57cb7e1db5) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
This patch changes the exception name to match the package name. And
also adds a test for the thrown exception message.
Also creates a general Koha::Exception::Patron::Modification exception
to make the new one inherit from it, following the common use in the codebase.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit 9a301836714924581b806cd7c728695625ddf3cc) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Kyle M Hall [Mon, 31 Oct 2016 11:15:02 +0000 (11:15 +0000)]
Bug 17494: Prevent duplicate tokens from getting stored
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit d76cd8a63946572508f4a7d8b8ee8d06c63ddb09) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Thu, 27 Oct 2016 08:04:30 +0000 (10:04 +0200)]
Bug 17494: Make sure the same verification token won't be generated twice
Well, this patch does not enforce the unique constraint but mimic what
is already done in C4::ImportExportFramework and Koha::Upload where
md5_hex is used.
Test plan:
Have a look at the code and confirm that it adds more randomness to the
hashed string
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Mason James <mtj@kohaaloha.com>
(cherry picked from commit 5f160f675b1de4a12db6717b297c3d7b0a7a5d3d) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Fridolin Somers [Tue, 4 Oct 2016 10:52:46 +0000 (12:52 +0200)]
Bug 17395 - exporting checkouts in CVS generates a file with wrong extension
In checkouts table, the is an export form (when some exports syspref are enabled).
Export using a CSV profile will create a file with name koha.mrc (same as ISO2709 export).
It would be better with koha.csv.
Bug 14647 manages the export page, this but will only manage for export from checkouts table where file name is hard-coded.
Test plan :
- Enable checkouts exports by setting syspref ExportWithCsvProfile with a profile for record export
- Go to circ page of a patron with checkouts : /cgi-bin/koha/circ/circulation.pl?borrowernumber=xxx
- Show checkouts table
- Select some checkboxes in "Export" column
- Select "CSV" in export format combo-box
- Click on "Export"
=> Without patch, the generated file is koha.mrc
=> With patch, the generated file is koha.csv
- Check ISO2709 export generates a file named koha.mrc
Signed-off-by: Dani Elder <dani@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit fc084f90d1da1dedb70c97a225d3df332f8224d2) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Nick Clemens [Tue, 22 Nov 2016 11:05:19 +0000 (11:05 +0000)]
Bug 17391 (QA Followup) use INSERT INGORE in atomicupdate
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 0a84274f6bfa3ea6e4c37367da7a449d98ce8aca) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Thu, 17 Nov 2016 09:01:19 +0000 (09:01 +0000)]
Bug 17391: Fix number of values in sysprefs.sql
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 49f8e05b20bd10e017877b996254c47cd2444385) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Thu, 17 Nov 2016 08:58:55 +0000 (08:58 +0000)]
Bug 17391: Add atomic update file
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit d785cd5b0a025dd2670c7259fd20038f450ab1ef) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Katrin Fischer [Sun, 16 Oct 2016 12:20:42 +0000 (14:20 +0200)]
Bug 17391: Add missing prefs to sysprefs.sql
Adds
- ReturnpathDefault
- ReplytoDefault
to the sysprefs.sql file.
To test:
- Run the web installer in any language
- Check all preferences are installed without error
- Check prefs listed above now exsit in your
systempreferences table
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 15e57368bba86844d103fa46cd3a47438565c56e) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Jonathan Druart [Fri, 18 Nov 2016 15:26:17 +0000 (15:26 +0000)]
Bug 17660: #adv is considered as an ad by adblock
So let's rename it!
Test plan:
Edit a $t in any framework, you should be able to unfold the "Advanced
constraints" part
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit a0416ff132469e6816554136707e398f114ab13e) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Lari Taskula [Mon, 10 Oct 2016 14:06:07 +0000 (17:06 +0300)]
Bug 17419: Fix smsalertnumber and mobile confusion in moremember.pl
members/moremember.pl will set mobile number as smsalertnumber in template if
smsalertnumber is not defined. This will cause incorrect display for SMS number
in patron's Details-tab. This confusion between smsalertnumber and mobile is
already fixed in Bug 14683, but members/moremember.pl was not fixed yet.
This is a minor issue since it won't occur for manually added new patrons due to
fixes already pushed in Bug 14683, but in case patron's smsalertnumber is null
in database, this bug can be replicated:
To test:
1. Set EnhancedMessagingPreferences to "Allow" and make sure SMSSendDriver
has been set.
2. Add a new patron, give it a mobile/other phone number.
3. Run a SQL query:
update koha.borrowers set smsalertnumber=NULL where borrowernumber=XXX;
(replace XXX with your new patron's borrowernumber)
4. Go to patron's details tab and observe that SMS number shows the mobile/
other phone you provided earlier.
5. Apply patch.
6. Refresh patron's details tab.
7. Observe that smsalertnumber is now empty, as it should be.
Followed test plan, works as expected. Signed-off-by: Marc <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 88e0264413b1dc9ecf5dbe562636f40c7e0555d1) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>