koha.git
4 years agoBug 21662: (RM follow-up) Final followup corrections to history
Martin Renvoize [Thu, 13 Jun 2019 12:08:58 +0000 (13:08 +0100)]
Bug 21662: (RM follow-up) Final followup corrections to history

Minor update to ensure we're using commit dates and not author dates

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 510cf514a342cb9062d1c51cdf1d41b6772ad90a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22633: Link barcodes in hold summary in patron account to moredetail page
Katrin Fischer [Wed, 3 Apr 2019 19:47:09 +0000 (21:47 +0200)]
Bug 22633: Link barcodes in hold summary in patron account to moredetail page

Bug 21070 links the barcode on holds to the item on moredetail.pl.
This patch makes the same change to the hold lists in the staff
patron account.

To test:
- Create some holds, have at least
  - one item level hold
  - one hold waiting for pick-up
- Take a look at the details and checkouts tabs
  in the patron account on staff side
- Verify that the barcodes link to the record detail page
- Apply patch
- Verify the barcodes now link to the moredetail page

Signed-off-by: Axel Amghar <axel.amghar@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 ad9338e419ee04c38f5e7fdc918ce1a4d177cee0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 7890: Highlight required field in MARC editor
Owen Leonard [Tue, 5 Mar 2019 18:56:55 +0000 (18:56 +0000)]
Bug 7890: Highlight required field in MARC editor

This patch modifies the basic MARC editor so that required fields have
the standard "Required" label on them instead of a small red asterisk.

To test, apply the patch and create a new record in the basic MARC
editor. Tags which are marked mandatory in your selected MARC
bibliographic framework should be labeled "Required."

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 93c9b5d553261acda55f1f29f8687c5f4c276e04)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22585: (follow-up) Fix additional occurences
Nick Clemens [Mon, 10 Jun 2019 13:42:18 +0000 (13:42 +0000)]
Bug 22585: (follow-up) Fix additional occurences

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 15dcde21fe9b34d287844aab75426e6387c7b4cf)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22585: remove double-escape for CAS URL
Justin Rittenhouse [Fri, 31 May 2019 16:37:11 +0000 (16:37 +0000)]
Bug 22585: remove double-escape for CAS URL

The return URL that is part of the link to CAS login is double-escaped on the staff login page.

It appears that this is the same issue as bug 21973 but in the staff intranet template.  I have attached an identical patch for the intranet auth.tt file.

Signed-off-by: Nick Clemens <nick@bywatersolutions.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 a3e047f638ac7e6095d56c064f0e6cb8038a8524)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 16750: Redirect from selectbranchprinter.pl to additem.pl causes software error
Kyle M Hall [Thu, 16 Jun 2016 11:08:59 +0000 (11:08 +0000)]
Bug 16750: Redirect from selectbranchprinter.pl to additem.pl causes software error

How to reproduce:
1) Edit and save an item in the items editor
2) You should be redirected back to the items editor, note that the
biblionumber is passed in the url
3) Choose "set library" from the upper right hand pulldown on the page
4) Choose a different library, click submit
5) You should get the error message:
Software error:

Can't call method "fields" on an undefined value at
/home/vagrant/kohaclone/cataloguing/additem.pl line 736.

Test Plan:
1) Apply this patch
2) Follow plan above
3) No software error should occur at step 5

Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.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 7d7c8c12e70295f4dd15a3435235c81539c333f5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 14794: (follow-up) Add tooltip to filter box
Nick Clemens [Mon, 10 Jun 2019 13:34:18 +0000 (13:34 +0000)]
Bug 14794: (follow-up) Add tooltip to filter box

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ac41566cddb737c19282bc577cf31882f168384b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 14794: Display JS tooltip whenever dateofbirth is being searched
Nick Clemens [Fri, 7 Jun 2019 14:53:16 +0000 (14:53 +0000)]
Bug 14794: Display JS tooltip whenever dateofbirth is being searched

This updates the code that adds a tooltip for the correct date format
to display after the initial search

