]> git.koha-community.org Git - koha.git/log
koha.git
5 years agoBug 20986: (follow-up) Avoid br tags, but allow for line breaks to be added easily...
Katrin Fischer [Thu, 27 Sep 2018 17:49:27 +0000 (19:49 +0200)]
Bug 20986: (follow-up) Avoid br tags, but allow for line breaks to be added easily with CSS

This patch removes the br tags from the XSLT in favor of some more
spans and classes.

This will allow to add the line breaks with one line of CSS:
span.holdings_note_data { display:block; }

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 65de22a6ef928bd6074e9a4d6a1e1351d0e1de9b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 2900debc65318237ee95fa6c5dbbbd69c8a7e6c4)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 20986: Add 867 and 868 holdings display
Joy Nelson [Fri, 22 Jun 2018 22:22:40 +0000 (15:22 -0700)]
Bug 20986: Add 867 and 868 holdings display

Add line breaks in the 866 Holdings display in the OPAC details and Staff details page.  Add 867 and 868 textual holdings with line breaks in the OPAC and Staff details display.

Signed-off-by: Ed Veal <eveal@mckinneytexas.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c23276324c4da519130f35cb7c471402965b3e1b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fb362dfd795080a6bcb547e5bc1d87d18bc7ffdf)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 8558: (QA follow-up) a little more text clean up
Liz Rea [Thu, 9 May 2019 02:02:55 +0000 (02:02 +0000)]
Bug 8558: (QA follow-up) a little more text clean up

You can take or leave it, honestly, I just thought
we could be a little more explicit about what we were overwriting.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6d046c2e3d301a7e1d37b376b49a0db516e67bda)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cf681f6682eee0aea6ae647835a628d88fa180b9)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 8558: Improve confirmation message for importing frameworks
Aleisha Amohia [Mon, 29 Apr 2019 03:30:30 +0000 (03:30 +0000)]
Bug 8558: Improve confirmation message for importing frameworks

This patch updates the confirmation message from:
"Do you really want to import the framework fields and subfields? This
will overwrite the current configuration. For safety reasons please use
the export option to make a backup"
to:
"Are you sure you want to import the [% frameworkcode %]
framework structure? This will overwrite the current configuration. For
safety reasons, it is recommended to use the export option to make a
backup first."

To test:
1) Go to Administration -> MARC bibliographic frameworks
2) Export one of the frameworks
3) Create a new test framework
4) Import the new test framework structure using the exported file
5) Upon clicking Confirm, confirm the message is improved and makes
sense.

Sponsored-by: Catalyst IT
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e4d1318550af78f76b7a43757bbdc4c5bddb4d5f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f8b24adc75ef145b96556893d555de4971b8251d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 10215: DBRev 18.11.06.001
Lucas Gass [Wed, 12 Jun 2019 22:37:43 +0000 (22:37 +0000)]
Bug 10215: DBRev 18.11.06.001

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 10215: (follow-up) Fix the failing test
Martin Renvoize [Wed, 5 Jun 2019 11:58:20 +0000 (12:58 +0100)]
Bug 10215: (follow-up) Fix the failing test

We now handle NULL values at the database end and do not expect empty
strings.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 117061d88420231d709515f4702446e60f7de4b6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5d0f6f8cbb42ac85d6648f1e0d45af359604021f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 10215: (follow-up) Correct existing data
Martin Renvoize [Wed, 5 Jun 2019 11:54:30 +0000 (12:54 +0100)]
Bug 10215: (follow-up) Correct existing data

This patch adds the correction of data ('' => NULL) during the DB
update.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9713e13893c9f2d2b12cea29b23b72a25170462e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 648587b19c7e8ca4a91b9930c7d6c78fbeb2da0f)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 10215: Increase the size of opacnote and librariannote for table subscriptionhistory
Kyle M Hall [Tue, 7 May 2013 16:49:03 +0000 (12:49 -0400)]
Bug 10215: Increase the size of opacnote and librariannote for table subscriptionhistory

We have librarians that are regularly hitting the maximum number of
characters for the note fields in subscription history. They would like
to be able to store at least 1000 characters here. Converting the
varchar(150) to text should do it.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Add public and private notes to a subscription history entry
   where each note is greater than 150 characters.
4) Save and view the notes, the notes should not be truncated.

Rescued-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8592474c3fe6af408c7265a50bd1776a76942397)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c42c44e932133e6df6c3b9ccda30932d2835f5ee)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22919: Fix insert of authorities_normal_marc21.sql with strict SQL modes
Jonathan Druart [Thu, 30 May 2019 14:36:31 +0000 (09:36 -0500)]
Bug 22919: Fix insert of authorities_normal_marc21.sql with strict SQL modes

If strict SQL modes are set, the insert of authorities_normal_marc21.sql
will fail.

Test plan:
DELETE FROM auth_subfield_structure;
DELETE FROM auth_tag_structure;
DELETE FROM auth_types;
SET sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
source /home/vagrant/kohaclone/installer/data/mysql/en/marcflavour/marc21/mandatory/authorities_normal_marc21.sql

You should not see any errors.
Without this patch you see:
ERROR 1366 (22007) at line 280 in file:
'/home/vagrant/kohaclone/installer/data/mysql/en/marcflavour/marc21/mandatory/authorities_normal_marc21.sql':
Incorrect integer value: ' for column 'linkid' at row 148
'

Signed-off-by: nabila <lovenabila@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 703ec1e2f24345146c997398b9c0cc492016455d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e69744172a33165758562c6c786a1135361c7509)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22958: Fix help link on the SMS providers page
Katrin Fischer [Sun, 2 Jun 2019 08:58:50 +0000 (08:58 +0000)]
Bug 22958: Fix help link on the SMS providers page

The help link on the SMS providers page didn't link to the
according chapter in the manual.

To test:
- Enter Email in SMSSendDriver system preference to
  make the configuration page appear
- Go to Administration > SMS cellular providers
- Click on the help link
- Verify it leads to the manual start page
- Apply patch
- Repeat and verify the link now leads to the correct
  section in the manual

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3f93acbc6c0344151da794a73476de1f91000502)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 203ae6e8ecf2606922490fe0433e5eccfc8d95c5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21887: (For OPAC) 856 link problem in XSLT result lists and detail page
Nazlı Çetin [Tue, 27 Nov 2018 15:24:38 +0000 (15:24 +0000)]
Bug 21887: (For OPAC) 856 link problem in XSLT result lists and detail page

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 9a58871503caa1b48e4e5c3cc0f565fa583f3e9d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 75da739b1bf3bdb22f30e1e41da65c7a713c8036)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 21887: 856 link problem in XSLT result lists and detail page
Nazlı Çetin [Tue, 27 Nov 2018 14:15:33 +0000 (14:15 +0000)]
Bug 21887: 856 link problem in XSLT result lists and detail page

Signed-off-by: Nazlı Çetin <nazli@devinim.com.tr>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4903cee9e937c970c6d3d15fd78d82189d8705eb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a61323998313092385db7e94f177068463fca8ec)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22954: Minor markup error in OPAC messaging template
Owen Leonard [Tue, 21 May 2019 16:59:38 +0000 (16:59 +0000)]
Bug 22954: Minor markup error in OPAC messaging template

This patch corrects a minor error in opac-messaging.tt in order to
quiet errors returned by the HTML validator.

