Alex Arnaud [Fri, 28 Dec 2018 16:52:18 +0000 (17:52 +0100)]
Bug 22053: update database
Rebased-on: 2019-03-25 Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Agustin Moyano <agustinmoyano@theke.io> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Alex Arnaud [Fri, 28 Dec 2018 16:50:14 +0000 (17:50 +0100)]
Bug 22053: ability to enable/disable some plugins
Test plan:
- apply this patch(es),
- launch an updatedabase,
- go to plugins/plugins-home.pl
and deal with enable/disable method
- install a plugin like KitchenSink
https://github.com/bywatersolutions/koha-plugin-kitchen-sink
- once installed, the plugin change the background color
of the staff client to orange.
- disable the plugin,
- background color should be set back to the original one
Rebased-on: 2019-03-25 Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Agustin Moyano <agustinmoyano@theke.io> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Alex Arnaud [Fri, 28 Dec 2018 16:48:43 +0000 (17:48 +0100)]
Bug 22053: create unit tests
Rebased-on: 2019-03-25 Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Agustin Moyano <agustinmoyano@theke.io> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Fri, 26 Apr 2019 09:58:31 +0000 (10:58 +0100)]
Bug 7088: (follow-up) Modify checkbox enabling
As described in comment #50, we need to only enable renewal on items
that are disabled in line with which sysprefs are enabled. So we now
only enable renewal of on hold items if the AllowRenewalOnHoldOverride
syspref is on and we only enable renewal of all other limited items
when the AllowRenewalLimitOverride syspref is on.
NOTE: The test plan below has changed substantially from previous
iterations
Test plan (you might want to make a coffee first...):
- Apply patch
- Rebuild CSS
- Go to the Patron Details page for a patron who has an item on loan that would fulfil an outstanding loan request.
- The patron also needs to have an item on loan that cannot be renewed for some other reason, say renewal limit has been reached
=> TEST: Observe that it is NOT possible to select either item for renewal
- Enable the "AllowRenewalLimitOverride" syspref
- Return to the Patron Details page
- Check the "Override renewal restrictions" checkbox
=> TEST: Observe that it IS possible to select the the item that has reached the renewal limit, but not the item that is on hold
- Disable the "AllowRenewalLimitOverride" syspref
- Enable the "AllowRenewalOnHoldOverride" syspref
- Return to the Patron Details page
- Check the "Override renewal restrictions" checkbox
=> TEST: Observe that it is NOT possible to select the the item that has reached the renewal limit, but it IS possible to select the item on hold
- Enable the "AllowRenewalLimitOverride" syspref
- Enable the "AllowRenewalOnHoldOverride" syspref
- Return to the Patron Details page
- Check the "Override renewal restrictions" checkbox
=> TEST: Observe that it IS possible to select the the item that has reached the renewal limit, AND it IS possible to select the item on hold
- Select the item that is on hold
=> TEST: Observe that an additional "On hold due date" input box is displayed
- De-select the item
=> TEST: Observe that an additional "On hold due date" input box is hidden
- Select the item
- In the "On hold due date" input box, select a due date for the item
- Click "Renew or check in selected items"
=> TEST: Observe that the item is renewed as usual
- In the "Renewal due date" input box, select a due date
- Remove the contents of the "On hold due date" input box
- Click "Renew or check in selected items"
=> TEST: Observe that the item is renewed by falling back to the "Renewal due date" value if a value is not specified in the "On hold due date" input box
- Remove the contents of the "Renewal due date" input box
- Click "Renew or check in selected items"
=> TEST: Observe that the standard loan period is used for the renewal period if no due date is specified in either box
- In the "On hold due date" input box, select a due date for the item
- In the "Renewal due date" input box, select a different due date
- Click "Renew all"
=> TEST: Observe that all non on hold items are renewed using the value in "Renewal due date" and on hold items are renewed using the value in "On hold due date"
- From the main staff client from page, choose "Circulation", then choose "Renew"
- Enter the barcode of an item that you know to be on hold and submit
=> TEST: In the alert box that appears, observe that a date picker is
displayed
- Choose a due date for this item, then click "Override and renew"
=> TEST: In the "Item renewed" box, observe that the item has been
renewed to the date specified
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch causes the click event listener on the #override_limit to be
created if EITHER the AllowRenewalOnHoldOverride OR
AllowRenewalLimitOverride sysprefs are enabled. Previously, it would
only be created if the AllowRenewalLimitOverride syspref was enabled,
which would cause the checkbox to be displayed but do nothing.
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Thu, 21 Feb 2019 12:21:23 +0000 (12:21 +0000)]
Bug 7088: (follow-up) Add pref to checkbox
As per commit #29 here:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7088#c29
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 7088: (follow-up) Default hold checkbox display
As per item 4 here:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7088#c24
Now, the checkbox for renewing on hold items behaves the same way as the
checkbox for renewing items that have reached their renew limit. It is
necessary to check the re-labelled "Override renewal restrictions"
checkbox before it is possible to select on-hold items for renewal.
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Wed, 30 Jan 2019 11:05:17 +0000 (11:05 +0000)]
Bug 7088: (follow-up) Set syspref default to off
As per item 2 here:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7088#c24
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
As per item 1 here:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7088#c24
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Tue, 13 Nov 2018 13:57:57 +0000 (13:57 +0000)]
Bug 7088: (follow-up) Fix renewal limit bug
There was a bug in that altering the state of the "Override renewal
limit" checkbox was altering the appearance of the per-item "On hold"
checkbox. This is incorrect, the "Override renewal limit" checkbox is
unconnected with this bug.
Sponsored-by: Cheshire Libraries Shared Services Sponsored-by: Halton Borough Council Sponsored-by: Sefton Council Signed-off-by: Andrew Farthing <Andrew.Farthing@sefton.gov.uk> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Fri, 21 Sep 2018 10:09:13 +0000 (11:09 +0100)]
Bug 7088: Allow renew on hold items with due date
This patch adds the ability for items that are on hold to be renewed with a due date specfied by the user. It is enabled by the new "AllowRenewalOnHoldOverride" syspref. It is manifested in two locations:
1. In the "Checkouts" table on the Patron Details screen. It is now possible to select on loan items that would otherwise fulfil a hold request to be renewed. When such an item is selected, an additional date selection box is displayed to allow the user to specify the due date for all on hold items that are to be renewed.
2. In the Circulation > Renew alert screen. When a barcode of an on loan item that would ordinarily fulfil a hold request is entered, the usual alert is displayed indicating that the item is on hold, it is still possible to override this, and renew, however it is now also possible to specify a due date.
Test plan:
- Go to the Patron Details page for a patron who has an item on loan that would fulfil an outstanding loan request.
- TEST: Observe that it is NOT possible to select this item
- Enable the "AllowRenewalOnHoldOverride" syspref
- Return to the Patron Details page for a patron who has an item on loan that would fulfil an outstanding loan request.
- TEST: Observe that it IS possible to select this item
- Select the item
- TEST: Observe that an additional "On hold due date" input box is displayed
- De-select the item
- TEST: Observe that an additional "On hold due date" input box is hidden
- Select the item
- In the "On hold due date" input box, select a due date for the item
- Click "Renew or check in selected items"
- TEST: Observe that the item is renewed as usual
- In the "Renewal due date" input box, select a due date
- Remove the contents of the "On hold due date" input box
- Click "Renew or check in selected items"
- TEST: Observe that the item is renewed by falling back to the "Renewal due date" value if a value is not specified in the "On hold due date" input box
- Remove the contents of the "Renewal due date" input box
- Click "Renew or check in selected items"
- TEST: Observe that the standard loan period is used for the renewal period if no due date is specified in either box
- In the "On hold due date" input box, select a due date for the item
- In the "Renewal due date" input box, select a different due date
- Click "Renew all"
- TEST: Observe that all non on hold items are renewed using the value in "Renewal due date" and on hold items are renewed using the value in "On hold due date"
- From the main staff client from page, choose "Circulation", then choose "Renew"
- Enter the barcode of an item that you know to be on hold and submit
- TEST: In the alert box that appears, observe that a date picker is
displayed
- Choose a due date for this item, then click "Override and renew"
- TEST: In the "Item renewed" box, observe that the item has been
renewed to the date specified
Sponsored-by: Cheshire Libraries Shared Services Sponsored-by: Halton Borough Council Sponsored-by: Sefton Council Signed-off-by: Andrew Farthing <Andrew.Farthing@sefton.gov.uk> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Wed, 19 Sep 2018 15:29:19 +0000 (16:29 +0100)]
Bug 7088: Add AllowRenewalOnHoldOverride syspref
Enables the renewal of on hold items with specified due dates to be turned on/off
Sponsored-by: Cheshire Libraries Shared Services Sponsored-by: Halton Borough Council Sponsored-by: Sefton Council Signed-off-by: Andrew Farthing <Andrew.Farthing@sefton.gov.uk> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andreas Jonsson [Fri, 26 Apr 2019 19:44:59 +0000 (19:44 +0000)]
Bug 22790: The system preference itemBarcodeInputFilter is not applied for barcodes inputed via SIP2
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>
Jonathan Druart [Fri, 3 May 2019 21:34:22 +0000 (17:34 -0400)]
Bug 22847: Correctly displayed circ rule values for max_holds and maxissue*
There are several things going wrong on the circulation rules screen. The global rule is displayed for specific libraries (even if the rule does not exist for the library), and max_holds is always blank.
I have trouble finding the root of the issue, but I will propose a patch to fix both problem.
Certainly a mismatch between bug 18887 and bug 18925.
Test plan:
0. Do not apply the patch
1. Notice the issue on the circulation rules screen
2. Apply the patch
3. Confirm that the value you set are correctly displayed (and not the propagated ones!)
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Agustin Moyano <agustinmoyano@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Liz Rea [Wed, 1 May 2019 00:31:15 +0000 (00:31 +0000)]
Bug 22816: OPAC detail holdings table should now look a bit better
This patch sets the "autowidth" option to "false" for the OPAC
holdings DataTable on opac-detail.pl. This gives the table a fluid
width rather than having the width be "hard-coded" by DataTables upon
first page render.
To test, apply the patch and view the detail page for a bibliographic
record with some items. Under the "Holdings" tab, the table of
holdings should fill the width of the tab container.
Resize the browser window and confirm that the table width adjusts
accordingly.
Signed-off-by: Bin Wen <bin.wen@inlibro.com> Signed-off-by: arthur <arthur.bousquet@inlibro.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 21036: Remove odd number of elements warnings from AuthoritiesMarc.pm
Like this one (16.11 line number):
Odd number of elements in anonymous hash at C4/AuthoritiesMarc.pm line 1070.
We need to add a scalar to some MARC::Field::subfield calls. In list context
an empty list returned affects the hash built around it.
Test plan:
Could reproduce this warning easily from OPAC authority search.
opac-authorities-home.pl calling BuildSummary.
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Use of uninitialized value $isbn in string ne at /usr/share/koha/prodclone/C4/Biblio.pm line 1794. (16.11 line number)
Trivial edit.
And these warnings from TransformHtmlToXml (with 16.11 line numbers):
Use of uninitialized value in substr at /usr/share/koha/prodclone/C4/Biblio.pm line 2527.
Use of uninitialized value in substr at /usr/share/koha/prodclone/C4/Biblio.pm line 2528.
substr outside of string at /usr/share/koha/prodclone/C4/Biblio.pm line 2528.
Indicator in 952 is empty at /usr/share/koha/prodclone/C4/Biblio.pm line 2534.
The last warning is not needed and can be removed.
Note that the code used the construct @$indicator[$j] for $$indicator[$j].
The first is an array slice. This worked in list context. But apparently
the second was meant to be used. And can be rewritten as $indicator->[$j]
which generally is considered more readable.
The code around indicator1/2 and ind1/2 is simplified. This change is applied
twice in the same sub.
Test plan:
Read the changes.
Run t/Biblio/TransformHtmlToXml.t
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Mon, 29 Apr 2019 02:09:39 +0000 (22:09 -0400)]
Bug 22800: (bug 22550 follow-up) Do not raw filter when not necessary (OPAC suggestions)
This is a follow-up for bug 22550, we do not need to use the $raw
filter.
Test plan:
Same as bug 22550:
Test plan:
Test plan:
1. OPAC->login->your purchase suggestions->New purchase suggestion
2. Click button "Submit your suggestion" directly without filling in any field.
Empty suggestion record was added succeffully.
3. Apply the patch.
4. Click button "Submit your suggestion" directly without filling in any field.
The required fields should be labeled in red.
(you can change the mandatory fields by preference
'OPACSuggestionMandatoryFields')
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>
Nick Clemens [Fri, 26 Apr 2019 19:58:05 +0000 (19:58 +0000)]
Bug 22791: Unify calculation between aqui-home and ordered.pl
To test:
1 - Enable order price rounding
2 - Order an example with 8 * 16,99 and 42% discount, 19.45% tax.
3 - Check ordered page - 94.17 is total
4 - Check aqui-home - 94.16 is total
5 - Apply patch
6 - Verify numbers now match
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>
Liz Rea [Tue, 16 Apr 2019 06:55:36 +0000 (06:55 +0000)]
Bug 22527: web installer links to outdated DB manual
To reproduce:
1. Use MySQL or MariaDB for your Koha installation
2. Create an empty database and point $KOHA_CONF to this database name.
3. Grant SELECT privilege to your database user, e.g.
grant select on koha3.* to 'koha'@'%' identified by 'koha';
4. Go to step 2 of web installer where it checks database
connection
5. Observe the following message
User koha doesn't have enough privilege on database koha.
Ask for or make a change in the user's privileges. User koha must
have USAGE, INSERT, UPDATE, DELETE, DROP and CREATE privileges on
database koha2.
Need help? See manual for PostgreSQL
6. Note "See manual for PostgreSQL" is wrong. Should now read Need help?
For help with granting permissions, please search online for "[%
dbms %] manual grant permissions" of course the dbms should be the dbms
you are using.
7. Apply patch, restart all
8. Refresh page and observe it now displays correct link
Test plan and original patchset by Lari Taskula <lari.taskula@hypernova.fi>
Sponsored-by: Hypernova Oy Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 22527: Remove extra space after '?'
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Josef Moravec [Mon, 29 Apr 2019 12:18:43 +0000 (14:18 +0200)]
Bug 22787: Add mapping of letters "ů" and "Ů" to zebra definitions
Test plan:
0) Do not apply the patch
1) Add some word with character "ů" into metadata, for example author "Martinů, Bohuslav"
2) Try to search it with "Martinu" and you'll see you can't find it
3) Apply the patch
4) Copy file etc/zebradb/etc/word-phrase-utf.chr to your /etc/koha directory
sudo cp etc/zebradb/etc/word-phrase-utf.chr /etc/koha/zebradb/etc/
5) koha-zebra --restart kohadev
6) koha-rebuild-zebra -f kohadev
6) try to search "Martinu" again - you should be able to find your record
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Mon, 12 Nov 2018 18:20:33 +0000 (15:20 -0300)]
Bug 21671: Prevent Modifications.t to fail randomly
If repeatable is set to 0 by TestBuilder, the tests will fail with:
t/db_dependent/Koha/Patron/Modifications.t .. 1/6 # Looks like you planned 20 tests but ran 9.
# Failed test 'approve tests'
# at t/db_dependent/Koha/Patron/Modifications.t line 259.
[repeatable not set for attribute type and tried to add a new attribute for the same code]# Looks like your test exited with 255 just after 5.
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>
This patch restores a missing condition. $patron gets renamed to make
it obvious that it related to the logged in user.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 22813: remove repetitive queries inside two nested loops in searchResults
This patch moves a query on Koha::Patrons and then the related
Koha::Patron::Category that needlessly happens inside two nested loops
(all items of all MARC records in the resultset).
The Koha::Patron and Koha::Patron::Category are always the same as it is
fetched from C4::Context->userenv each time.
To test:
- Run:
$ kshell
k$ prove t/db_dependent/Search.t
=> SUCCESS: Tests pass
- Apply this patch
- Run:
k$ prove t/db_dependent/Search.t
=> SUCCESS: Tests still pass!
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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>
Jonathan Druart [Mon, 4 Mar 2019 21:12:56 +0000 (18:12 -0300)]
Bug 22453: Make TestBuilder generates dates taking into account the timezone
I have no idea why this only appears today but TestBuilder generates dates using DateTime->now,
which does not take into account the timezone.
It has been highlights by a failing test today on U18.
Why today whereas this patch was pushed few weeks ago?
Why U18 and not D9?
The output of the test is:
koha_1 | # Failed test 'With BorrowerLogs and TrackLastPatronActivity we should not spam the logs'
koha_1 | # at t/db_dependent/Koha/Patrons.t line 1421.
koha_1 | # got: '2'
koha_1 | # expected: '1'
koha_1 | # Looks like you failed 1 test of 4.
koha_1 |
koha_1 | # Failed test 'BorrowersLog tests'
koha_1 | # at t/db_dependent/Koha/Patrons.t line 1422.
koha_1 | # Looks like you failed 1 test of 33.
koha_1 | [19:51:44] t/db_dependent/Koha/Patrons.t
Actually there are 2 logs, one for the cardnumber that is expected, and on for updated_on:
"updated_on" : {
"after" : "2019-03-04 21:10:00",
"before" : "2019-03-04 18:10:00"
}
Apart from the fact that we may want to remove this updated_on field from MODIFY,
the before/after dates differ from 3 hours.
Here it's currently 18:10 and in UTC-3
To prevent such behaviors in tests (create stuffs in the future...), we should
use our Koha::DateUtils::dt_from_string method that takes care of the timezone
used in other places of Koha.
Test plan:
prove t/db_dependent/Koha/Patrons.t
May fail without this patch.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This patch is fine in itself, but there may still be an issue around
the failing test for TrackLastPatronActivity. Reopened bug 22741.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Cache.t fails during package build. Moving it to db_dependent fixes
the problem.
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
After the introduced 'filtering', we loose the information about the
term weight!:
\ [
[0] {
approved 1,
author "Heylin, Clinton.",
biblionumber 1,
borrowernumber 51,
date_created "2019-02-26 15:36:37",
language undef,
subtitle [],
tag_id 1,
term "word",
time_created_display "15:36:37",
title "E Street shuffle :",
visible 1,
XSLTBloc "
<<<BUNCH OF GENERATED HTML HERE>>>
...
The code even calls GetMarcBiblio. This needs to be reverted as it is
plain wrong. If it was worth removing *some* biblios from the
weight_total value, then this calculation should be done somewhere else,
without fetching the MARC data again.
Signed-off-by: Claudio <costalc@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Thu, 21 Mar 2019 17:45:37 +0000 (14:45 -0300)]
Bug 22542: Force back button to display personal data
This is a follow-up of bug 5371
The following command must not return anything:
grep ^output_html_with_http_headers `git grep -l -P "authnotrequired\s*=>\s*0" opac`|grep -v force_no_caching
This must be a test somehwere to prevent further regressions.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 22478: (QA follow-up) Handle category in opac-shelves like a boolean
The category parameter should be restricted to 1 or 2 (private/public). In
order to keep same behavior, no parameter means 1 (private).
Note: Adding the same line in intranet counterpart.
Test plan
[1] Check for category empty, '1a', '11' etc. And with script ;)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Katrin Fischer [Wed, 10 Apr 2019 02:06:37 +0000 (02:06 +0000)]
Bug 22478: Fix POD
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Fri, 15 Mar 2019 16:41:27 +0000 (13:41 -0300)]
Bug 22478: Add tests
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Thu, 14 Mar 2019 22:42:50 +0000 (19:42 -0300)]
Bug 22478: Prevent XSS vulnerabilities when pagination appears
This is a bad one as we thought we were XSS safe since bug 13618.
The html code generated in C4::Output::pagination_bar must escape the
variables and values correctly.
This patch needs to be widely tested, everywhere the pagination appears,
to make sure we will not introduce regressions.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Fri, 12 Apr 2019 01:23:34 +0000 (01:23 +0000)]
Bug 22692: Check for patron using cardnumber and userid
TO test:
1 - Set failed login attempts to 1
2 - Attempt a login with a userid and bad password, no success
3 - Attempt a login with userid and correct password, prevented because
locked
4 - Attempt a login with cardnumber and right password, you are logged
in
5 - Log out, try again with userid and correct password, prevented
because locked?
6 - Apply patch
7 - Repeat 1-3 to lock account
8 - Attempt logging in with cardnumber, you are prevented
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Fri, 12 Apr 2019 01:11:19 +0000 (01:11 +0000)]
Bug 22692: Unit tests
1 - Apply just this patch
2 - prove -v t/db_dependent/Auth.t
3 - Failure
4 - Apply second patch
5 - prove -v t/db_dependent/Auth.t
6 - Success
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Mon, 29 Apr 2019 15:10:17 +0000 (15:10 +0000)]
Bug 22424: (follow-up) Show blank value for empty status
This patch updates the screen and CSV output of item searches so that if
the item does not have a lost status a blank table cell is shown instead
of "0."
This patch also amends the table headers so that "Not for loan" statuses
are explicitly labeled as such, and the "Lost" column has the header
"Lost status."
To test, apply the patch and perform an item search in the staff client
which will return results with notforloan and lost items. Verify that
the values display correctly in both onscreen and CSV output. Verify
that the column headers look correct.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Wed, 27 Feb 2019 15:31:29 +0000 (15:31 +0000)]
Bug 22424: Add search by all lost statuses to item search
This patch changes the item search form so that searching by lost status
includes options for all lost authorised values instead of just "yes" or
"no."
To test you should have multiple authorized values for LOST.
- Apply the patch and open the item search form.
- Test searches which limit by lost status. Confirm that results are
correctly limited.
- Confirm that lost statuses are correctly displayed in the search
results.
- Confirm that in the search results table, the column header for
"Lost" includes a dropdown menu for filtering by all available
authorized values for lost.
- Test the CSV export function and confirm that lost status is
correctly exported.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Mon, 25 Feb 2019 16:28:10 +0000 (16:28 +0000)]
Bug 22408: Subscription entry form cleanup
This patch makes a number of changes to the subscription entry form:
- Make the default layout single-column.
- Switch the layout to two-column only when testing prediction
pattern.
- Add a button to hide the prediction pattern test pane.
- Change the style of some buttons and links. Add Font Awesome icons
to some.
- Clean up some issues with capitalization and spacing.
- Make it clearer when form fields are read-only: Move "locked" form
field style from addbiblio.css to staff-global.css and improve it
with regard to mouse interactions
To test, apply the patch and regenerate the staff client CSS. Clear your
browser cache if necessary.
- Go to Serials -> New subscription.
- Readonly fields under "Vendor" and "Record" should show a small
padlock icon.
- Test the process of adding a subscription, paying special attention
to the advanced pattern controls: Showing, hiding, modifying,
canceling.
- Test the process of editing a subscription in the same way.
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Mon, 22 Apr 2019 20:00:37 +0000 (20:00 +0000)]
Bug 21364: (follow-up) Check for standing status and uncertain prices
Fetch 'uncertainprices' when getting basket info. A side effect is that styling on baskets with uncertain prices is restored by this bug. They will appear in red
To test:
1 - Add an order with an uncertainprice to the basket
2 - Return to vendor baskets view
3 - Note the actions now include "Uncertain prices"
4 - Click that, resolve the uncertain prcie
5 - Return to vendor basket view
6 - Note you can now close the basket, but don't
7 - Edit the basket, mark it as standing
8 - Return to vendor basket view
9 - Note you cannot close the basket
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Sun, 16 Sep 2018 03:05:59 +0000 (03:05 +0000)]
Bug 21364: Allow closing basket from vendor view/search
To test:
1 - Have a vendor
2 - Add some empty baskets
3 - Add some non-empty baskets
4 - Search for vendor and note you now
a - Can only 'View' empty or closed baskets
b - Have a dropup menu to 'Add to ' or 'Close' open baskets
5 - Confirm things look correct and buttons work
6 - Confirm that basket name is now a link to view basket
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Mon, 17 Dec 2018 13:35:09 +0000 (13:35 +0000)]
Bug 22010: Check preferences for ebook integration
To test:
1 - Enable OverDrive and RecordedBooks (you can put anything in the
prefs)
2 - Search on the opac - verify you get results (or search error) on
first page of results'
3 - Go to second page of results - OD and RB are not searched
4 - Apply patch
5 - Verify nothing has changed
If you have valid credentials:
1 - Enable RB prefs
2 - Sign in with an account that has an email matching your registered
account for recordedbooks
3 - Confirm you RB account loads on opac-user.pl
Otherwise:
Read the patches, verify it all makes sense
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Mon, 29 Apr 2019 01:40:21 +0000 (21:40 -0400)]
Bug 22357: Do not duplicate report rows if several reports exist
At the moment every time you run runreport.pl with the --store-results
option another line will appear for your report in the saved
reports table. This is not a data, but a display problem as the
report is still only stored once.
1) Create a report and note the report number
2) Run from command line (replace X by report number) :
misc/cronjobs/runreport.pl X --format=csv --csv-header --store-results
3) Go to saved reports table
4) Look at the table, each run of the cronjob will create a new row
in the table instead of just updating the saved results column.
5) Apply patch
6) Veriy the table displays correctly again and there are no regressions
QA: Run t/db_dependent/Reports/Guided.t
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Josef Moravec [Mon, 11 Mar 2019 21:27:52 +0000 (21:27 +0000)]
Bug 8995: (follow-up) Add tests, move open_url/coins routines to Koha namespace
Test plan:
1) Ensure the COinS span tag is still included on this pages. You need
to look into html source and search for span tag with class 'Z3988',
which has COinS string in title.
Staff client:
catalogue -> ISBDdetail
catalogue -> MARCdetail
catalogue -> detail
virtualshelves -> shelves
OPAC (you should have COinSinOPACResults system preference enabled):
opac detail
opac search
opac shelves
2) Run tests:
prove t/Biblio.t t/db_dependent/Biblio.t t/db_dependent/Koha/Biblio.t
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tested with all 9 current patches. Works as advertised, including
OPACURLOpenInNewWindow. If a record has no items, no OpenURL link
is displayed. All the suggested tests pass. I did not test with
XSLT turned off.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Wed, 28 Sep 2016 12:18:12 +0000 (13:18 +0100)]
Bug 8995: Add IGNORE to the INSERT statement
Signed-off-by: Magnus Enger <magnus@libriotech.no> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Julian Maurice [Wed, 6 Nov 2013 15:04:42 +0000 (16:04 +0100)]
Bug 8995: Show OpenURL links in OPAC search results
This patch use GetCOinS sub to provide an OpenURL link in OPAC search
results. It uses 4 new system preferences:
- OpenURLinOPACResults: enable or disable this feature
- OpenURLResolverURL: url of the openURL resolver
- OpenURLText: text of the link
- OpenURLImageLocation: image of the link
Link is displayed as an image if OpenURLImageLocation is defined, and as
text otherwise.
It works both with and without XSLT enabled.
Changes made to GetCOinSBiblio:
For 'journal':
- Title should be in rft.jtitle instead of rft.title
- rft.date, rft.aulast, rft.aufirst, rft.au, rft.pub and rft.pages have
no meaning for a subscription, so they are simply removed from URL
This patch refactors GetCOinSBiblio, so the construction of URL is done
only at the end. This way we do not have ugly
$var .= "&$value"
in the function body.
Also use URI::Escape instead of custom regexps.
This development consider the value of syspref OPACURLOpenInNewWindow
when building the link.
Test plan:
1/ Enable syspref OPACShowOpenURL and put your OpenURL resolver URL in
OpenURLResolverURL syspref (if you don't have one, just fill it with
some fake URL, you'll have to check if OpenURL links are correct)
2/ If you want, set the other sysprefs OpenURLImageLocation and
OpenURLText
3/ Fill syspref OPACOpenURLItemTypes with some (not all) of your
item types.
4/ Empty sysprefs OPACXSLTDetailsDisplay and OPACXSLTResultsDisplay
5/ Go to OPAC and launch a search.
6/ Check you have in the results (near the title) the OpenURL link (only
for itemtypes that are in OPACOpenURLItemTypes).
Toggle OPACURLOpenInNewWindow syspref and check that the behaviour of
the link is correct.
7/ Go to the detail page of one of those and check you have the OpenURL
link too. (Above tags)
Toggle OPACURLOpenInNewWindow syspref and check that the behaviour of
the link is correct.
8/ Set sysprefs OPACXSLTDetailsDisplay and OPACXSLTResultsDisplay to
"default" and repeat steps 5 to 7
Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Magnus Enger <magnus@libriotech.no> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Maryse Simard [Tue, 5 Feb 2019 23:26:42 +0000 (18:26 -0500)]
Bug 8000: (QA follow-up) Add email validation to system preferences
This patch uses the JQuery validator plugin to add validation to preferences of class email in the system preferences page. A field containing an invalid value (even if not modified) should prevent saving.
To test, confirm that when entering an invalid email address in the SendAllEmailsTo field, an error message appears and saving is prevented.
Correcting the value should hide the message and let you save as normal.
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>
Maryse Simard [Tue, 5 Feb 2019 23:24:23 +0000 (18:24 -0500)]
Bug 8000: (QA follow-up) Update the to_address in the message queue
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>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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>
Martin Renvoize [Mon, 29 Oct 2018 12:58:51 +0000 (12:58 +0000)]
Bug 8000: (QA follow-up) Centralise Bcc too
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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>
David Bourgault [Fri, 15 Sep 2017 19:06:13 +0000 (15:06 -0400)]
Bug 8000: Redirect all emails to SendAllEmailsTo
Rebased and squashed after changes to master.
Only difference from previous patches are small adjustements to conflicts in t/db_dependent/Letters.t
Test plan:
1) Apply path
2) Run updatedatabase.pl
3) Clear all SendAllEmailsTo system preference
4) Send mail to a patron of your choosing, email will go to patron's
email address as usual.
5) Set SendAllEmailsTo to a test email address
6) Send mail to the patron, email will be redirected to the email set
in the systempreference.
7) Run prove -v t/db_dependent/Letters.t
It does not affect messages in the message_queue.
This patch obsoletes previous patches, because it achieves the same
functionality in a much more centralized way. (4 lines of code!)
Signed-off-by: Ed Veal <eveal@mckinneytexas.org> Signed-off-by: BWS Sandboxes <ByWaterSandboxes@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> 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>
Josef Moravec [Mon, 15 Apr 2019 10:05:28 +0000 (10:05 +0000)]
Bug 20421: (follow-up) Fix styling
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Josef Moravec [Tue, 13 Mar 2018 14:57:49 +0000 (14:57 +0000)]
Bug 20421: Inform staff that patron does have the title checked out during placing hold
Test plan:
1) Enable the CheckPrevCheckout and DisplayMultiPlaceHold system preferences
2) Have a patron with some checkouts history
3) Try to place hold on one of titles from history for this patron
4) You should see an information at the top of confirm request page, but
you still should be able to place a hold
5) Try this with multiple titles - one or more of them should be from
history
6) You should see this information in "Information" column
7) There is also new column placed at the beggining with checkbox, you
could uncheck it for titles you do not want to place a hold on it
8) Confirm the hold is placed only on checked titles
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Bin Wen <bin.wen@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Josef Moravec [Tue, 23 Apr 2019 12:25:52 +0000 (12:25 +0000)]
Bug 21502: Add ItemsDeniedRenewal system preference to check syntax
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Josef Moravec [Fri, 5 Oct 2018 13:48:07 +0000 (13:48 +0000)]
Bug 21502: Add UpdateItemLocationOnCheckin preference to YAML format check
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Josef Moravec [Fri, 5 Oct 2018 13:43:54 +0000 (13:43 +0000)]
Bug 21502: Add check for YAML formatted system preferences to about page
So far there are these yaml formatted preferences:
UpdateNotForLoanStatusOnCheckin
OpacHiddenItems
BibtexExportAdditionalFields
RisExportAdditionalFields
UpdateItemWhenLostFromHoldList
MarcFieldsToOrder
MarcItemFieldsToOrder
Test plan:
1) Add some badly formatted YAML into some of preferences listed above
2) Check the System information tab on About page for appropriate warnings
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Josef Moravec [Tue, 23 Apr 2019 11:46:24 +0000 (11:46 +0000)]
Bug 22757: Add CodeMirror highlighting on more YAML formatted preferences
Test plan:
Go to system preferences and ensure the code highlighting is used on
these preferences:
UpdateNotForLoanStatusOnCheckin
BibtexExportAdditionalFields
RisExportAdditionalFields
UpdateItemWhenLostFromHoldList
MarcFieldsToOrder
MarcItemFieldsToOrder
ItemsDeniedRenewal
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Test plan
1) Try to create patron with same name/datefobirth to trigger the
duplicate patron check
2) Click on "View existing record" link on "Duplicate patron record?"
alert message
3) You should see the patron data, but withou toolbar, menu, and so on.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Josef Moravec [Fri, 2 Nov 2018 17:40:45 +0000 (17:40 +0000)]
Bug 21757: Clenup of moremember.pl and its templates
This patch:
- removes unused templates
- use objects as much as possible
- remove many template params
Test plan:
1) Apply the patch
2) Play with patron detail page and try to broke it anyhow ;)
- messaging preferences
- enhanced attributes
- guarantors and guarantees
- fines
- messages
- checkouts
- overdues
- use different date formats, price formats and address formats
- ... there is many thinks you could try with this one page ;)
Owen Leonard [Thu, 25 Apr 2019 15:23:15 +0000 (15:23 +0000)]
Bug 22772: Menu link hover color incorrect in OPAC language choosers
This patch makes a few corrections to OPAC CSS to fix colors in the
language menus.
To test, apply the patch and rebuild the OPAC CSS.
- Enable multiple languages in the OPAC, including more than one
language "variation" (fr-FR, fr-CA).
- Set the OpacLangSelectorMode preference to "both."
- In the OPAC, test the language menu in both the header and footer.
When you hover over the sub-menu items the background should be green
and the text color white.
- Perform the same test in the self checkout and self checkin
interfaces.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Fri, 26 Apr 2019 13:55:31 +0000 (13:55 +0000)]
Bug 22537: Suspend all hold button appears even if the hold can no longer be suspended.
This patch adds to the user summary page in the OPAC a check for waiting
or in-transit holds. If all holds are waiting or in transit the "Suspend
all" controls will be hidden.
This patch also adds a missing $KohaDates filter to the "suspended
until" date.
To test, apply the patch and log in to the OPAC as a patron with holds.
Test these conditions:
- All holds are waiting and/or in transit
- The "Suspend holds" controls at the bottom of the page should not
appear.
- Some holds are waiting and/or in transit
- The "Suspend holds" controls should appear.
Signed-off-by: Marjorie <marjorie.barry-vila@collecto.ca> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Fri, 26 Apr 2019 13:35:18 +0000 (14:35 +0100)]
Bug 22461: (follow-up) Use `exists` not `defined`
Prior to this patch there is a regression in the LDAP replication
functionality such that clearing a field become impossible. This patch
restores that functionality.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Kyle M Hall [Wed, 24 Apr 2019 13:51:36 +0000 (09:51 -0400)]
Bug 22765: Add class beside loggedinusername to indicate if logged in user is a superlibrarian
It would be useful to know if a logged in user is a superlibrarian for the purpose of customization
using Javascript and CSS.
Test Plan:
1) Apply this patch, restart all the things
2) Log in as a superlibraraian
3) Note the new class 'is_superlibrarian' next to the 'loggedinusername' class
4) Log in as a non-superlibrarian
5) Note the new class is not present
Signed-off-by: Barton Chittenden <barton@bywatersolutions.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Wed, 17 Apr 2019 16:20:18 +0000 (16:20 +0000)]
Bug 15496: (follow-up) Update interaction for deleting records
This patch makes minor changes to markup and JavaScript to alter the
interaction for deleting the record. Now a successful deletion will
convert the dialog to a "message" type dialog and show only the success
message.
To test, apply the patch and test the process of attaching the last item
from a record and deleting that record.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Josef Moravec [Wed, 17 Apr 2019 10:47:06 +0000 (10:47 +0000)]
Bug 15496: (QA follow-up) Change success status on api
DELETE response code must be 204, not 200 according to our API coding
guidelines
Test plan:
prove t/db_dependent/api/v1/biblios.t
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Liz Rea [Mon, 15 Apr 2019 17:55:04 +0000 (17:55 +0000)]
Bug 15496: (QA follow-up) remove text/javascript
Make the QA tool happy for html5
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Kyle M Hall [Fri, 12 Apr 2019 17:50:32 +0000 (13:50 -0400)]
Bug 15496: Delete Bib After Moving Item
Librarians have requested the ability to delete records with no items
quickly and easily from the "Attach item" results page as items are
moved from one record to another.
Test Plan:
1) Apply this patch
2) Create 2 records with 2 items each
3) Move one item from record A to record B
4) You should see no change from pre-patch behavior
5) Move the second item from record A to record B
6) You should now see a "Delete record" button
7) Click the button
8) Note the record in question has been deleted
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Fridolin Somers [Thu, 28 Feb 2019 15:23:22 +0000 (16:23 +0100)]
Bug 10300: (follow-up) add controls on transfers page
This patch moves the check of IndependentBranchesTransfers pref to templates and adds permission test inside branchtransfers.pl.
It also corrects the libraries combobox in branchtransfers.tt, this list can contain all libraries, it is the access to the page that may be protected.
Additions to test plan :
1)
1.1) Enable CircSidebar
1.2) In circulation home page check the effect of IndependentBranchesTransfers on "Transfer" link
1.3) Go to return page and check then effect of IndependentBranchesTransfers on "Transfer" link
2)
2.1) In circ/branchtransfers.pl, with and without IndependentBranches you see all libraries are in combobox
3)
3.1) Set IndependentBranchesTransfers to no and go to circ/branchtransfers.pl
3.2) You are redirected to page 403 unless you are superlibarian
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Kyle M Hall [Thu, 25 Aug 2016 14:03:31 +0000 (14:03 +0000)]
Bug 10300: Allow transferring of items to be have separate IndependentBranches syspref
Some libraries want to have IndependentBranches enabled, but still be
able to transfer items between themselves.
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Enable IndpendentBranches and IndependentBranchesTransfers
4) Log in as a super librarian
5) Note you can transfer items
6) Log in as a non-super librarian
7) Note you cannot transfer items
8) Disable IndependentBranchesTransfers
9) Note you can now transfer items
Signed-off-by: Maribeth Shafer <mshafer@ckls.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Bug 10300: (QA follow-up) Make database update idempotent
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Kyle M Hall [Thu, 11 Apr 2019 14:05:14 +0000 (10:05 -0400)]
Bug 15496: Add API endoint for deleting a bib
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Wed, 16 Jan 2019 18:27:54 +0000 (18:27 +0000)]
Bug 22035: Improve local cover image browser page
This patch makes changes to the way local cover images are handled on
the image viewer page in the staff client. From this page you can now
delete images or reach the upload images page.
The patch also modifies slightly the process for deleting an image from
the images tab on the bibliographic detail page.
To test, apply the patch and regenerate the staff client CSS.
LocalCoverImages and AllowMultipleCovers should be enabled.
- Open the detail view for a record which has multiple cover images
attached. On the Images tab, click the "Delete image" link for an
image. After confirming, the link should change to a spinner icon and
image should fade out.
- Click one of the cover images to open the image viewer page. The
thumbnails should each have a delete link which looks like and
behaves like the delete links on the biblio detail page.
- Clicking an image thumbnail should load a spinner icon into the area
where the full-sized image was, which should be replaced by the image
you chose.
- There should be a button for uploading images which takes you to the
correct page for adding images to that record.
- The page title and breadcrumbs should show the title of the record.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Thu, 25 Apr 2019 11:35:24 +0000 (12:35 +0100)]
Bug 22200: (follow-up) Wrap accountline creation in a transaction
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Thu, 18 Apr 2019 08:44:01 +0000 (09:44 +0100)]
Bug 22200: Add credit when forgiving overdue
Prior to this patch the exemptfine option for_FixOverduesOnReturn would
directly set the overdue amount to 0 rather than creating an appropriate
credit of the type forgiven and offseting it against the debt.
Test Plan:
1) Find a checkout that is overdue with fines
2) Check the item in with the forgive fines option checked
3) Note that the users account details now shows the overdue as forgiven
and a forgiven credit is added which matches the overdue amount (and is
applied against it, i.e. both overdue and forgiven lines have 0
amountoutstanding).
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>