To test:
1 - Do a patron search, choosing date of birth as the search field
2 - Note on choosing that field you get a tooltip defining the format
3 - Do a search
4 - Note tooltip is gone, but date fo birth is still selected as the field to search
5 - Apply patch, reload
6 - Note tooltip shows after initial search and until field is changed

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 07d6e9f142a588f26c52582d9b5d99b714fa1fd7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23095: Correctly display circulation rules (0 vs undef)
Jonathan Druart [Tue, 11 Jun 2019 15:44:25 +0000 (10:44 -0500)]
Bug 23095: Correctly display circulation rules (0 vs undef)

From the following commit:
  commit d1303ca834dd0b08fc1d44476cfbbb8b729b6165
  Bug 18925: (follow-up) Fix null/empty behavior

The global test must have been adjusted as well to catch empty strings.

Actually we are expecting the plugin to return undef but the template variable contains an empty string.

So the test should only be [% IF var != '' %] instead of [% IF var.defined && var != '' %]
but I prefer to keep it as it for now.

Test plan:
In the section "Default checkout, hold policy by patron category"
Set total checkouts = blank
    total on-site checkouts = blank
    total holds = 0
Save
=> Without this patch the line will not appear
=> With this patch applied there must be "unlimited, unlimited, 0"

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3de89b98ce373818c4b6f5a0a90b8786996e6cfe)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23093: (bug 22318 follow-up) Use placeholders in query moving OpacNavRight
Jonathan Druart [Tue, 11 Jun 2019 14:24:28 +0000 (09:24 -0500)]
Bug 23093: (bug 22318 follow-up) Use placeholders in query moving OpacNavRight

Placeholders must be used (!) in all SQL queries.

Test plan:
1/ % git checkout 0c95e22afe13349b60d134217fce6718bfa9727f # commit before bug 22318
2/ Edit the pref OpacNavRight with something with "
  just a " and more '
3/ git checkout master
4/ restart_all
5/ run updatedatabase.pl
=> Boom and the content of the pref has been lost
6/ Repeat 1 to 3
7/ Apply this patch
8/ run updatedatabase.pl
=> The pref has been correctly moved to opac_news

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 18f2074f8df8598527ae8e126c4efc7f3be000e0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23053: [follow-up] Same changes for UNIMARC
Nick Clemens [Wed, 12 Jun 2019 12:39:29 +0000 (12:39 +0000)]
Bug 23053: [follow-up] Same changes for UNIMARC

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit ef0c31f735cf68a3b004c706e274ede4bb883940)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 13094: Make it easy to hide 'Cancel all' button on holds over report
Katrin Fischer [Mon, 11 Mar 2019 08:33:13 +0000 (08:33 +0000)]
Bug 13094: Make it easy to hide 'Cancel all' button on holds over report

This patch makes some small modifications to the 'Holds awaiting pickup'
report:

- Fixes typo sypref
- Fixes 'Home branch' to 'Home library'
- Adds a span to easily hide the cancel all button with CSS

To test:
- Make sure you have a hold appearing on the awaiting pickup list
  second tab: Holds waiting over...
- Verify the 'cancel all' button on top shows
- Verify syspref and Home library changes mentioned above
- Add #holdsover-cancel-all { display:none; } to IntrentUserCSS
- Verify that the button and the text have vanished

Note: If the text doesn't display next to the button, try toggling
      the TransferWhenCancelAllWaitingHolds system preference.

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 39e4c6c5d791853985773e4032357372f77d7587)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 18344: Add unit tests
Kyle M Hall [Mon, 25 Mar 2019 17:55:43 +0000 (13:55 -0400)]
Bug 18344: Add unit tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 60e24be115539daedc4172099eec9cc5dd5bc813)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 18344: Allow overdue fines cap at replacement price, and cap by amount to work...
Kyle M Hall [Tue, 28 Mar 2017 11:05:28 +0000 (11:05 +0000)]
Bug 18344: Allow overdue fines cap at replacement price, and cap by amount to work together