To reproduce the problem you should have the
EnhancedMessagingPreferencesOPAC  system preference enabled. Log in
to the OPAC and go to the "your messaging" page. Run the page through
the W3C validation service: https://validator.w3.org. Either by pasting
in the URL for the search results (if web accessible) or by viewing
source, copying, and pasting into "Validate by Direct Input."

This patch addresses this error:

 - "Self-closing syntax (/>) used on a non-void HTML element. Ignoring
   the slash and treating as a start tag."

To test, apply the patch and try again to reproduce the validation
error. The error should no longer be present. There should be no
visible change to the page.

Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d5a8a424203cd426f7d0bd64597a6ac95536ef9c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit feb8f84ef7a92038a544aaa2f44584ee848451fd)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22952: Markup error in OPAC suggestions template
Owen Leonard [Tue, 21 May 2019 16:00:18 +0000 (16:00 +0000)]
Bug 22952: Markup error in OPAC suggestions template

This patch makes a minor correction to the OPAC suggestions template in
order to quiet an error returned by the HTML validator.

To reproduce the problem you should have the 'suggestion' system
preference turned on, and you should be logged in to the OPAC as a user
who has submitted one or more suggestions. View the "your purchase
suggestions" page in the OPAC. Run the page through the W3C validation
service: https://validator.w3.org. Either by pasting in the URL for the
search results (if web accessible) or by viewing source, copying, and
pasting into "Validate by Direct Input."

This patch specifically addresses these errors:

 - "End tag div seen, but there were open elements."
 - "Unclosed element span."

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

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e72a9c91485c6e68819f3bb76d326f0a1a84dcd9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ecfe5811c8b49135b4e0ddee1db5e24d6a854940)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22948: Markup error in OPAC bibliographic detail template
Owen Leonard [Tue, 21 May 2019 14:27:40 +0000 (14:27 +0000)]
Bug 22948: Markup error in OPAC bibliographic detail template

This patch addresses one markup problem in opac-detail.tt which triggers
a validation error.

To reproduce the problem, view the normal bibliographic detail page for
a record in the OPAC. Run the page through the W3C validation service:
https://validator.w3.org. Either by pasting in the URL for the search
results (if web accessible) or by viewing source, copying, and pasting
into "Validate by Direct Input."

This patch addresses one specific error:

 - "The aria-labelledby attribute must point to an element in the same
   document."

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

Test the "Save record -> Dublin Core" menu item. It should trigger a
modal window.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a3da6d6825f686099d8e23a1abff061071d679ad)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1baddd190fe1ed72e66298a6b01394e86e58d0fe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 23006: Cannot use inventory with barcodes containing special chars
Marcel de Rooy [Wed, 29 May 2019 13:46:15 +0000 (13:46 +0000)]
Bug 23006: Cannot use inventory with barcodes containing special chars

If a barcode contains special characters like $, the regex in inventory
does no longer work.
This fix (as suggested by Jonathan) replaces the regex by a eq compare.

Test plan:
Pick one barcode and add a $ somewhere in the middle, say 123$456.
Include this barcode in a barcode file for inventory.
Run inventory on that file and verify that barcode was read and datelastseen
was updated. The barcode should not be reported as missing (not scanned).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 851d41ab6b9ec28901086d6a6ce15b3fd589182a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c868ccc360189d0b5ea5b7c096ba325a304070d0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 11492: (follow-up) Don't pass publisheddatetext param to NewIssue
Aleisha Amohia [Fri, 14 Dec 2018 02:05:36 +0000 (02:05 +0000)]
Bug 11492: (follow-up) Don't pass publisheddatetext param to NewIssue

I have removed publisheddatetext as a param from my patch, but only in
the places where my patch added it. Any other instance already existed
before my patch.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ac423d5dcf2c7503a8ca78cbafdb94dfc43dfdb6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6b44e314577ade8b92ae330668510ae94f2f6469)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 11492: Keep routing notes when receiving next serial
Aleisha Amohia [Fri, 7 Dec 2018 01:03:42 +0000 (01:03 +0000)]
Bug 11492: Keep routing notes when receiving next serial

This patch ensures the routing notes are carried over when generating
the next serial.

To test:
1) Create a routing list for a subscription
2) Add a borrower and a note to the routing list
3) Generate the next serial (serials-collection.pl)
4) Edit the routing list to see the notes
5) Note that the notes have disappeared
6) Apply patch
7) Edit the routing list, add a note
8) Generate the next serial
9) Edit the routing list and confirm the note is still there
10) Confirm you are still able to edit serials (serials-edit.pl) and
routing notes stay

Sponsored-by: Plant and Food Research Limited
Signed-off-by: Nazlı Çetin <nazli@devinim.com.tr>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2c25016a8e17b52e23c3d9806264e141b6426254)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 93cc499ed786630840845df21b4f52a2da4e6ea8)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22099: Fixed ILL toolbar to say Refresh when displaying requests
Hayley Mapley [Thu, 21 Mar 2019 01:39:59 +0000 (14:39 +1300)]
Bug 22099: Fixed ILL toolbar to say Refresh when displaying requests

On the ILL requests page that lists all requests, the List Request
button is displayed as part of the ILL toolbar. This patch fixes this by
instead changing the wording of the button to Refresh when on the main
page.

Test plan:
1) More -> ILL Requests, note that the List Requests button displays
while all the requests are already displayed
2) Apply the patch and restart things
3) More -> ILL Requests, note that the button now says Refresh, and
clicking it refreshes the page
4) Check that on all the other functions of the ILLs the button says
List Requests
5) Sign off!

Sponsored-by: Catalyst IT
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Small conflict resolved. Works as advertised.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 66877b780a775daf135ef1137364d76f67166e61)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6dd6ce120ad28f16fcddfb8acc94a019a7c34509)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22955: Markup error in OPAC lists template
Owen Leonard [Tue, 21 May 2019 17:14:36 +0000 (17:14 +0000)]
Bug 22955: Markup error in OPAC lists template

This patch makes a minor correction to the template for OPAC lists.
This correction fixes an error returned by the HTML validator by adding
an empty "alt" attribute to an image tag.

To reproduce the problem you should have at least one list available in
the OPAC with one or more items on it. View the contents of that list in
the OPAC. Run the page through the W3C validation service:
https://validator.w3.org. Either by pasting in the URL for the search
results (if web accessible) or by viewing source, copying, and pasting
into "Validate by Direct Input."

This patch addresses one specific error:

 - "An img element must have an alt attribute, except
    under certain conditions."

To test, apply the patch and try again to reproduce the validation
error. The error should no longer be present. There should be no
visible change to the page.

Click "Download list." A modal window should appear with a "Loading"
message, followed by a form for selecting a download format.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d26991cf4cc298fc3900b8133ff9b40cd061fb96)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 483f94e7202bfa14ed8e910e0f2b4db229b8d8c5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22947: Markup error in OPAC preferences file
Owen Leonard [Tue, 21 May 2019 13:19:17 +0000 (13:19 +0000)]
Bug 22947: Markup error in OPAC preferences file

This patch corrects a markup error in the OPAC .pref file which can
cause display problems. The patch also corrects a validator warning by
changing at <tt> to a <code>.

To reproduce the problem, go to Administration -> Global system
preferences -> OPAC.

Run the page through the W3C validation service:
https://validator.w3.org. Either by pasting in the URL for the search
results (if web accessible) or by viewing source, copying, and pasting
into "Validate by Direct Input."

