Nick Clemens [Tue, 10 Jan 2017 17:16:38 +0000 (17:16 +0000)]
Bug 17831: Remove non-existig bibliosubject.subject mapping from frameworks
This patch removes the assignment of non-existent koha field
'bibliosubject.subject' to MARC subject fields in the installer data
for koha
To test:
You'll want a new fresh db
1 - Apply patch
2 - Run websintaller
3 - Ensure that thigns go smoothly
4 - Add/delete/edit some records and ensure that things are working with
the installed frameworks
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit b6068eebd6ac0a3610e1162829ae03eaf25994d1)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Wed, 4 Dec 2019 14:44:53 +0000 (15:44 +0100)]
Bug 24170: Fix sysprefs search result order
The same sysprefs search will not always return the results in the same
order.
If you search for 'd' in the "search system preferences" box
/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=d
you will see that the modules are not ordered consistently.
This patch makes them display alphabetically
Test plan:
Search the same string several times in the syspref list.
The search result should always be ordered the same way
Signed-off-by: cori <corilynn.arnold@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 960b4491cbb159f44352da9e936d7aa03b666b24)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Mon, 11 Nov 2019 09:14:14 +0000 (10:14 +0100)]
Bug 23785: Fix call get_coins on undef value in opac-search.pl
If the search engine index returns a record that is no longer in the DB,
an OPAC search will explode with:
Can't call method "get_coins" on an undefined value at
/usr/share/koha/opac/cgi-bin/opac/opac-search.pl line 692.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 8073350819ea0fa73e3492e62b52575fecaecc3e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle M Hall [Mon, 25 Nov 2019 18:18:16 +0000 (13:18 -0500)]
Bug 24106: In returns.pl, don't search for item if no barcode is provided
When loading returns.pl, code to check rotating collections fires off an search for items by barcode, but doesn't check for a barcode first. This means the code will search for items where barcode is NULL, which is definitely not the intended function.
Test Plan:
1) Apply this patch
2) Set up a rotating collection with items
3) Transfer the collection
4) Check in a rotating collection item
5) Note no change in functionality
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit bf793c3fe0e9007e81d0258ac26a70c38aa02978)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Mon, 2 Dec 2019 15:14:33 +0000 (15:14 +0000)]
Bug 24124: Fix authorities selection in batch deletion tool in Chrome
This patch adds some inline CSS to force clearing on some elements in
the forms for batch record modification and deletion. The problem with
selecting the "Authorities" radio button stemmed from the fact that
non-clearing floats caused elements to invisibly overlap in the form.
To test, apply the patch and test both batch record modification and
batch record deletion. Upon selecting the "Authorities" radio button in
each case the "Select a list of records" tab should disappear. Selecting
the "Biblios" option should re-display the tab.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 6f102abcb1878f39a03d72141c512cb84602aaa7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Tue, 3 Dec 2019 19:54:07 +0000 (19:54 +0000)]
Bug 24164: Unit test
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit cb1db1ddb11cadc9dc39ec9440fb1b27a66d6835)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Tue, 3 Dec 2019 19:55:19 +0000 (19:55 +0000)]
Bug 24164: Copy the letter for each email
To test:
1 - Set or have two patrons with emails - note thier borrowernumber for the report
2 - Create a report - note the report id ($REPORT_ID)
SELECT borrowernumber, surname, firstname, email FROM borrowers WHERE borrowernumber IN (##,##);
3 - Create a notice in circulation with code TESTEMAIL
4 - The content should be "[% surname %]"
5 - perl misc/cronjobs/patron_emailer.pl --report $REPORT_ID --notice TESTEMAIL --module circulation --from anyone@anywhere.com --verbose
6 - Note that the emails both have the same surname
7 - Apply patch
8 - Repeat 5
9 - Emails now have correct content
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit bb110db48dee3a7eddcaea743e48e6da49d86e9c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Fri, 29 Nov 2019 13:45:25 +0000 (14:45 +0100)]
Bug 24138: Fix calculation of suspension days when a limit is set
If there is a limit for the number of suspension days
(maxsuspensiondays), the calculation is wrong. We are reducing the
number of days before taking into account the suspension charging
interval.
For instance, a checkin is 1 year late and the circ rules are defined to
charge 7 days every 15 days.
It results in 365 * 7 / 15 days of suspension => 170 days
Before this patch the calculation was:
365 * 7 limited to 333, 333 / 15 => 22 days
Test plan:
Given the examples in the commit messages and the description of the bug
report, setup complex circulation rules and confirm that the debarment
dates are calculated correctly
Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 17eabbf4bf4b48f0ff938f3ac05bcbe40f5970d2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Fri, 29 Nov 2019 12:55:27 +0000 (13:55 +0100)]
Bug 24138: Move the calculation out of the sub
No changes expected here. For the next patch we are going to need to add
test and calculate the new debarment date. To ease the writing of these
tests the calculation is moved out of the existing subroutine.
Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 1bf0904d2817c250ec7ef70667c7631e4f24d12f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Mon, 25 Nov 2019 12:35:25 +0000 (13:35 +0100)]
Bug 23970: Make search with "Publication date" field work at any position
The changes made in the following commit:
commit 0d2e83bca5b91376e9262b6cb0b993f09b919018
Bug 14636: Item search - fix search and sort by publication date for MARC21
was put at the wrong place. It was inside a "if $i == 1" test that
impacts the first field only.
Test plan:
0/ Use a MARC21 installation
1/ Search items by publication date, use twice the field using different
values.
For instance:
publication date: 2005 OR
publication date: 2006
=> Without this patch you only get results for 2005
=> With this patch applied you get results for both years.
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c589da3c2931bbe0cc1c4f31899b71044c860082)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Wed, 27 Nov 2019 11:26:45 +0000 (11:26 +0000)]
Bug 24128: Add alias for biblionumber search
To test:
1 - In staff or OPAC using ES, search for "biblionumber:3" or any existing biblionumber
2 - No results
3 - Apply patch, restart all the things
4 - Search again
5 - You go to the biblionumber
Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 588f67a26da3c649e6ef966004b76e0c46fa2431)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 23246: (follow-up) Hardcoding tab position is not enough
There are many conditions that determine the tab number for 'media'.
Translated into variables that hold the tabs count on each condition, it
is clear that '3' was not good enough:
[%- holdings = (SeparateHoldings) ? 2 : 1
notes = (MARCNOTES || notes) ? 1 : 0
acq = (Koha.Preference('AcquisitionDetails')) ? 1 : 0
frbr = (FRBRizeEditions && XISBNS) ? 1 : 0
local_covers = (LocalCoverImages && (localimages || CAN_user_tools_upload_local_cover_images)) ? 1 : 0
media_tab = holdings + notes + acq + frbr + local_covers
-%]
This patch gets rid of the hardcoded value, adds an id to the 'media'
tab (i.e. 'media_tab') and uses JS to get the right index.
To test:
- Play with the different options governing those variables
=> FAIL: 3 is not always the 'media' tab
- Apply this patch
- Repeat your tests
=> SUCCESS: It always picks the 'media' tab
- Sign off :-D
Sponsored-by: American Numismatics Society Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 0e21de15d61999183ea17624465ab0bc1a6c867e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 23246: Only jump into the 'images' tab HTML5MediaEnabled is set
This patch makes jumping into the third tab happen only if
HTML5MediaEnabled is set to 'both' or 'staff'.
To test:
- Have HTML5MediaEnabled set to 'opac' or 'not at all'
- Open the detail page of a record with no holdings
=> FAIL: The 'images' tab is selected
- Apply this patch
- Reload
=> SUCCESS: The 'holdings' tab is selected as it should be.
- Sign off :-D
Sponsored-by: America Numismatic Society Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 7a9d8937f753685471dfde7a62c5871062d41a11)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Wed, 20 Nov 2019 09:56:24 +0000 (10:56 +0100)]
Bug 23987: "return to cataloguing" if the record is deleted from bachMod-del
If a bibliographic record is deleted after having deleted all their items in a batch,
we should not display a "return to the record" button but "return to cataloguing" instead
Test plan:
1 - Have/make a bib with items
2 - On details page select Edit->Delete items in a batch
3 - Select all items and check "Delete record if no items remain"
4 - Delete the things
5 - On confirmation screen you have a count of items/bibs deleted
=> Without the patch there is a 'Return to record' button that leads to nowhere
=> With this patch there is a "Return to cataloging module" button
6 - Repeat using the "Delete selected items" link on top of the items table
=> Without the patch there is a 'Return to where you were' button that leads to nowhere
=> With this patch there is a "Return to cataloging module" button
Note that there is a link AND a button, coming from
commit 928c0af2b6a2c7aa6ed54019c5bd7dbddbccf4ee
Bug 15824 - 'Done' button is unclear on batch item modification and deletion
I do not think it makes sense to have both.
Signed-off-by: George Williams <george@nekls.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 7c5a0759acf5f5a5a51e54f69d65067b6f22a0c5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Wed, 20 Nov 2019 09:53:32 +0000 (10:53 +0100)]
Bug 23987: Use src=CATALOGUING for edition/deletion in batch from items table
There are 2 ways to land in batchMod from the detail page of a bib
record: from the Edit menu, and the action buttons on top of the items
table.
We want the same behavior for both and so use src=CATALOGUING
It will make batchMod to behave identically for the "return" button
Signed-off-by: George Williams <george@nekls.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 54e114833260055cd2b0131bc0548f80a5d7ff29)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Wed, 4 Dec 2019 15:04:45 +0000 (16:04 +0100)]
Bug 24168: (bug 23116 follow-up) AllowHoldPolicyOverride allows a librarian to almost place a hold on an item already on hold
This patch actually fixes the issue described on bug 23116.
Test plan:
See bug 23116 and comment 5. Important to note that the later comparison with
itemAlreadyOnHold assumes that the variable is a string.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit c5336e24eb24c0faa7d28faa96bd40b13ccf834c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Martin Renvoize [Fri, 29 Nov 2019 10:49:37 +0000 (10:49 +0000)]
Bug 24136: Update sponsors for 19.11 cycle
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: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 98b3ae9f41f40a1230dbcc184404efda2d25980e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick [Thu, 10 Oct 2019 16:06:08 +0000 (16:06 +0000)]
Bug 23089: Fix sorting on sum and regular fields
As of bug 20589 we no longer analyze sort fields and so we no longer need to append ".phrase"
to our sort in searches.
Additionally, sort fields based on 'sum' should also use sum in building the value to sort on
To test:
0 - Be using ES
1 - Find the most circulated item in your collection
2 - Search for '*'
3 - Sort by popularity DESC
4 - Note that item is not first
5 - Try to sort by anything but relevancy, it fails
6 - Apply patch
7 - Redo searches and sorts
8 - Things should now work as expected
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 6a2ba8b6b23f482dcf8bbe53668d93519a11edf5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Ere Maijala [Thu, 24 Oct 2019 10:35:52 +0000 (13:35 +0300)]
Bug 23089: Fix QueryBuilder tests.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cce9d03bf911a2279a62e742f48fbe56be91e021)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Thu, 7 Nov 2019 12:34:31 +0000 (13:34 +0100)]
Bug 23427: Simplify sort logic
This is the usual syntax.
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 119347c76e5acc262380cc22b13684cca5a19e8d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Fridolin Somers [Mon, 5 Aug 2019 13:25:02 +0000 (15:25 +0200)]
Bug 23427: Better sorting of previous checkouts
In patron circulation or details page, previous checkouts are displayed sorted by due date.
Many checkouts may have same due date so it would be better to sort on timestamp as second sort criteria, like todays's checkouts.
Test plan :
1) Create for a patron two issues with same due date and a few seconds between them
2) Create another issue with a different due date
3) Come back a day later
4) Set preference previousIssuesDefaultSortOrder = "latest to earliest"
5) Go to patron circulation page and check sort order is OK : sorted by "Due date" then "Cheked out on"
6) Go to patron details page and check sort order is OK : sorted by "Due date" then "Cheked out on"
7) Set preference previousIssuesDefaultSortOrder = "earliest to latest"
8) Go to patron circulation page and check sort order is OK : sorted by "Due date" then "Cheked out on"
9) Go to patron details page and check sort order is OK : sorted by "Due date" then "Cheked out on"
Signed-off-by: Michal Denar <black23@gmail.com> 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 b4a6d79e4dbd6de90d453140f696cf8ba75a2159)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Fridolin Somers [Mon, 5 Aug 2019 13:11:49 +0000 (15:11 +0200)]
Bug 23427: Fix previous checkouts sort order
In patron circulation or details page, previous checkouts are displayed sorted by due date.
Actual sort order is not honoring system preference "previousIssuesDefaultSortOrder". Todays's checkouts is correct thanks to Bug 13908.
Patch adds comments that refer to the text of system preferences "previousIssuesDefaultSortOrder" and "TodayIssuesDefaultSortOrder" :
latest to earliest = asc
earliest to latest = desc
Test plan :
1) Create for a patron two old issues with a few days between them
2) Set preference previousIssuesDefaultSortOrder = "latest to earliest"
3) Go to patron circulation page and check sort order is OK
4) Go to patron details page and check sort order is OK
5) Set preference previousIssuesDefaultSortOrder = "earliest to latest"
6) Go to patron circulation page and check sort order is OK
7) Go to patron details page and check sort order is OK
Signed-off-by: Michal Denar <black23@gmail.com> 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 6b2d1093155c07e43522b0f926742698598d09ea)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Tue, 10 Dec 2019 10:22:59 +0000 (11:22 +0100)]
Bug 24199: (bug 23042 follow-up) Prevent t/Auth_with_shibboleth.t to fail randomly
CGI->url_param does not always return the parameters in the same order.
Test plan:
0/ Recreate the random failure, does not apply the patch and run
t/Auth_with_shibboleth.t several times.
You will notice that it fails inconsistenly
1/ Apply the patch and confirm that it now passes 100% of the time
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 569a098f7df62a00c42a924b3444230bb047b874)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Magnus Enger [Wed, 20 Nov 2019 14:15:15 +0000 (15:15 +0100)]
Bug 24072: Typos in advance_notices.pl causes DUEDGST not to be sent
There are two typos in advance_notics.pl that cause DUEDGST messages
not to be sent. See Bugzilla for full details.
If you think the typo is sufficiently obvious, you can just eyeball the
patch and sign off, methinks. Otherwise, testing can be done something
like this:
- Make sure you have enabled enhanced messaging preferences, and a
patron with "Email" and "Digests only" set for "Item due" messages
- Issue an item to this patron, with due date today
- Run something like this to generate advance notices:
$ sudo koha-shell -c "perl \
/home/vagrant/kohaclone/misc/cronjobs/advance_notices.pl -n -c" kohadev
- See that no notices are shown (-n means messages will go to stdout,
instead of into the message queue).
- Apply the patch and run advance_notices.pl again, as before. A DUEDGST
message should now be displayed.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 1f3a9722e4f8d32c7a839137252fc935ad599f74)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Magnus Enger [Mon, 18 Nov 2019 20:41:45 +0000 (21:41 +0100)]
Bug 24064: DUEDGST typoed as DUEGST
Bug 20478 introduced a typo where the letter code DUEDGST was changed
to DUEGST. This patch fixes it.
To test:
- Run "grep -r DUEDGST *" on the Koha git repo. Notice that this letter
code is used in e.g. sample notices.
- Run "grep -r DUEGST *" and notice that this code only occurs twice,
in misc/cronjobs/advance_notices.pl.
- Aply this patch.
- Run "grep -r DUEGST *" again, and notice there are no more occurences
of this typo.
Signed-off-by: David Nind <david@davidnind.com> 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 5df9c63eea6ecbd75079dbd62759db01927548dd)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Tue, 30 Jul 2019 15:20:27 +0000 (15:20 +0000)]
Bug 23389: Add 'All' option to report dropdowns
This patch optionally adds an 'all' option to report dropdowns
Note you will need to use 'LIKE' instead of '=' to allow 'All' to work
To test:
1 - Write a report:
SELECT branchname FROM branches WHERE branchcode LIKE <<Branch|branches>>
2 - Run it
3 - Select a branch
4 - You get one branch info
5 - Note you cannot select all
6 - Apply patch
7 - Run report
8 - No change
9 - Update report like:
SELECT branchname FROM branches WHERE branchcode LIKE <<Branch|branches:all>>
10 - Run report
11 - Select 'All'
12 - You get all branches
13 - Select one branch
14 - You get one branch
15 - Test with other authorised categories (itemtypes, YES_NO, etc.)
16 - Confirm it works as expected
17 - Prove -v t/db_dependent/Reports/Guided.t
Signed-off-by: Lisette Scheer <lisetteslatah@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 7c97f5263d474adc11688b9b7773c5b8705d10d3)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Mon, 2 Dec 2019 16:50:40 +0000 (17:50 +0100)]
Bug 24145: (bug 22543 follow-up) Fix Auth.t
Auth.t is failing because of: 1. recent changes from bug 22543 and 2. wrong mocked CGI->param in tests
Without this patch we hit the exit statement that breaks the tests with the following error:
t/db_dependent/Auth.t .. 1/22 Un-mocked method 'url()' called at /kohadevbox/koha/C4/Auth.pm line 1223.
Un-mocked method 'redirect()' called at /kohadevbox/koha/C4/Auth.pm line 1227.
A context appears to have been destroyed without first calling release().
Based on $@ it does not look like an exception was thrown (this is not always
a reliable test)
This is a problem because the global error variables ($!, $@, and $?) will
not be restored. In addition some release callbacks will not work properly from
inside a DESTROY method.
Here are the context creation details, just in case a tool forgot to call
release():
File: t/db_dependent/Auth.t
Line: 74
Tool: Test::More::subtest
Cleaning up the CONTEXT stack...
# Looks like you planned 22 tests but ran 1.
t/db_dependent/Auth.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 21/22 subtests
Test Summary Report
-------------------
t/db_dependent/Auth.t (Wstat: 65280 Tests: 1 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 22 tests but ran 1.
Files=1, Tests=1, 2 wallclock secs ( 0.02 usr 0.00 sys + 1.54 cusr 0.24 csys = 1.80 CPU)
Result: FAIL
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 678b4bf4642852aba0d11af0ba826164ffdfd012)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 23836 changes the behavior for tracklinks.pl but did not adjust the
tests.
We must then expect 404 if the pref is turned off.
Also mock_preference cannot work (we are hitting the web server and so
need to set the value in DB and flush the L1 caches)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 9cade9186d6234e3ed816e5ab8c32b1060e03341)
Katrin Fischer [Sat, 2 Nov 2019 06:54:31 +0000 (06:54 +0000)]
Bug 21939: Fix permissions for holds history tab
The tab will show when the staff user has edit_borrowers
permission, but the page itself will not be accessible.
This patch fixes the page permissions to allow access
with the edit_borrowers permission as suggested by the
comments on the original bug report.
To test:
- Create a staff user with only "edit_borrowers" permission
from the borrowers module
- Try to access the holds history tab from any patron account
- Verify you are blocked
- Apply patch
- Try again and verify the page is accessible now
- Repeat with superlibrarian and full borrowers permission.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org> 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 cd3ef03e76e1441675c90135c42d033bf99f73cd)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Lucas Gass [Tue, 29 Oct 2019 17:40:47 +0000 (17:40 +0000)]
Bug 23506: Display correct icon in staff client and OPAC
When the leader6 is set to 'i' the MARC21slim2intranetDetail.xsl
attempts to display 'SO.png' which does not exist.
TEST PLAN:
1. Find or create a record with an 'i' as the 6th position in the 000 leader.
2. Do to the OPAC detail page and staff detail for an item in that record.
3. Notice the material type icon does not display because SO.png does not exist.
4. Apply patch and restart_all
5. Look at the opac detail and staff detail page again after clearning the browser cache.
6. The material type icon now displays (MU.png), this is the same icon used on the OPAC results page.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b53e068651c521a989bd13387cef7fef8975d1e7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Sat, 2 Nov 2019 11:30:58 +0000 (12:30 +0100)]
Bug 23751: Make staffaccess permission description more precise
The permission description was missing 'username' from the description.
To test:
- Look at the permissions of a patron
- Verify the staffaccess permission is labelled:
Allow staff members to modify permissions and passwords for other staff members
- Apply patch
- Check description again:
Allow staff members to modify permissions, usernames, and passwords for other staff members
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> 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 0b6fbc138f2ac93cf42ee9c6346bdc67f7268489)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Sat, 2 Nov 2019 01:58:00 +0000 (01:58 +0000)]
Bug 23952: Fix body tag on OPAC course details page
The id was not changed, when the page was added and
remained opac-main. The patch changes it to
opac-course-details so the page has its own unique id.
To test:
- Add a course reserve to your installation
- Go to the course reserves page in the OPAC
- Click on the course to see its details
- Look at the source code, the <body> tag should show:
Without patch: opac-main
with patch applied: opac-course-details
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> 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 ccf9eaf62fc05abe318fe4652025ac3979c50c19)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Owen Leonard [Tue, 8 Oct 2019 17:11:17 +0000 (17:11 +0000)]
Bug 13749: On loading holds in patron account 'processing' is not translatable
This patch updates the DataTables configuration for two tables: The
checkouts and holds lists shown on the checkout and patron details
screen.
The tables lacked the standard application of a custom set of
defaults defined in js/datatables.js. It is in this file that custom
language strings are defined for DataTable interface elements, pulling
in the translated values from datatables.inc.
Without our custom defaults applied, DataTables used its own defaults,
which are not translated.
To test, apply the patch and check out to a patron who has both
checkouts and holds. The more the better to give you more time to
observer the loading state of the tables.
- Checkouts: This table doesn't exhibit any visible problems because
page-specific text is defined for the table's "Loading" message.
However, it still makes sense to apply the defaults to the table for
consistency's sake. There should be no visible changes to the table.
- Holds: From the checkout or patron details page click the "Holds"
tab. While the table loads there should be a "Processing" message. If
you switch to another translation the message should appear in that
language.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.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 9af572c7969f5372853d238ee35f530e4e9fc9f6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Jonathan Druart [Thu, 7 Nov 2019 10:48:59 +0000 (11:48 +0100)]
Bug 23768: Adjust the test for invalid ISBN
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 342baeecbb37bc39245c5df5dccfb983f7f84e0f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Mon, 7 Oct 2019 17:46:30 +0000 (17:46 +0000)]
Bug 23768: Return invalid ISBN when searching with variations
To test:
1 - Enable SearchWithISBNVariations and IntranetCatalogSearchPulldown
2 - Refresh page and click on 'Search the catalog' tab
3 - Search for 'ISBN' 0385299209
4 - Note no results
5 - Note the search says if searched 'kw,wrdl: (nb=)'
6 - Apply patch, restart all the things
7 - Repeat search
8 - Search looks correctly formed
9 - Add the isbn above to a record, confirm it is returned by search
10 - Confirm searches for valid ISBNs still work as expected
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.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 050f43f73c4857b26996e15e3d8b8ad536b32763)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Bug 13958: Use SuspensionsCalendar syspref for more granularity
This patch makes the calculation of suspension expiration configuration
detached from the finesCalendar syspref. This way libraries have more
flexibility when setting circ rules.
I wrote this path as a bugfix, because the recent change pushed by bug 19204
changed this behavior and libraries have been complaining since they got
upgraded.
It is a minor change, just adding the new syspref, and replacing the
single place in which it is used for debarment calculation for the new
one.
The tests are updated similarly, just adding the new mocked syspref as
it was with the old one.
To test:
- Apply this patches
- updatedatabase
- Run:
$ kshell
k$ prove t/db_dependent/Circulation.t
=> SUCCESS: Tests pass!
- Sign off :-D
Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f59a34a9ca80c54159b976c6fb658a85dc3eef79)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Mon, 14 Oct 2019 20:28:45 +0000 (22:28 +0200)]
Bug 22677: Include hint to OAI page path on OAI-PMH preference
This copies the way we are doing it for othe rprefs (ILSDI and similar)
and adds a hint to the description to make it easier to find the
right path for the OAI server.
To test:
- Apply patch
- Verify that the system preference for OAI-PMH includes
now a hint to: /cgi-bin/koha/oai.pl?verb=Identify
- Verify the hint is correct (add OPAC base URL)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 626811814c3ab8b363d2c181e148910205e560f9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Katrin Fischer [Sun, 3 Nov 2019 22:48:04 +0000 (22:48 +0000)]
Bug 23483: Show the description, not the patron's title when writing off an individual fine/fee
When writing off an individual fine, the description shown
was the patron's title, instead of the fine description.
Fixing it by changing it to the same template variable used for
paying individuals so they match up.
To test:
- Pick a patron and make sure salutation is set (Mr, Mrs, ...)
- Create a manual fine
- For the fine, compare the description shown when using the Writeoff
and Pay buttons next to the fine
- Verify the display is different and writeoff displays the salutation
- Apply patch
- Repeat, descriptions now should match up
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 89931b4bb02d6ca1796ece2647fc6104382c0b7d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Tue, 26 Nov 2019 14:12:01 +0000 (14:12 +0000)]
Bug 24120: (follow-up) input_name too
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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 04fab26ccc25d70a3b94b3bd2ceea22752b8714e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Nick Clemens [Tue, 26 Nov 2019 13:19:28 +0000 (13:19 +0000)]
Bug 24120: URI filter search terms in sort dropdowns
To test:
1 - Search for C++
2 - Sort your results
3 - Note search is now for "C "
4 - Apply patch
5 - Search for C++
6 - Reorder results
7 - Still searching for C++
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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 59ea9b3cc27c27d16880fc238f4a173a9e38b479)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Kyle M Hall [Thu, 21 Nov 2019 11:34:11 +0000 (06:34 -0500)]
Bug 24075: Unit tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1ca7b6c40cfc78bbeaf0c9d5bebeeb2e3b5ce611) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Fri, 22 Nov 2019 12:31:09 +0000 (12:31 +0000)]
Bug 24075: Backdating a return to the exact due date and time results in the fine not being refunded
When you use the date picker or book drop mode and check in an item that is due on that date, a fine is assessed and not refunded.
For example: item 12345 is due on 11/19/2109 23:59. On 11/20/2019 I check the item in using date picker/book drop setting the check in date to 11/19/2019 23:59, the patron is charged a fine, and the fine is not cleared as would be expected, since the item is being checked in before it is overdue.
Test Plan:
1) Back date a checkout so it is overdue
2) Run fines.pl to generate the fine
3) Return the item, backdating to the same date/time is was due
4) Note the fine was not removed
5) Apply this patch
6) Repeat steps 1-3
7) Fine should be zeroed out now!
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 39cc13d070e1613b4a903ec5e0e2513ebd561285) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 19 Jun 2019 17:12:15 +0000 (12:12 -0500)]
Bug 23042: Correct shib param escaping
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 13 Jun 2019 16:02:33 +0000 (17:02 +0100)]
Bug 23042: Only include GET params in return URL for Shibboleth
The shibboleth return target included POST parameters in the URL string,
this meant that a failed local login POST would include the username and
password used in the attemtped login in plaintext in the redirect URL
that is appended to the shibboleth login URL.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Wed, 19 Jun 2019 09:56:30 +0000 (10:56 +0100)]
Bug 23042: Add tests to catch POST params in return URL
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 30 Oct 2019 12:15:38 +0000 (13:15 +0100)]
Bug 23836: exit after output_error
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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick [Thu, 17 Oct 2019 15:26:18 +0000 (15:26 +0000)]
Bug 23836: Don't forward form tracklinks if not tracking
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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 15 Aug 2019 07:54:59 +0000 (08:54 +0100)]
Bug 23329: (RM follow-up) Restore DB after test
Test plan:
1) Dump your DB before the tests is run
2) Run the test
3) Dumper your DB again and compare to the first dump
Success if there are no differences (other than the timestamp of the
dump)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 14 Aug 2019 18:56:48 +0000 (14:56 -0400)]
Bug 23329: Fix tests
- www.google.com vs https://www.google.com
- Remove transaction otherwise data are not available from webserver
- Use new C4::Output::output_error to avoid 302 (redirect)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 14 Aug 2019 18:56:46 +0000 (14:56 -0400)]
Bug 23329: Move error page to its own subroutine
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Wed, 14 Aug 2019 10:34:47 +0000 (11:34 +0100)]
Bug 23329: (RM follow-up) Add regression tests
Test plan:
Run the new tests and they should all pass once we've caught all cases
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Marcel de Rooy [Fri, 9 Aug 2019 09:27:18 +0000 (09:27 +0000)]
Bug 23329: (QA follow-up) Resolve warning on wrong biblionumber
Passing a wrong biblionumber generates a warning:
GetMarcUrls called on undefined record at opac/tracklinks.pl line 58.
Test plan:
[1] Try it again with a wrong biblionumber and check the logs.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Marcel de Rooy [Fri, 9 Aug 2019 09:18:13 +0000 (09:18 +0000)]
Bug 23329: (follow-up) Allow item URI with a biblionumber parameter
If you pass a URI with a biblionumber without specifying the itemnumber,
tracklinks did not redirect an item URI.
Test plan:
[1] Add URI in an item.
[2] Pass this URI with the itemnumber to tracklinks. Should pass.
[3] Pass this URI with the biblionumber to tracklinks. Should pass now too.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Wed, 17 Jul 2019 11:01:01 +0000 (11:01 +0000)]
Bug 23329: Only redirect tracklinks.pl to urls contained in records
Bug 19487 limited redirection to urls contained in a record/item if we were tracking.
We should probably limit forwarding if not tracking as well.
Additionally, if we don't have a soucre, let's not forward
To test:
0 - Set TrackClicks syspref to 'Don't track'
1 - Hit localhost:8080/cgi-bin/koha/tracklinks.pl?uri=http://www.google.com
2 - You get forwarded to google
3 - Set TrackClicks to 'Track anonymously'
4 - You get a 404
5 - Apply patch
6 - Hit localhost:8080/cgi-bin/koha/tracklinks.pl?uri=http://www.google.com
7 - You get a 404
8 - Set TrackClicks syspref to 'Don't track'
9 - Hit localhost:8080/cgi-bin/koha/tracklinks.pl?uri=http://www.google.com&biblionumber=1
Choose a biblionumber that exists
10 - You get a 404
11 - Add http://www.google.com to the 856$u of the record used above
12 - Hit localhost:8080/cgi-bin/koha/tracklinks.pl?uri=http://www.google.com&biblionumber=1
13 - You are redirected
14 - Confirm redirection and 404 as expected with other settings of TrackClicks
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Fri, 22 Nov 2019 10:09:42 +0000 (10:09 +0000)]
Bug 23451: Fix other similar wrong filterings
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 14 Aug 2019 17:31:53 +0000 (13:31 -0400)]
Bug 23451: Prevent XSS vulnerabilities in opac-imageviewer.pl
And certainly in other sripts as it is in opac-bottom.inc
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Magnus Enger [Fri, 6 Sep 2019 07:54:04 +0000 (09:54 +0200)]
Bug 22543: Prevent "back and refresh attack"
To reproduce and test:
- Log into the OPAC, you are taken to /cgi-bin/koha/opac-user.pl
- Log out, you are taken to /cgi-bin/koha/opac-main.pl?logout.x=1
- Click "Back", you are taken to /cgi-bin/koha/opac-user.pl
- Reload the page, you see an error like "Confirm new submission
of form"
- Reload the page again and confirm the submission of the form
- You are now logged in to the OPAC again!
- Log out again
- Apply this patch
- Log in to the OPAC, you are taken to /cgi-bin/koha/opac-user.pl
- Log out, you are taken to /cgi-bin/koha/opac-main.pl?logout.x=1
- Click back, you are taken to /cgi-bin/koha/opac-user.pl
- No matter how many times you reload /cgi-bin/koha/opac-user.pl,
you should not see anything other than the login form.
- Check that Self Check Out still works as it should, by making
sure you have a user with self_check permissions, then setting
WebBasedSelfCheck, AutoSelfCheckAllowed, AutoSelfCheckID and
AutoSelfCheckPass appropriately. Then visit
/cgi-bin/koha/sco/sco-main.pl and verify everything works as
expected.
The messages and errors pages you see related to resubmitting the
form might differ from the ones described here, depending on what
browser you use. I tested in Chromium 76.0.x.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Mon, 18 Nov 2019 16:19:02 +0000 (16:19 +0000)]
Bug 24060: Use patron object to load club tab
To recreate:
1 - Be using 19.05
2 - Create a club template and a club
3 - Go to a patron's checkout page
4 - Note the club tab will load
5 - Go to a patron's details page
6 - Note the club tab says 'Loading'
7 - Apply patch
8 - It loads!
Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Wed, 16 Oct 2019 14:58:36 +0000 (15:58 +0100)]
Bug 23827: Correction for missed 'F' and 'FU' case
When replacing F and FU with 'OVERDUE' + status in bug 22521 I missed
the cases inside the cash_register_stats template. This patch should
correct that mistake.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 11 Nov 2019 11:35:30 +0000 (12:35 +0100)]
Bug 23822: Fix deletion of patrons with credit
There are bugs in both master and 19.05, but different.
Anyway we should have this check to make sure a negative value will have
the same behavior: trigger the confirmation message (instead of a blank
page).
If we want to reject the deletion of a patron with credit we should
handle it on a separate bug report (behavior change)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 d23e50f0b239603a05ddbb62591e80657f5f6cae) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 7 Nov 2019 10:41:29 +0000 (11:41 +0100)]
Bug 23765: Do not display localized templates if TranslateNotices is off
To test:
1. Enable multi-languages
2. Set the preference 'TranslateNotices' on 'Allow'
3. Go to: tools==>Notices & slips==>Edit, make sure it has multilingual
email templates.
4. Set the preference TranslateNotices on 'Don't allow'.
5. Go to: tools==>Notices & slips==>Edit, the template shows several tab
for the same transport type.
6. Apply the patch.
7. Repeat the steps 4 and 5
8. Success. It only shows the default template when TranslateNotices is
'Dont allow'.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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 86f999812e1fb281742d79757964227ea0f5d330) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 22 Oct 2019 09:10:59 +0000 (11:10 +0200)]
Bug 23854: Fix failure on dates when editing a suggestion
- Watch plack-error-log
- Change an accepted suggestion to 'No Status'
- Verify error in the logs (use strict mode, depending on DBMS version)
- Status changed was not saved
- Apply patch
- Verify the error is gone, change is saved now.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 73198bc4bdafa6817c916c777a51a73d937ba2aa) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 12 Nov 2019 17:00:02 +0000 (18:00 +0100)]
Bug 23985: (bug 21206 follow-up) Fix checkout list when "Hold pickup library match" not set
This patch restores the behavior prior to bug 21206.
If "Hold pickup library match" is "Not set", then
hold_fulfillment_policy equals an empty string.
Test plan:
1. Go to "Circulation and fines rules"
2. Under "Default checkout, hold and return policy", unset "Hold pickup
library match" and Save
3. Place a hold on one item for one patron
4. Try to checkout the same item with another patron
=> Without this patch you the checkout list do not show, and the logs
contain "The method Koha::Item-> is not covered by tests!"
=> With this patch applied you see the checkout list
QA will take care of comparing the statement with the one before bug 21206
and make sure they are equivalent
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 17d221144605875b6efb1569093b76f412f8aea5) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 12 Nov 2019 17:18:23 +0000 (18:18 +0100)]
Bug 23846: Handle exception gracefully at the OPAC
I do not think we should have the same trick as the intranet, and
display a message. This should be enough.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cce358f9af5ee9761a875816f603344873838359) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 12 Nov 2019 10:15:46 +0000 (11:15 +0100)]
Bug 23846: Add a check to the data inconsistencies script
This may be quite long for big catalogue, but I think it is a good one
to have.
Test plan:
Same as first patch, then execute search_for_data_inconsistencies.pl
Notice the error.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 1e1c5d17a268c6d493c2c71d4b456da7749655c3) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 12 Nov 2019 10:04:42 +0000 (11:04 +0100)]
Bug 23846: Display degraded view when MARCXML is invalid (staff detail)
When an invalid bibliographic record is imported into the catalogue
there is not warning or error. However the bibliographic record detail
page will explode (Koha::Biblio::Metadata->record will raise an
exception).
This patch proposes to catch the exception on this view and display a
warning about the situation.
Note that editing/saving the record will fix the MARCXML data and so
removes the warning (some black magic we should get rid of I suspect).
Test plan:
- Import a bibliographic record with invalid XML, you can add non
printable characters, like 0x1F (CTRL-V 1F with vim)
- Go to the detail page
=> Without this patch you get a 500
=> With this patch applied you get a "degraded view" with a warning
message, telling you what the error is.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 068943f18d60edc231b59b6232fecabaf1c799ab) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Nick Clemens [Thu, 7 Nov 2019 19:38:24 +0000 (19:38 +0000)]
Bug 23986: Pass strings to Catmandu for deletion
The deletion subroutine expects to get a string, this is fine in most places, but when
we sort our records for batch deletion they are cast to numbers and the delete is not processed.
This patch quotes the biblionumbers as strings before passing them to Catmandu
To aid in detecting orphaned records you can use the patches on bug 22831
To test:
1 - Have or create a bib
2 - Go to Tools->Batch record deletion
3 - Click 'Enter a list of record numbers'
4 - Enter the biblionumber'
5 - Confirm deletion
6 - Search for the record, it still appears
7 - Apply patch, restart all the things
8 - Repeat 1-6
9 - This time the record is deleted
10 - Test other methods of record deletion to confirm the record is removed
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 cdea121ddb5c3e609ce698171a8dc319593a7780) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 22 Oct 2019 09:36:28 +0000 (11:36 +0200)]
Bug 23851: Add the homebranch prefix to the barcode when adding multiple copies of an items
See the comment in the code for more information.
Test plan:
- Set autoBarcode to hbyymmincr
- Create an item and click on the barcode field
- A barcode prefixed by the homebranch is generated
- Click the "Add multiple copies of this item" and enter 4
- Save
=> Without this patch only the first item has the homebranch prefix
=> With this patch applied they all have a barcode in the same format
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> 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 aae3dfe1232d8df452c7e677c6fa443017fb0417) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 5 Nov 2019 10:23:04 +0000 (11:23 +0100)]
Bug 22857: Sync koha-conf.xml files
Missing entries are added to those files.
Test plan:
Search for typos
Compare the two files and comfirm the entries are the same in both.
Exception: supportdir exists in etc/koha-conf.xml only, but I think it's
obsolete.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> 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 eaf4b79c32a6f173db8177b8ee365ec10f4532a6) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 70a59fc694866154fce74eeaf08ee2126f34947f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Andrew Isherwood [Thu, 24 Oct 2019 11:26:44 +0000 (12:26 +0100)]
Bug 23529: (follow-up) Fix syntax error
As mentioned by Magnus in comment #8
Sorry Magnus, definitely fixed this time!
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 370ee3203e2325f6f5db6771775ac4b55d82c874) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Whilst working on something else, it came to light that the previous fix
in bug 23229 was waaaaay too heavy handed and basically kills all ILL
related JS :( This is obviously a big problem, this patch fixes that.
The main problem is that all the ILL related JS is in a single file,
which isn't ideal as bits of it are used on different pages. Ideally,
we'd refactor it out into more manageable chunks which can be included
as required. Until such a time, this patch will do, it just prevents the
"get all requests" AJAX request unless you're on the ILL list page.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 04e9885c0f18fda2363818d4b0f2453a3aff4923) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Martin Renvoize [Mon, 4 Nov 2019 13:25:19 +0000 (13:25 +0000)]
Bug 23963: Revert bug 21987 to restore image quality
Bug 21987 had unexpected effects upon image quality for thumbnails.
Currently, we are working to resolve those issues but have not managed
to correct them inside the release window for this cycle. As such, I
have chosen to revert the original bug whilst we work on a resolution.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 35670b0495e0333f57773b0375ea7aa1122d5372) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Lari Taskula [Mon, 4 Nov 2019 16:32:58 +0000 (16:32 +0000)]
Bug 23774: Server-side confirmation for hold pickup location in OPAC
While placing a hold on a book, if a user opens up Inspect Element on the
Pick up location drop down box they can change the pick up location in
the code to a library that is not listed as a pick up location.
How to replicate:
Search for a book
Select book
Click Place Hold
On the screen Home > Placing a hold
Right click on Pick up location
Select 'Inspect Element'
Under
<!-- HOLDABLE -->
<li class="Branch">
<select name="Branch ******"> Pick Up location:</label>=$0
Option values are listed that relate to the pick up location, this value
can be changed to another new location and when the hold is placed
the hold will be placed for this new location instead of the listed options
in the Pick up location drop down list.
To test:
1. Apply patch
2. Repeat "How to replicate"
3. Observe it is no longer possible to place holds on libraries not defined
as pickup location by changing option value via Inspect Element tool
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> 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 45a89f47090e783513841a087256c76fff84b29f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 16 Oct 2019 08:47:28 +0000 (10:47 +0200)]
Bug 17359: Correct encoding when displaying patron import summary
There is an encoding issue when the patron import summry, the string
must be UTF8 decoded before being sent to the template.
Test plan:
- Create a patron import CSV file with import issues. Use UTF8 characters.
See file attached to the bug report 'patron_import.csv'
=> The screen should display the line correctly
- Correct the import issue (add a surname for Chloé)
=> The imported patrons should contain the correct values.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> 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 5b03d4be39497be0dbdce17ef26867ca80affec1) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 24 Oct 2019 10:29:23 +0000 (12:29 +0200)]
Bug 23234: Mock DateTime->now using the time zone
The timezone of the two dt was different, one was UTC, the other one was
my local one.
When we mocked DateTime->now we did not use the time zone, we must use
dt_from_string instead
Test plan:
Make sure your environment has a different time zone than UTC
`prove t/db_dependent/Circulation.t` should fail without this patch
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 549a09c52178937af28cc11c5bfa7f00cbced1b5) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Fri, 21 Jun 2019 12:51:15 +0000 (08:51 -0400)]
Bug 23181: Unable to use payment library in ACCOUNT_PAYMENT or ACCOUNT_WRITEOFF notices
Do to a simple semantic typo, the branches key will always be null for the tables key of the parameters for GetPreparedLetter.
Test Plan:
0) Activate UseEmailReceipts
1) Attempt to use [% branch.branchname %] in the ACCOUNT_PAYMENT notice
2) Note it produces no output
3) Apply this patch
4) Make another payment
5) You should now see the branche's name!
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Also requires UseEmailReceipts to be activated.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c4466e7d714d32808ee2e553320431005ec7cc69) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
See bug 22847. We should never call ->Get in this template, we want
to display the values in the DB, not the calculated ones
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c4ca7bff689a37debc7aa850fdd42bfc5a19386e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>