There is no reason that a library shouldn't be able to use the monetary
fines cap and the replacement price cap at the same time. The code is
written in such a way that they already work harmoniously. We have
librarians who wish to use both so they can set a high cap of $10.00 but
also use the replacement price cap so that a $20.00 book would only get
a fine of $10.00, but a $5.00 paperback will only get a fine of $5.00

Test Plan:
1) Apply this patch
2) Create a rule with a fines cap of $10, *and* a cap at replacement price, and a daily fine of $1
3) Create two items, one with a replacement price of $5 and one with a
   replacement price of $15
4) Check out these items to a patron, backdate the checkouts so they are
   already overdue by a couple months
5) Check the items in ( make sure calc fine at checkin is enabled for
    you )
6) Note the one item has a fine of $5 and the other has a fine of $10!

Signed-off-by: David Kuhn <techservspec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e702ff89f77e50b1bcef1cdc1548627957251df0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23053: Add phrase index to authority Local-Number
Nick Clemens [Wed, 5 Jun 2019 13:55:10 +0000 (13:55 +0000)]
Bug 23053: Add phrase index to authority Local-Number

To test:
 1 - Define a matching rule for authorities on field 001 index Local-Number
 2 - In koha-conf.xml raise the zebra_loglevels
     <zebra_loglevels>none,fatal,warn,request,info</zebra_loglevels>
 3 - Export some authorities using the tools->export data
 4 - Import those authorities
 5 - Note no matches found
 6 - View the zebra output log, you should see lots of error 114
 7 - Apply patch
 8 - Copy the indexdefs files to the installed versions
 9 - Reapply matchign rules to staged files
10 - Matches should now be found
11 - Logs should not have errors

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2e8a6a4b097f7ed7bb33efe819693752abba33cb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23076: Include OpacUserJS on OPAC maintenance page
Owen Leonard [Fri, 7 Jun 2019 12:10:01 +0000 (12:10 +0000)]
Bug 23076: Include OpacUserJS on OPAC maintenance page

This patch coverts the syntax for embedding OpacUserJS in the global
include file so that it uses 'Koha.Preference' syntax. This makes the
data available in templates, like the OPAC maintenance page, to which
the preference data has not been explicitly provided.

To reproduce: Add some JavaScript to the OPACUserJS system preference
which will let you know it's working. For instance:

alert("OPACUserJS!");

Turn on the OPAC maintenance message using the OpacMaintenance system
preference. Navigate to the OPAC. You should see the system maintenance
page but you should not see an alert.

To test, apply the patch and reload the OPAC page. Your alert should
show.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: David Nind <david@davidnind.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 82dcb5cf546c881af0003c272d9326e12fb5f1ce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22915: fix Mana URL in etc/koha-conf.xml
Alex Arnaud [Fri, 7 Jun 2019 08:18:05 +0000 (10:18 +0200)]
Bug 22915: fix Mana URL in etc/koha-conf.xml

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8427b684148944b9306fd4786c75c53527037024)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22910: Do not copy unique patron attributes to duplicated patron
Pasi Kallinen [Wed, 29 May 2019 06:20:43 +0000 (09:20 +0300)]
Bug 22910: Do not copy unique patron attributes to duplicated patron

When creating a new patron by duplicating another, all of the patron
attributes are also copied into the form. Some of those value may be
unique, so don't copy those.

1) Create patron attribute types, one with "unique identifier", one without.
2) Create or a patron so it has values in both of those attributes.
3) Duplicate the patron
4) The edit form should retain the values from the "original" patron.
5) Apply patch.
6) Duplicate the patron - this time the attributes with unique values
   are cleared.

Signed-off-by: Pasi Kallinen <pasi.kallinen@koha-suomi.fi>
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 f3358e97c8a1f9edf1c4de6dea46f70366237699)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 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>
4 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>
4 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>
4 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>
4 years agoBug 10215: DBRev 19.05.00.002
Martin Renvoize [Thu, 6 Jun 2019 14:32:14 +0000 (15:32 +0100)]
Bug 10215: DBRev 19.05.00.002

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c3346b50bd00778c2e8364b40a7dd7a891c713b4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 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>
4 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>
4 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>
4 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>
4 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>
4 years agoBug 23027: Make Suggestions.t pass even if no biblio in DB
Jonathan Druart [Fri, 31 May 2019 16:41:22 +0000 (11:41 -0500)]
Bug 23027: Make Suggestions.t pass even if no biblio in DB