This patch addresses two specific errors:

 - "Unclosed element code."
 - "The tt element is obsolete. Use CSS instead."

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

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 87cbb27826a9d03a424e8c944293669157924a01)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 327977abd6fe95ff8ee8f743d690e3efc45501d5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22950: Compiled CSS
Lucas Gass [Tue, 11 Jun 2019 13:40:03 +0000 (13:40 +0000)]
Bug 22950: Compiled CSS

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22950: Markup error in OPAC recent comment template
Owen Leonard [Tue, 21 May 2019 15:04:33 +0000 (15:04 +0000)]
Bug 22950: Markup error in OPAC recent comment template

This patch makes minor corrections to the template for the OPAC's
recent comments view. These corrections fix errors returned by the HTML
validator.

The patch moves some inline CSS into a class in the global OPAC CSS.
Some minor reindentation has also been done, so use diff with the '-w'
flag.

To reproduce the problem you should have the 'reviewson' system
preference turned on, and your system should have one or more
approved comments. View the "Recent comments" page in the OPAC. Run the
page through the W3C validation service: https://validator.w3.org.
Either by pasting in the URL for the search results (if web accessible)
or by viewing source, copying, and pasting into "Validate by Direct
Input."

This patch addresses one specific error:

 - "CSS: font-color: Property font-color doesn't exist."

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

Try again to reproduce the validation errors. Those errors should no
longer be present. There should be no visible change to the page.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 457000102e7e2228c6bd834283a9e58f32bb2104)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 43e16861da807876e2b041c6a5bc78fdebefbbee)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoBug 22953: Markup warning in OPAC user summary template
Owen Leonard [Tue, 21 May 2019 16:29:06 +0000 (16:29 +0000)]
Bug 22953: Markup warning in OPAC user summary template

This patch makes a minor markup change to the OPAC user summary template
(opac-user.tt) in order to quiet warnings from the HTML validator. The
obsolete name attribute on two links is removed in favor of class names.
The JavaScript has been modified accordingly.

To reproduce the problem you should have the AllowCheckoutNotes system
preference enabled. Log in to the OPAC as a user who has checkouts and
view the "your summary" page. Run the page through the W3C validation
service: https://validator.w3.org. Either by pasting in the URL for the
search results (if web accessible) or by viewing source, copying, and
pasting into "Validate by Direct Input."

This patch specifically addresses this warning:

 - "The name attribute is obsolete. Consider putting an id attribute on
   the nearest container instead."

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

Test the process of adding or editing an note on a checkout. It should
work correctly.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a4844b85eed809c20053adb7862c21601d6cf148)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9cf37c375a0dacf63baff16b5211b8dfac493691)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
5 years agoUpdate release notes for 18.11.06 release v18.11.06
Martin Renvoize [Fri, 31 May 2019 06:56:36 +0000 (07:56 +0100)]
Update release notes for 18.11.06 release

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoIncrement version for 18.11.06 release
Martin Renvoize [Fri, 31 May 2019 06:51:09 +0000 (07:51 +0100)]
Increment version for 18.11.06 release

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoRMaint: Translations follow-up
Martin Renvoize [Fri, 31 May 2019 06:46:34 +0000 (07:46 +0100)]
RMaint: Translations follow-up

Corrections to translations to make the tests happy

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoTranslation updates for Koha 18.11.06
Koha translators [Fri, 31 May 2019 06:25:01 +0000 (03:25 -0300)]
Translation updates for Koha 18.11.06

(cherry picked from commit 9b19cc6de62726237215bb32745211762a9d331f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22908: (RMaint follow-up) Correction for tests
Martin Renvoize [Fri, 31 May 2019 06:19:05 +0000 (07:19 +0100)]
Bug 22908: (RMaint follow-up) Correction for tests

18.11.x series does not contain bug 21241 and as such the tests for it
are not required. This patch removes those tests but leaves the tests
for 22908 intact.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22901: On items search fix search field change listening
Fridolin Somers [Tue, 14 May 2019 06:22:43 +0000 (08:22 +0200)]
Bug 22901: On items search fix search field change listening

In items search, when there is a custom field with authorised values :
when changing the conditional select AND/OR then the authorised values select disappears.
This behaviour is like when the search field is changed.

The bug is that JavaScript code meaning search field change listens on all selects instead of only search field select.

Test plan :
1) Define a custom items search field with authorised values
2) Go to items search
3) Click on 'New field'
4) On second line, select custom field
5) The authorised values select appears
6) Select 'AND' in conditional select
7) Without patch the authorised values select disappears, with patch nothing changes
8) On second line, select a non-custom field
9) The authorised values select is replaced by a text field
10) On second line, select custom field
11) The authorised values select appears

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e65b708f5385aa9df352cebe3c688a152fe1e176)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20537: Added checks to remove warning from overdue_notices.pl
Hayley Mapley [Fri, 24 May 2019 18:52:58 +0000 (13:52 -0500)]
Bug 20537: Added checks to remove warning from overdue_notices.pl

When executing overdue_notices.pl on borrowers that lack a surname, we
see this error:
Use of uninitialized value in concatenation (.) or string at
/usr/share/koha/bin/cronjobs/overdue_notices.pl line 575.

This patch fixes this issue by setting the $borr variable
based on the information that has been defined.

To test:
1) Create a borrower and set its surname to null
2) Checkout an item to the borrower and set it to be overdue
3) Navigate to kohaclone/misc/cronjobs and enter a koha-shell
4) Run the script: ./overdue_notices.pl
5) Observe the error appears
6) Apply the patch
7) Repeat steps 3-4
8) Observe the error is gone
9) Sign off!

Sponsored-by: Catalyst IT
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7d42e29c8b8cd913b052d10525c4d0b2cb36fc0d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22907: Add missing use statement
Jonathan Druart [Thu, 16 May 2019 18:02:29 +0000 (13:02 -0500)]
Bug 22907: Add missing use statement

Signed-off-by: Liz Rea <wizzyrea@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 02305630824e46c9c7846aa6f163265970463d1e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22907: Remove previous code handling the same thing
Jonathan Druart [Tue, 14 May 2019 17:27:25 +0000 (12:27 -0500)]
Bug 22907: Remove previous code handling the same thing

See:
  commit a71b96295fb07084e4f87ac1a471e89355f3c5a4
  Bug 12627: Fix default values

Signed-off-by: Liz Rea <wizzyrea@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 8fed07826ee9fd69f3b92bbb6decb864e4c7dfd2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22907: Fix new suggestion with strict sql modes
Jonathan Druart [Tue, 14 May 2019 17:06:24 +0000 (12:06 -0500)]
Bug 22907: Fix new suggestion with strict sql modes

With sql_strict_modes turned on, if you try to create a new suggestion
you will get:
Incorrect integer value: '' for column '$INT_COLUMN' at row 1

Test plan:
Turn on strict_sql_modes, create a new suggestion, then edit it.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
JD: Edit after SO, remove unecessary changes (not related to this bug)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2329d2ea8393e133bf689eb2d311fb0bcc99640f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22907: Add tests
Jonathan Druart [Tue, 14 May 2019 17:05:53 +0000 (12:05 -0500)]
Bug 22907: Add tests

Do not use copyrightdate as it is weird to have it int

Signed-off-by: Liz Rea <wizzyrea@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 936cf409992d6393473f564a25f70ea8b390e74b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22932: GetLatestSerials should not return formatted date
Owen Leonard [Fri, 17 May 2019 13:19:33 +0000 (13:19 +0000)]
Bug 22932: GetLatestSerials should not return formatted date