There are biblionumbers 1 and 2 hardcoded

Test plan:
MariaDB [koha_kohadev]> delete from biblioitems; delete from items; delete from biblio;
% prove t/db_dependent/Suggestions.t
Must return green with this patch applied

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 e825751cda6a920aa2455908970a3f8e85c1a4e8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22982: (QA follow-up) Add behavior to Koha::Account::Line::apply and unit test
Kyle M Hall [Tue, 28 May 2019 11:54:58 +0000 (07:54 -0400)]
Bug 22982: (QA follow-up) Add behavior to Koha::Account::Line::apply and unit test

Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f417c15e499745a7cd35fd1c8c5ae79888857199)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22982: Add unit tests
Kyle M Hall [Thu, 23 May 2019 18:14:06 +0000 (14:14 -0400)]
Bug 22982: Add unit tests

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 986629b29f8651a99f877444c69dec2838f513d8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22982: Paying lost fee does not always remove lost item from checkouts
Kyle M Hall [Thu, 23 May 2019 15:27:23 +0000 (11:27 -0400)]
Bug 22982: Paying lost fee does not always remove lost item from checkouts

Depending on how a lost fee is paid, it may or may not be removed from the
patrons current checkouts. The current expected behavior is for the lost
item to be removed from the patrons checkouts when the lost fee is paid in
full.

This is due to the subroutine for handling of lost fees being included in
the 'pay specific lines' code but not in the 'pay by amount' code.

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Koha/Account.t

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 20dde4cc4acf35ba9f5edc76c5271198217994e6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 23037: Add Henry Bolshaw to contributors
Martin Renvoize [Mon, 3 Jun 2019 16:32:10 +0000 (17:32 +0100)]
Bug 23037: Add Henry Bolshaw to contributors

We missed Henry from the release notes and about page.. sorry Henry!

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Not really tested, just had a look and checked the changes look sane.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 72d4b10bf4abcfc36a9f3bac263ad182b6512088)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 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>
4 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>
4 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>
4 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>
4 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>
4 years agoBug 22960: DBRev 19.05.00.001
Martin Renvoize [Tue, 4 Jun 2019 09:06:46 +0000 (10:06 +0100)]
Bug 22960: DBRev 19.05.00.001

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4ae854242839ebe9871b65fe0add2241eb4ae0b7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22960: (RM follow-up) Correct a further typo
Martin Renvoize [Tue, 4 Jun 2019 08:48:59 +0000 (09:48 +0100)]
Bug 22960: (RM follow-up) Correct a further typo

"This a list" changed to "This is a list"

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f6f86a79d623ac478e2636e2d0cc2272006fe5f0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22960: (QA follow-up) Fix another tiny typo
Katrin Fischer [Sun, 2 Jun 2019 09:18:00 +0000 (09:18 +0000)]
Bug 22960: (QA follow-up) Fix another tiny typo

This only seems to appear in the .pref file:

...pairs. the => ... pairs. The

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 76a64f8046af820b8be57fbc8d65483259a63f6c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22960: Fix the same typo on db level for existing and new installations
Katrin Fischer [Mon, 27 May 2019 20:34:33 +0000 (20:34 +0000)]
Bug 22960: Fix the same typo on db level for existing and new installations

Seriously trying to kill the typo everywhere:
- Check your DB with a report:
  select * from systempreferences where variable = 'UpdateItemLocationOnCheckin';
- Verify the typo in the explanation column: locaiton
- Apply patch and run database update
- Verify the typo is fixed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2b0347084ce8daa0a11ff4bdfd2e9f8442e65ffb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22960: Typo found in circulation.pref in UpdateItemLocationOnCheckin preference
Owen Leonard [Wed, 22 May 2019 12:23:47 +0000 (12:23 +0000)]
Bug 22960: Typo found in circulation.pref in UpdateItemLocationOnCheckin preference