This patch updates GetLatestSerials in Serials.pm to remove date
formatting. Formatting of dates should be done in the template using
$KohaDates.

To test, apply the patch and locate a bibliographic record in the staff
client which has a subscription with issues.

 - On the bibliographic detail page for that record, view the
   "Subscriptions" tab. Dates in the table of recent issues should be
   formatted correctly.
 - View the details for the subscription in the Serials module. Create
   or edit a routing list for that serial. In the "Issue" dropdown the
   issue dates should be formatted correctly.
 - View the bibliographic detail page for the record in the OPAC. Open
   the "Subscriptions" tab. In the table of recent issues publication
   date and received date should be formatted correctly. The table
   should sort correctly on these dates.

Note: Although opac-ISBDdetail.pl calls GetLatestSerials, as far as I
can tell there is no serial-related output to update. The code appears
to be unused.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1cdf657c057a7a565016df28a17151a2f4fce134)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22914: Add holds column to batch item delete to fix show/hide columns behaviour
Lucas Gass [Mon, 13 May 2019 18:05:38 +0000 (18:05 +0000)]
Bug 22914: Add holds column to batch item delete to fix show/hide columns behaviour

The changes on 19490 caused a bug, where the show/hide column feature hides the
wrong column on the items table. The two templates share a js file, and
the data passed is the same.

Adding the column to the template brings things back into alignment,
the data is already there, we just show it.

TEST PLAN:
1. Go to Tools > Batch item deletion and enter at least one barcode.
2. Try to hide a column that is showing
3. Notice it hides the wrong column
4. apply patch
5. repeat steps 1 and 2.
6. Notice the correct column is being hidden
7. Verify the new column for number of holds on the item works correctly
   for item and record level holds

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bb06060c4c3e0f4393f24096400ee4c8312a44ec)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21450: (QA follow-up) remove a couple of unused variables to make QA script happy
Liz Rea [Fri, 24 May 2019 17:56:40 +0000 (12:56 -0500)]
Bug 21450: (QA follow-up) remove a couple of unused variables to make QA script happy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 427e4ebc6ba4d52154bc8330b8edf54d5a6b88b2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21450: Cache authorities search using term and auth_type
Nick Clemens [Fri, 28 Sep 2018 14:58:20 +0000 (14:58 +0000)]
Bug 21450: Cache authorities search using term and auth_type

This is a simple fix to prevent incorrect caching of results when using
link_bibs_to_authorities

To test:
1 - Find or create a record with the same term in a subject and genre
heading
2 - Find or create authority records for the term as a subject and genre
type
3 - Run link bibs to authorities
4 - Verify both tags in the record are linked to the subject heading
5 - Aply patch
6 - Unlink the record and re-run the script (or just re-run)
7 - Each tag should be linked to correct authority

Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 848a0d41fffba7df1be9f2584770112f0938beb0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21450: Unit tests
Nick Clemens [Wed, 23 Jan 2019 21:07:41 +0000 (21:07 +0000)]
Bug 21450: Unit tests

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

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 21450: Remove copyright lines

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 366ef794969c3bc67c70ea7c9d85cb04944f4f05)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22724: Check permissions in the script before displaying template
Nick Clemens [Thu, 16 May 2019 10:54:03 +0000 (10:54 +0000)]
Bug 22724: Check permissions in the script before displaying template

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3034c028264f072fc1a447a11a518255282fc990)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22724: Allow only users with correct permissions to 'Write off selected'
Hayley Mapley [Wed, 8 May 2019 03:39:33 +0000 (15:39 +1200)]
Bug 22724: Allow only users with correct permissions to 'Write off selected'

Due to the addition of a 'Write off selected' button in 18.11, users without
writeoff permissions could mistakenly view and action the 'Write off
selected' option for a patron in Accounting > Make a payment (Fines > Pay fines).
The attached patch corrects this error.

Test plan:
1) Make sure that a staff user has '(writeoff) Write off fines and fees'
permission disabled
2) Bring up a patron with an unpaid fee, go to Accounting -> Make a
payment
3) Note that 'Write off selected' button is displayed.
4) Select a fee, click 'Write off selected'. Note that staff member has
access to 'Write off an amount toward selected fines'
5) Apply the patch
6) Repeat steps 1-2, and note that the button is no longer displayed
7) Bonus points, as a staff user with writeoff permissions enabled check
that all four buttons (Pay amount, Pay selected, Write off all, Write
off selected) are displayed

Sponsored-by: Catalyst IT
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d36566d6eaa9dd02528bbd1219747ccfd4e6b531)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22904: Untranslatable strings in members-menu.js
Owen Leonard [Tue, 14 May 2019 13:43:12 +0000 (13:43 +0000)]
Bug 22904: Untranslatable strings in members-menu.js

This patch moves several English strings out of members-menu.js and into
str/members-menu.inc where they can be picked up by the translation
process. The following strings are affected:

"Are you sure you want to renew this patron's registration?"
"Are you sure you want to update this child to an Adult category?  This
cannot be undone."
"Dates of birth should be entered in the format 'MM/DD/YYYY'"
"Dates of birth should be entered in the format 'YYYY-MM-DD'"
"Dates of birth should be entered in the format 'DD/MM/YYYY'"
"Dates of birth should be entered in the format 'DD.MM.YYYY'"

This patch also makes a correction to members-toolbar.inc in order to
enable the presence of the "Update child to Adult" menu item.

To test:

 - Install and update a language.
 - Check the po-file for that language. You should find no msgid for
   the strings listed above.
 - Apply the patch.
 - Update the language you installed.
 - You should find entries for all the strings above.
 - Translate those messages and update the translated templates.
 - Reinstall the translation.

In the staff client:

 - Select your updated translation.
 - Open an expired patron's account and choose "Renew patron" from the
   "More" button in the toolbar. You should be prompted for confirmation
   using the translation you provided.
 - To test the "Update child" confirmation you should have only one
   patron category in the "Adult" category.
   - Open a patron record with a child category and choose "Update
     child" from the "More" menu in the toolbar. You should be prompted
     for confirmation using the translation you provided.
 - To test the date format messages: From the patrons home page, expand
   the advanced search options in the header search form. Select "Date
   of birth" under "Search fields." A correctly-translated tooltip
   should appear above the search field.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f5894d41d21b3d57217397f7d8de500082e66157)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22908: Add tests
Jonathan Druart [Tue, 14 May 2019 17:21:57 +0000 (12:21 -0500)]
Bug 22908: Add tests

Signed-off-by: Liz Rea <wizzyrea@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 9613d9f1647bfceeb15b60c731f2c84796a12f87)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22908: Prevent ModSuggestion to send a notice if something wrong happened
Jonathan Druart [Tue, 14 May 2019 17:23:25 +0000 (12:23 -0500)]
Bug 22908: Prevent ModSuggestion to send a notice if something wrong happened

There is a return value $status_update_table that is set to 0, then we
send the alert (whatever the value of this variable). We must return
earlier if something happened!

Test plan:
Not sure how to recreate it via the interface, so just run the tests?

Signed-off-by: Liz Rea <wizzyrea@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 39c4d9d55e5a2e137adbbbd2b29b5b829f66b59e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 17698: (RM follow-up) Pass lang variable so letter can be translated
Nick Clemens [Wed, 22 May 2019 14:37:53 +0000 (14:37 +0000)]
Bug 17698: (RM follow-up) Pass lang variable so letter can be translated

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d7e3b483714436772c47ba0f8d33e5ace74c1427)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 14385: (RM follow-up) Remove line from bad rebase
Nick Clemens [Wed, 22 May 2019 14:32:26 +0000 (14:32 +0000)]
Bug 14385: (RM follow-up) Remove line from bad rebase

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 78b866fcd9f792f1195b90d7a49566f0055e658c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22896: Missing inputs in transfer modal
Nick Clemens [Mon, 13 May 2019 15:34:47 +0000 (15:34 +0000)]
Bug 22896: Missing inputs in transfer modal