This patch corrects a typo in circulation.pref in the description of the
UpdateItemLocationOnCheckin preference.

To see the problem, go to Administration -> System preferences ->
Circulation and look at the description for the
UpdateItemLocationOnCheckin preference:

"The special term _BLANK_ may be used on either side of a value pair to
update or remove the location from items with no locaiton assigned."

Note the misspelling "locaiton."

To test, apply the patch and refresh the circulation preferences page.
The typo should be fixed.

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d5520510602c123d1ea8d7dc9a9d874995d200c3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 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>
4 years agoBug 19457: Handle 'PREVISSUE' return by CanBookBeIssued from SIP (CheckPrevCheckout)
Jonathan Druart [Wed, 12 Sep 2018 16:38:39 +0000 (09:38 -0700)]
Bug 19457: Handle 'PREVISSUE' return by CanBookBeIssued from SIP (CheckPrevCheckout)

If CheckPrevCheckout is set to Do, then checkouts are blocked at the SIPServer

To test:
- Do not apply this patch
- Set CheckPrevCheckout to "Do", or "Unless overridden, do"
Verify the SIP server is blocking checkouts with this setting set
- Apply this patch
- Note that the checkout is now allowed, with a screen message telling
the borrower they've issued the item before.

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 b40e58343ef65aabe0a575a0b3f842b5e22a3600)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 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>
4 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>
4 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>
4 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>
4 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>
4 years agoBug 22950: Compiled CSS
Fridolin Somers [Mon, 10 Jun 2019 14:01:28 +0000 (16:01 +0200)]
Bug 22950: Compiled CSS

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 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>
4 years agoBug 22906: Compiled CSS
Fridolin Somers [Mon, 10 Jun 2019 13:50:57 +0000 (15:50 +0200)]
Bug 22906: Compiled CSS

4 years agoBug 22906: Minor corrections to plugins home page
Owen Leonard [Tue, 14 May 2019 13:10:32 +0000 (13:10 +0000)]
Bug 22906: Minor corrections to plugins home page

This patch makes a few minor markup improvements to the plugins home
page and corrects some CSS introduced by Bug 22053 which was having
unintended consequences elsewhere.

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

 - You should have one or more plugins installed.
 - Go to Administration -> Manage plugins.
 - The "badges" for disabled and enabled should look correct.
 - Go to Tools -> Staged MARC management and click on an batch.
   - In the information about the batch, the labels should be bold.

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 e9294c3cc20584adebb6d38451ebccce86a8f1aa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22877: (QA follow-up) Clarify intent of tests and remove one.
Martin Renvoize [Thu, 9 May 2019 15:34:09 +0000 (16:34 +0100)]
Bug 22877: (QA follow-up) Clarify intent of tests and remove one.

This patch embelishes the existing comments slightly and removes a test
which had a FIXME, but was in fact just a duplicate of the test directly
above it.  I beleive it became a duplicate after the subroutine signature
changed at some point recently.  I also move the bug 22877 specific test
into a subtest.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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 fa411c2f80d3464c9205f49fc31de492bc265c57)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22877: (follow-up) Fix test plan count
Martin Renvoize [Thu, 9 May 2019 15:00:59 +0000 (16:00 +0100)]
Bug 22877: (follow-up) Fix test plan count

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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 55289562468f77e6f6a2c1671d8a3ec472a50f99)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22877: Prevent double overdue processing for lost and returned
Martin Renvoize [Thu, 9 May 2019 14:53:56 +0000 (15:53 +0100)]
Bug 22877: Prevent double overdue processing for lost and returned