This patch restores hidden inputs to save overridden checkin date and other data

Currently we lose the list of checkouts and several settings when items with transfers are checked in

To test:
1 - Find an item from another branch
2 - Set a checkin date and click the box for the date to be remembered
3 - Check in the item
4 - Click ok or print, note the checkin date is lost
5 - Apply patch
6 - Repeat
7 - Checkin date remains

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit edb9f498f7148a0d6b2c232a8c22412e113c422b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22965: fixes typo on classification sources description on admin homepage
Henry Bolshaw [Wed, 22 May 2019 15:02:40 +0000 (15:02 +0000)]
Bug 22965: fixes typo on classification sources description on admin homepage

Removed comma from description.

Test plan:
1. Go to Admin homepage
2. Check Classification Sources description
3. Verify that comma after i.e. has gone removed

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b67462d471a54bf342295cbc5e46373d065bab7e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 15221: (QA follow-up) Fix Message.t
Marcel de Rooy [Mon, 27 May 2019 09:39:34 +0000 (09:39 +0000)]
Bug 15221: (QA follow-up) Fix Message.t

As Jonathan reported on comment11, SIP/Message.t fails now.

This is a trivial fix for that. In the first case we should just no longer
expect the alert flag. In the second case it makes more sense to toggle
the value of the checked_in_ok setting.

Test plan:
Run t/db_dependent/SIP/Message.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 533ff7ab29a1ca6d35d0e306dd97273838ad3064)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 15221: SIP server always sets the alert flag when item not returned
David Cook [Tue, 21 May 2019 01:12:44 +0000 (11:12 +1000)]
Bug 15221: SIP server always sets the alert flag when item not returned

The checked in response from the ACS always has the alert bit set to
true, even when using the checked_in_ok option.

This patch sets the alert bit to 0 when checked_in_ok is used and
the item is checked in without a preceding checkout.

To test:

0) Create patron in web interface with a cardnumber and userid of "staff" with a password
that matches the account in SIPconfig.xml. Also set their branch to CPL
(also matching SIPconfig.xml).
1) Create an item with a barcode of 'test'
2) Choose a patron to check out to and record their borrowernumber

In one terminal:
3) cd to your git directory (e.g. /home/koha/koha)
4) perl ./C4/SIP/SIPServer.pm ~/koha-dev/etc/SIPconfig.xml

In another terminal:
5) cd to your git directory (e.g. /home/koha/koha)
6) perl ./misc/sip_cli_emulator.pl -l CPL -su staff -sp <password> --port=6001 --address=localhost --item test -m checkin --patron <borrowernumber>
NOTE: You need to replace <borrowernumber> with the borrowernumber from Step 2, and <password> with the password from Step 0.

Before patch:

koha@9ec653ab82ce:~/koha$ perl ./misc/sip_cli_emulator.pl -l CPL -su staff -sp <password> --port=6001 --address=localhost --item test -m checkin --patron <borrowernumber>
Attempting socket connection to localhost:6001...connected!
SEND: 9300CNstaff|COStaff1|CPCPL|
READ: 941

Trying 'checkin'
SEND: 09N20190521    00310320190521    003103APCPL|AOCPL|ABtest|AC<password>|BIN|
READ: 101YNY20190521    003106AOCPL|ABtest|AQCPL|AJTest|

After patch:
koha@9ec653ab82ce:~/koha$ perl ./misc/sip_cli_emulator.pl -l CPL -su staff -sp <password> --port=6001 --address=localhost --item test -m checkin --patron <borrowernumber>
Attempting socket connection to localhost:6001...connected!
SEND: 9300CNstaff|CO<password>|CPCPL|
READ: 941

Trying 'checkin'
SEND: 09N20190521    01000020190521    010000APCPL|AOCPL|ABtest|AC<password>|BIN|
READ: 101YNN20190521    010004AOCPL|ABtest|AQCPL|AJTest|

Signed-off-by: Liz Rea <wizzyrea@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 d963a3854c962bda3361213f2ad8e7626311d20b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21831: Allow move all fields even if destination field is different
Jonathan Druart [Fri, 7 Dec 2018 17:43:18 +0000 (14:43 -0300)]
Bug 21831: Allow move all fields even if destination field is different

Tests exist in t/SimpleMARC.t to prove that it works and it is possible.
I do not remember what I wrote this limitation.

Signed-off-by: Jon Knight <j.p.knight@lboro.ac.uk>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 189bde4a1d043a25a0eddcc07401b7946653c3b1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22917: Fix typo in another test file
Jonathan Druart [Thu, 16 May 2019 19:07:25 +0000 (14:07 -0500)]
Bug 22917: Fix typo in another test file

It looks safe to do it here and now.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6ae2edb033ed7ebc2683026f42cf9400babd604b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22917: Fix a typo in an output_pref call
Martin Renvoize [Thu, 16 May 2019 15:55:16 +0000 (16:55 +0100)]
Bug 22917: Fix a typo in an output_pref call

Due to a type in a call to output_pref (datenonly vs dateonly) we were
comparing logactions within a minutes accuracy. Counting the logs for
the day would be sufficient for the test ;)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 04d990c71d34d0c44999cfdf80e8379959d14de8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22917: Prevent Circulation.t if tests ran too slowly
Jonathan Druart [Thu, 16 May 2019 00:46:48 +0000 (19:46 -0500)]
Bug 22917: Prevent Circulation.t if tests ran too slowly

After bug 21213 we wanted to know why Circulation.t was failing randomly on a given test.
Since it is pushed, it failed (at least) twice, with the same error:

    #   Failed test 'AddReturn must have debarred the patron'
    #   at t/db_dependent/Circulation.t line 3112.
    #          got: ''
    #     expected: '1'
    # AddReturn returned message $VAR1 = {
    #           'WasReturned' => 1
    #         };

    #   Failed test 'Test at line 1918'
    #   at t/db_dependent/Circulation.t line 3116.
    #          got: '0'
    #     expected: '1'

    #   Failed test 'Test at line 1918'
    #   at t/db_dependent/Circulation.t line 3119.
    #          got: undef
    #     expected: '2019-05-30'
    # Looks like you failed 3 tests of 21.

The test at line 3113 expects the flags 'WasReturned' and 'Debarred' to be set,
but only WasReturned is.
Which means the patron has not been debarred. It is not because the checkout has
not been detected as overdue.

If you apply only the first patch you will see that the tests are failing with
the exact same failures.
Indeed, if due_date is not passed to test_debarment_on_checkout, it is set to now (dt_from_string).
However, if the call and the test of the parameters inside the subroutine takes
more than 1 second,
then due_date will be after what we really expect. To reproduce that, we add
1 minute to due_date and we observe the tests failing.

The trick here (and we should have in all our tests) is to mock
DateTime->now to make sure dt_from_string will always return the same
value, it is what we expect from our tests (in 99.9% of the cases at
least).

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6cf717e6c9e377850674ad6462480884a047145b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22917: Recreate the failure
Jonathan Druart [Thu, 16 May 2019 00:45:06 +0000 (19:45 -0500)]
Bug 22917: Recreate the failure

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 085cb4de51c528b6a50b60f591f6b5ac426efd6a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22705: Change default value of cxn_pool to 'Static'
Julian Maurice [Wed, 15 May 2019 06:41:01 +0000 (08:41 +0200)]
Bug 22705: Change default value of cxn_pool to 'Static'

'Static' is the default value of Search::Elasticsearch and for a good
reason : it works in most cases, unlike the 'Sniff' option

To test:
1 - Apply patch
2 - Edit koha-conf.xml
3 - Add '<cxn_pool>Static</cxn_pool>' to the elasticsearch stanza
4 - Restart all the things!
5 - Reindex ES, it works
6 - Set SearchEngine to ES, try searching
7 - It works!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9532a3edeacd8fb3df67e8a01ed4e89069ffc017)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22930: (QA follow-up) Add two test descriptions
Marcel de Rooy [Fri, 17 May 2019 08:35:20 +0000 (08:35 +0000)]
Bug 22930: (QA follow-up) Add two test descriptions

No more than that ;)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 2ccc5dcdf124ff8275f58826c837fc55cfd8a9a1)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22930: Make TestBuilder->build_object explodes if parameters are wrong
Jonathan Druart [Thu, 16 May 2019 17:56:07 +0000 (12:56 -0500)]
Bug 22930: Make TestBuilder->build_object explodes if parameters are wrong

This patch implements bug 15339 for build_object.
We want it to warn if the call is wrong.

Test plan:
Make sure the tests are still returning green

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 52325a771a02b603e807c29d586fe44fabebb792)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21651: (QA follow-up) Remove remaining obsolete file from German web installer
Katrin Fischer [Sat, 11 May 2019 12:59:33 +0000 (12:59 +0000)]
Bug 21651: (QA follow-up) Remove remaining obsolete file from German web installer

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 71018d4cca41c9e9eeab1d8980af4f7253a728a8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21651: Always insert notice templates related tables
Jonathan Druart [Wed, 24 Oct 2018 20:02:39 +0000 (17:02 -0300)]
Bug 21651: Always insert notice templates related tables

The 3 following files must be mandatory and insert during the install process:
- message_transport_types.sql
- sample_notices_message_attributes.sql
- sample_notices_message_transports.sql

They insert data for
- message_transport_types
- message_attributes
- message_transport_type

Otherwise the notice templates (table letter) will fail.

Moreover these 3 files are identical and are put in several places (1 per language)
to make the description translatable (using the related .txt file)

Test plan:
- Install Koha in English and in another language
- Select all the sample data
=> They all should be inserted correctly

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 990cc79ef085b74764cd68875fc0fd6dc6da8ffe)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21651: Remove language specific sql file for notice templates related tables
Jonathan Druart [Wed, 24 Oct 2018 19:34:46 +0000 (16:34 -0300)]
Bug 21651: Remove language specific sql file for notice templates related tables

This patch removes the 3 following files for the different languages
- message_transport_types.sql
- sample_notices_message_attributes.sql
- sample_notices_message_transports.sql
They were all identical, only one version is kept in installer/data/mysql/mandatory

.txt files are removed as well

They inserted data for
- message_transport_types
- message_attributes
- message_transport_type

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1114ba929f0aa634d6f9c10d8931c2ca25871c7d)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22875: Document verbose option in import_patrons
Colin Campbell [Thu, 9 May 2019 10:32:25 +0000 (11:32 +0100)]
Bug 22875: Document verbose option in import_patrons

Docs did not state that verbose can be repeated or that you
need more than 1 repetition to see lines that have failed

To test:
- Run ./import_patrons.pl -h
- Verify the additional documentation for -v is shown.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit d9248c8802c4009ca99209da549447d13d6f686f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22847: [18.11] Correctly displayed circ rule values for max_holds
Jonathan Druart [Thu, 16 May 2019 17:31:23 +0000 (12:31 -0500)]
Bug 22847: [18.11] Correctly displayed circ rule values for max_holds

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22886: Missing space between fields from Keyword to MARC mapping in cataloguing...
Katrin Fischer [Sat, 11 May 2019 22:34:03 +0000 (00:34 +0200)]
Bug 22886: Missing space between fields from Keyword to MARC mapping in cataloguing search

If you have multiple subfields mapped to the 'subtitle' keyword,
those fields will show up without separating space.

To test:
- Add 3 subtitle entries in Keyword to MARC mapping for a framework
  - 245 b
  - 245 c
  - 245 h
- Edit a record, make sure the framework matches, add:
  - 245 b, c, h
- Search for it in cataloguing search (not catalog!)
- Verify the subtitle fields show, but are all concatenated
- Apply patch
- Search again and verify the display is improved with a separating
  space

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f00d909220ebde5162335e255e4ba938a9563bff)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 20514: Use streetnumber when searching for patrons by address
Jonathan Druart [Sat, 11 May 2019 15:23:28 +0000 (10:23 -0500)]
Bug 20514: Use streetnumber when searching for patrons by address

The streetnumber field was ignored from the search.

Test plan:
Create a patron with streetnumber="12", address="rue des cerisiers"
Search for patrons using the search field "street address"
using: 12 rue des cerisiers
=> Without this patch the patron will not be returned
=> With this patch applied it will!

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 97ec0a2e4bf76cf2e67a7ddbd463d9942a4fe383)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22781: Correctly filter the emails
Jonathan Druart [Thu, 2 May 2019 01:05:30 +0000 (21:05 -0400)]
Bug 22781: Correctly filter the emails

Ho, another bug!

The email was not correctly filtered.

Test plan:
Use the evil string for an email, do a search.
=> Notice that without this patch the results never show up

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5410186f6829fc4b74a845e8954bd7eea3f19862)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22781: Does not double filter address
Jonathan Druart [Thu, 2 May 2019 00:54:02 +0000 (20:54 -0400)]
Bug 22781: Does not double filter address

Ho, a bug!
Some fields in the address where double filtered.

Test plan:
Use the evil strings in the address field and do a search, you will see
double html encoded characters without this patch.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ecb12104ffc7284089a1c8134ca8811e99e7419c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22781: Test patron's info filtering
Jonathan Druart [Thu, 2 May 2019 00:29:05 +0000 (20:29 -0400)]
Bug 22781: Test patron's info filtering

The patron's data was not correctly escaped actually.

Test plan:
This is a good value for the whole patchset: <strong>fir's"tname</strong> \123 ❤
use it for a patron's firstname, then do a search

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 35d00030ceb572822979300a5291356a32427a16)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22781: Escape cardnumber, category's description, library's name and dateexpiry
Jonathan Druart [Thu, 2 May 2019 00:28:04 +0000 (20:28 -0400)]
Bug 22781: Escape cardnumber, category's description, library's name and dateexpiry

This will fix the previous failure. Note that other fields like
borrowernumber, Price escaped values, integers, etc. could be escaped
the same way but will be useless (save polar bears).

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3a3057545c56f4f1a41fcd7643265204844cd2d3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22781: Add tests
Jonathan Druart [Thu, 2 May 2019 00:28:55 +0000 (20:28 -0400)]
Bug 22781: Add tests

Test plan:
Apply only this patch
=> The tests will fail, the library's name is not correctly escaped.

Note:
This applies for the whole patchset, when the tests fail you will need
to remove the patrons added by the tests with the following SQL query:
  delete from borrowers where surname like "test_patron_%";