Test plan:
1 - Issue an item to a patron with a backdated due date
2 - Run fines.pl - note you generate a fine for the patron
3 - Run longoverdue.pl - make sure MarkLostItemsAsReturned is turned off
and to charge
4 - Confirm the patron has a lost fee and an overdue
5 - Return the item
6 - With patch applied, patron should now have 1 overdue fine and 1 lost fine

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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 d1b6e320860060ffe35e7df7f3df1b8c10517a73)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 22877: Unit test to highlight problem
Nick Clemens [Thu, 9 May 2019 12:32:38 +0000 (12:32 +0000)]
Bug 22877: Unit test to highlight problem

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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 01c4ee5703af156e2bb2057da83e156f9090be40)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
4 years agoBug 17108- Automatic debian/control updates (stable/19.05.x)
Nightly Build Bot [Tue, 4 Jun 2019 12:44:58 +0000 (14:44 +0200)]
Bug 17108- Automatic debian/control updates (stable/19.05.x)

4 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>
4 years agoUpdate release notes for the 19.05.00 release v19.05.00
Nick Clemens [Thu, 30 May 2019 15:29:07 +0000 (15:29 +0000)]
Update release notes for the 19.05.00 release

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 years agoIncrement version for 19.05.00 release
Nick Clemens [Thu, 30 May 2019 13:42:23 +0000 (13:42 +0000)]
Increment version for 19.05.00 release

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 years agoTranslation updates for Koha 19.05.00
Koha translators [Thu, 30 May 2019 13:28:33 +0000 (10:28 -0300)]
Translation updates for Koha 19.05.00

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 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>
4 years agoBug 22981: Remove type attribute from script tags: Catalog
Owen Leonard [Thu, 23 May 2019 18:35:31 +0000 (18:35 +0000)]
Bug 22981: Remove type attribute from script tags: Catalog

This patch removes the "type" attribute from <script> tags in several
catalog-related templates.

To test, apply the patch and confirm that the following work properly
without any JavaScript errors in the browser console:

 - Catalog -> Advanced search
 - Catalog -> Item search
 - Search history

Validating the HTML source of these pages should return no errors
related to the "type" attribute.

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>
4 years agoBug 22979: Remove type attribute from script tags: Authorities
Owen Leonard [Thu, 23 May 2019 15:54:07 +0000 (15:54 +0000)]
Bug 22979: Remove type attribute from script tags: Authorities

This patch removes the "type" attribute from <script> tags in several
authorities templates. Also removed: Obsolete "//<![CDATA[ //]]>"
markers.

To test, apply the patch and confirm that examples of affected pages
work properly without any JavaScript errors in the browser console:

 - Authorities -> Search -> View authority record
 - Authorities -> Search -> Edit authority record
 - Cataloging -> New record
   - Trigger the authority search form by clicking the plugin link next
     to a tag which has been linked to an authority type (e.g. 100a ->
     Personal name).
   - Search for an authority record.
   - Select an authority record.

Validating the HTML source of any of these pages should return no errors
related to the "type" attribute.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
https://bugs.koha-community.org/show_bug.cgi?id=22797

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 years agoBug 22975: Remove type attribute from script tags: Acquisitions
Owen Leonard [Thu, 23 May 2019 13:50:07 +0000 (13:50 +0000)]
Bug 22975: Remove type attribute from script tags: Acquisitions

This patch removes the "type" attribute from <script> tags in several
acquisitions templates. Also removed: Obsolete "//<![CDATA[ //]]>"
markers.

This patch also makes minor indentation changes, so diff using the "-w"
flag.

To test, apply the patch and confirm that examples of affected pages
work properly without any JavaScript errors in the browser console:

 - Acquisitions -> Vendors -> Vendor -> Basket groups
 - Acquisitions -> Vendors -> Vendor -> Receive shipments
 - Acquisitions -> Vendors -> Vendor -> Basket:
   In the table of orders, click "Transfer." Transfer an order

Validating the HTML source of any of these pages should return no errors
related to the "type" attribute.

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>
4 years agoBug 22973: Remove type attribute from script tags: Staff client includes 2/2
Owen Leonard [Thu, 23 May 2019 12:37:45 +0000 (12:37 +0000)]
Bug 22973: Remove type attribute from script tags: Staff client includes 2/2