We are expecting END to be called even if something goes wrong, but
DESTROY must be used instead. This will be fixed separately, on its own
bug report.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6e8ecb8c6c8cf5d5188d2ad138e4fdbd8f395b3e)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22225: Correctly use invoiceincgst over listincgst
Martin Renvoize [Mon, 11 Feb 2019 14:04:01 +0000 (14:04 +0000)]
Bug 22225: Correctly use invoiceincgst over listincgst

Mistakenly, we were looking at listincgst in the templates but using
invoiceincgst in the scripts. This patch rectifies that by switching to
use invoiceincgst in the templates too.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 43047ee734e2b6b650e43710a712390433cbb2bd)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22878: Do not pass layout_id on creating a layout
Jonathan Druart [Fri, 10 May 2019 17:27:40 +0000 (12:27 -0500)]
Bug 22878: Do not pass layout_id on creating a layout

Attempting to create a patron card layout with mysql strict mode on gives the following error:
  DBD::mysql::st execute failed: Incorrect integer value: '' for column 'layout_id' at row 1

Test plan:
- Turn on sql_strict_modes
- Create a new patron card
=> Must success with this patch applied

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 8d53fae9494b50c0cf2dcc98b18982b0d8fc416f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22878: Add tests
Jonathan Druart [Fri, 10 May 2019 17:27:34 +0000 (12:27 -0500)]
Bug 22878: Add tests

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 9f18afa7b34574cd872c94ee366a8d3e75085413)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 7862: Preventing warns when creating a notice
Aleisha Amohia [Mon, 29 Apr 2019 03:14:35 +0000 (03:14 +0000)]
Bug 7862: Preventing warns when creating a notice

To reproduce warns:
1) Go to Tools -> Notices & slips
2) Create a new notice of any module

Notice these warns:
Use of uninitialized value $code in regexp compilation at
/home/vagrant/kohaclone/tools/letter.pl line 265.
Use of uninitialized value $code in regexp compilation at
/home/vagrant/kohaclone/tools/letter.pl line 265.
Use of uninitialized value $code in regexp compilation at
/home/vagrant/kohaclone/tools/letter.pl line 265.

CGI::param called in list context from package
CGI::Compile::ROOT::home_vagrant_kohaclone_svc_letters_get line 50, this
can lead to vulnerabilities. See the warning in "Fetching the value or
values of a single named parameter" at /usr/share/perl5/CGI.pm line 436.
CGI::param called in list context from package
CGI::Compile::ROOT::home_vagrant_kohaclone_svc_letters_get line 50, this
can lead to vulnerabilities. See the warning in "Fetching the value or
values of a single named parameter" at /usr/share/perl5/CGI.pm line 436.

3) Create a new notice of the Circulation module

Notice this additional warn:
Use of uninitialized value $code in pattern match (m//) at
/home/vagrant/kohaclone/tools/letter.pl line 258.

To test:
4) Apply patch and refresh page
5) Run steps 1-3 again and confirm no warns show

Sponsored-by: Catalyst IT
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 700b7dfa09e38c074cebbbb5caac64e031d5c0d5)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22836: (follow-up) improve test message
Nick Clemens [Wed, 15 May 2019 12:10:15 +0000 (12:10 +0000)]
Bug 22836: (follow-up) improve test message

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 92ab7f66eb5371596d8c46e56f4fdb503ed5d81c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22836: (follow-up) Bug 22478: (QA follow-up) Make test consistent with variable...
Jonathan Druart [Fri, 3 May 2019 01:04:54 +0000 (21:04 -0400)]
Bug 22836: (follow-up) Bug 22478: (QA follow-up) Make test consistent with variable name

One occurrence was missing.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7799f4ddd1f1fe111081dc3695c9038fa500e961)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoRevert "Bug 22478: (QA follow-up) Handle category in opac-shelves like a boolean"
Jonathan Druart [Fri, 3 May 2019 00:49:45 +0000 (20:49 -0400)]
Revert "Bug 22478: (QA follow-up) Handle category in opac-shelves like a boolean"

This reverts commit 375dd35d5354d46c4c16f534494b123ce370c3f4.

https://bugs.koha-community.org/show_bug.cgi?id=22836
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7bed2a3fe61ff605b636e292e73b96947de23b29)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoRevert "Bug 22478: (QA follow-up) Update tests to check for any script tags"
Jonathan Druart [Fri, 3 May 2019 00:49:37 +0000 (20:49 -0400)]
Revert "Bug 22478: (QA follow-up) Update tests to check for any script tags"

This reverts commit d9b3b90849fd95d296b73b330c4e32ff018c81a5.

https://bugs.koha-community.org/show_bug.cgi?id=22836
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit c265fcc476bc4d4fc74d5a23c0d5ef8ef21650b2)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22812: Use Koha::Subscription in NewSubscription
Jonathan Druart [Fri, 10 May 2019 16:11:14 +0000 (11:11 -0500)]
Bug 22812: Use Koha::Subscription in NewSubscription

Starting to write tests I realize that we are going to add too much
specific logic which is already handled in Koha::Object->store.
The easiest and safe way is to use it :)

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b41f215bfedbae0898a9291d2f14e2a3dd560049)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22812: Fix GROUP BY in checkrouting
Jonathan Druart [Mon, 6 May 2019 18:50:54 +0000 (13:50 -0500)]
Bug 22812: Fix GROUP BY in checkrouting

On the way, let fix this error
DBD::mysql::st execute failed: Mixing of GROUP columns
(MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is
no GROUP BY clause [for Statement "SELECT count(routingid) routingids
FROM subscription LEFT JOIN subscriptionroutinglist

Test plan:
Create a routing list, search for subscriptions
In the action list you should see "Edit routing list (1)" or "New
routing list"

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 256b134a94e83b7072b5891a2d60f0e08e813583)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22812: Add tests for checkrouting
Jonathan Druart [Mon, 6 May 2019 18:50:26 +0000 (13:50 -0500)]
Bug 22812: Add tests for checkrouting

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 0759811ab629e8215ee270b4ec920f71d9bc0d25)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22812: Fix new subscription with strict sql modes
Jonathan Druart [Mon, 6 May 2019 18:34:19 +0000 (13:34 -0500)]
Bug 22812: Fix new subscription with strict sql modes

With sql_strict_modes turned on, if you try to create a new subscription
you will get:
Incorrect integer value: '' for column '$INT_COLUMN' at row 1

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e8e7ea352ef237555ee4d47c98feb879f3eb9e31)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22713: Remove unecessary $replacementprice var
Jonathan Druart [Mon, 6 May 2019 16:55:32 +0000 (11:55 -0500)]
Bug 22713: Remove unecessary $replacementprice var

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 3b877cc240eb44acafaef1ed5f287eae3dfb7baa)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22713: Pass replacement price in to order if defined by MarcItemFieldsToOrder
Nick Clemens [Thu, 25 Apr 2019 16:23:22 +0000 (16:23 +0000)]
Bug 22713: Pass replacement price in to order if defined by MarcItemFieldsToOrder

To test:
 1 - Have AcqCreateItems set to 'On ordering' (or set in a basket)
 2 - Define MARCItemFieldsToOrder
    homebranch: 975$a
    holdingbranch: 975$b
    itype: 975$y
    nonpublic_note: 975$x
    public_note: 975$z
    loc: 975$c
    ccode: 970$c
    notforloan: 975$7
    uri: 975$u
    copyno: 975$n
    quantity: 975$q
    budget_code: 975$h
    price: 975$g
    replacementprice: 975$p
 3 - Have a marc record with some order info defined as above, including a replacementprice
 4 - Add to basket - > from a new file
 5 - Don't check for duplicates, add the order
 6 - Note the order has no replacementprice, but the item does
 7 - Close basket, receive order, do not enter a new replacement price
 8 - Note the items replacement price is clear
 9 - Apply patch
10 - Repeat
11 - Note when order added to basket it has a replacement price
12 - Note when order is received the replacement price is populated and passed into item correctly

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 57b027734e3c1a315cd11fedbf94771fa8381a30)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 11853: Add tests
Jonathan Druart [Wed, 8 May 2019 21:37:40 +0000 (16:37 -0500)]
Bug 11853: Add tests

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 735d23c299669b40d3e3e2a4fe21b88fc6cca00f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 11853: Allow to clear the date of birth at the OPAC
Jonathan Druart [Wed, 8 May 2019 21:37:50 +0000 (16:37 -0500)]
Bug 11853: Allow to clear the date of birth at the OPAC

A patron is not able to clear their date of birth.

When cleared tt is set to NULL in DB which means, for the patron's
modifications feature, that nothing has been changed.

Test plan:
0/ Do not apply the patch
1/ Edit your personal details at the OPAC
2/ Add a date of birth
3/ On the staff interface, approve the modification request
=> OK it is updated
4/ Edit your personal details and clear the date of birth
5/ On the staff interface
=> KO the table display is wrong, nothing is marked has changed
6/ Approve the modification requiest
=> KO it has not been cleared
7/ Apply the patch and repeat 1 to 6 and confirm that the behaviors are
now correct.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6692800794cbf403e8be8c8062608b60148c0d56)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22881: Trying to clear search history via the navbar X doesn't clear any searches
Owen Leonard [Fri, 10 May 2019 13:24:39 +0000 (13:24 +0000)]
Bug 22881: Trying to clear search history via the navbar X doesn't clear any searches

This patch undoes a mistake introduced in my patch for Bug 21479. A
"preventDefault()" was added to the search history clear button by
mistake. The "confirmDelete" function only works if the default action
of the link is allowed to complete.

To test you must have the EnableOpacSearchHistory system preference
enabled. Apply the patch and log into the OPAC as a patron who has a
search history.

Click the "X" link in the header next to the "Search history" link.
Confirm that you want to clear your search history. The page should
refresh. Navigate to your account -> Your search history to confirm that
your search history has been cleared.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 6d1b7ff27eb2d53d637c169c7132a66d546c0124)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22899: DBRev 18.11.05.001
Nick Clemens [Tue, 14 May 2019 18:15:54 +0000 (18:15 +0000)]
Bug 22899: DBRev 18.11.05.001

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b90bbc125969dc0048dde2ec37531a6ef6cd2b36)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22899: (QA follow-up) Change accessor name
Martin Renvoize [Tue, 14 May 2019 12:21:55 +0000 (13:21 +0100)]
Bug 22899: (QA follow-up) Change accessor name

This patch changes pending_hold to has_pending_hold to signify that
we're returning a boolean and not a Koha::Hold object.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5c81d986212b480d9b491e46b3fb4498c0eb2c2c)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22899: (QA follow-up) Ensure constraint is created
Martin Renvoize [Tue, 14 May 2019 12:17:01 +0000 (13:17 +0100)]
Bug 22899: (QA follow-up) Ensure constraint is created

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 49a6aac8b6d8fd13999638f5a6ae4d4481dbf304)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22899: Add pending_hold method to Koha::Item
Nick Clemens [Mon, 13 May 2019 20:09:05 +0000 (20:09 +0000)]
Bug 22899: Add pending_hold method to Koha::Item

To test:
 1 - Enable course reserves
 2 - Create a course
 3 - Add an item to the course
 4 - Attempt to view the course on the OPAC
 5 - Internal Server Error
 6 - Apply patch
 7 - Add an item to the holds queue by placing a hold and  running holds queue builder or:
     INSERT INTO tmp_holdsqueue (itemnumber) VALUES (###);
 8 - View the course page, note item appears 'Pending hold'
 9 - Remove the holdsqueue line
10 - View the course page, note item appears 'Available'
11 - prove -v t/db_dependent/Koha/Item.t

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
I see Jonathan's comments about small improvements, but will sign off as
everything works as expected here.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit f21ebad7d298f25e44771e5833d1d1d4d6d8f777)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22899: Database update
Nick Clemens [Mon, 13 May 2019 20:08:06 +0000 (20:08 +0000)]
Bug 22899: Database update

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit af1067f3d466cf3bd32c4747c4a00dd7542c1fe0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22433: Use Data::Dumper instead of Data::Printer
Jonathan Druart [Fri, 10 May 2019 17:32:23 +0000 (12:32 -0500)]
Bug 22433: Use Data::Dumper instead of Data::Printer

Data::Printer is not in our deps

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b5b64e7900fd61bd525409ee869deafde7b8c50a)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22433: Add debug statement to Transaction.t
Jonathan Druart [Thu, 9 May 2019 18:04:38 +0000 (13:04 -0500)]
Bug 22433: Add debug statement to Transaction.t

Hard to know what's going on here without more info. Adding this output
may help to investigate more.

Test plan:
Make sure the tests still pass

If it fails, please paste the output!!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 63a8e27f2e087b698e986e026dc9fa511b2afbfe)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 21709: Replace 'no popup' plugin links with a span
Jonathan Druart [Thu, 1 Nov 2018 16:31:31 +0000 (13:31 -0300)]
Bug 21709: Replace 'no popup' plugin links with a span

Test plan:
Edit a bibliographic record
Notice that the icons next to fields linked with a plugin can be a link
or not. The browser displays a pointer or not.

It will remove the ambiguity to display an icon that is clickable but
does nothing when clicked.
We could also have another icon to disociate both behaviors.

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 9fa97774ae6b3c84028b15f8c768460a012320ea)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22782: DBIC update for SocialData
Nick Clemens [Fri, 10 May 2019 12:10:42 +0000 (12:10 +0000)]
Bug 22782: DBIC update for SocialData

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5ecbe281aff13e53d4fbc5064714de9209410358)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22895: (bug 22650 follow-up) Correct itemnumber call in placerequest.pl
Nick Clemens [Mon, 13 May 2019 15:07:41 +0000 (15:07 +0000)]
Bug 22895: (bug 22650 follow-up) Correct itemnumber call in placerequest.pl

Backport of 22650 makes an object call to an item hashref retrieved by get item:

  94             if ( CanItemBeReserved($borrower->{'borrowernumber'}, $item->itemnumber, $branch)->{status} eq 'OK' ) {

Should be $item->{itemnumber}

To test:
1 - Try to place an item level hold
2 - It fails
3 - Aply patch
4 - Try again
5 - It works!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 15524: (RMaint followup) Missing Sponsor Attribution
Martin Renvoize [Thu, 9 May 2019 11:44:49 +0000 (12:44 +0100)]
Bug 15524: (RMaint followup) Missing Sponsor Attribution

Sponsored-by: Northeast Kansas Library System, NEKLS (http://nekls.org/)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
5 years agoBug 22357: (RMaint follow-up) Mana does not exist in 18.11.x
Martin Renvoize [Wed, 8 May 2019 18:13:46 +0000 (19:13 +0100)]
Bug 22357: (RMaint follow-up) Mana does not exist in 18.11.x

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