This patch removes the "type" attribute from <script> tags in several
staff client include files. Also removed: Obsolete "//<![CDATA[ //]]>"
markers.

This patch also makes minor indentation changes, so diff using the "-w"
flag.

To test, apply the patch and confirm that examples of affected pages
work properly without any JavaScript errors in the browser console:

 - Installer -> Onboarding (uses installer-strings.inc,
   validator-strings.inc)
 - Patrons -> Patron details -> Change password (uses
   password_check.inc)
 - Patrons -> Patron details -> Print summary (slip-print.inc)
 - Circulation -> Check out (strings.inc, timepicker.inc)
 - Cataloging -> New from Z39.50/SRU (z3950_search.inc)

Validating the HTML source of any of these pages should return no errors
related to the "type" attribute.

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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 years agoBug 22974: Patron password update validation broken
Owen Leonard [Thu, 23 May 2019 13:29:26 +0000 (13:29 +0000)]
Bug 22974: Patron password update validation broken

This patch adds back an include file to the change password template
which was inadvertently removed by Bug 21964. This broke Javascript
validation of the new password fields.

To test, apply the patch and enable the RequireStrongPassword system
preference.

 - Go to Patrons -> Patron details -> Change password.
 - Try entering a weak password in the "New password" field. You should
   get a validation error: "Password must contain at least 3 characters,
   including UPPERCASE, lowercase and numbers."
 - Try entering a password in the second password field which doesn't
   match the first. You should get a validation error: "Please enter the
   same password as above."

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 years agoBug 21662: (QA follow-up) Use commitdates over RM dates
Martin Renvoize [Fri, 17 May 2019 13:00:32 +0000 (14:00 +0100)]
Bug 21662: (QA follow-up) Use commitdates over RM dates

The manual maintanence of the history.txt file lead to some
discrepancies in first commit dates for many contributors. After a
discussion regarding the automation proccess (and with some of the
contributors who would be most heavily affected) we decided to update
the history file on mass to match the commite dates found in the
repository.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 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>
4 years agoBug 20436: (RM follow-up) Use Koha objects instead of mysql
Nick Clemens [Wed, 22 May 2019 14:26:41 +0000 (14:26 +0000)]
Bug 20436: (RM follow-up) Use Koha objects instead of mysql

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 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>
4 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>
4 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>
4 years agoBug 22802: Check item funds, order funds, and default funds when ordering from a...
Nick Clemens [Tue, 14 May 2019 13:17:34 +0000 (13:17 +0000)]
Bug 22802: Check item funds, order funds, and default funds when ordering from a file

This patch tries to centralise the logic of order funds requirements into a single routine.
If propogates defaults down into items/order as necessary, it also prevents unsetting lower values if
a default is set.

To test:
1 - Populate 'MarcItemFieldsToOrder'
2 - Add to a basket from a file
3 - Use a file containing some item records with funds defined or not
4 - Confirm if all items have funds defined, you can order
5 - Confirm that setting the default for an order populates items and you can order
6 - Confirm that setting the default for all orders populates items if present/ order if not
7 - Confirm that if defaults are set the lower levels cannot be unset
8 - Try various settings and confirm all work as expected

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>
4 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>
4 years agoBug 22962: Punctuation error in RisExportAdditionalFields
Chris Cormack [Wed, 22 May 2019 13:32:14 +0000 (13:32 +0000)]
Bug 22962: Punctuation error in RisExportAdditionalFields

To test
1/ Go to systempreferences search for RisExportAdditionalFields
2/ See the extra , on the first line
3/ Apply the patch
4/ See it is fixed

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 years agoBug 22746: Fix typos in add mana comment modals again
Josef Moravec [Tue, 23 Apr 2019 10:37:10 +0000 (10:37 +0000)]
Bug 22746: Fix typos in add mana comment modals again

Test plan:
1) Create subscription from Mana
2) On subscription detail page: report mistake > other a modal is shown
it should be exactly 'Please enter a new commment (max 35 characters)'
3) The same in mana search results and in reports

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>