Nick Clemens [Fri, 24 Aug 2018 01:22:35 +0000 (01:22 +0000)]
Bug 18736: (follow-up) Fix missing rounding and bad formatting
This patch:
Adds a missing use
Uses 'Koha::Number::Price->round()' instead of 'format()' to ensure numeric
returns
Ensures too big numbers don't crash round()
Uses syspref in 'GetBudgetHierarchy'
To test:
Follow previous test plan
Check values on admin/aqbudgets.pl are affected by syspref
Ensure values throughout acquisitions are correctly calculated/displayed
(even when greater than 1,000)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Mark Tompsett [Tue, 17 Apr 2018 23:39:57 +0000 (23:39 +0000)]
Bug 18736: (follow-up) Add missing test cases
We now fully cover GetBudgetsPlanCell in these tests
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Tue, 17 Apr 2018 14:37:11 +0000 (14:37 +0000)]
Bug 18736: (follow-up) Add tests and FIXME for GetbudgetsPlanCell
prove t/db_dependent/Budgets.t
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Tue, 6 Jun 2017 14:37:17 +0000 (10:37 -0400)]
Bug 18736: Unit tests for rounding
Unit tests to highlight the issue
To test:
Prove t/db_dependent/Budgets.t
prove t/Acquisition.t
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Thu, 28 Dec 2017 15:15:47 +0000 (15:15 +0000)]
Bug 18736: Use rounding syspref to determine correct prices in calculations
To test:
Place an order (no tax just for simplicity)
listprice/rrp = 16.99
discount = 42%
quantity = 8
estimated calculated at 9.85
but order total is 78.83, but 8 times 9.85 = 78.80
Apply patches, set OrderPriceRounding syspref to 'Nearest cent'
Not order total is now as expected
View ordered.pl and confirm values are correct
Complete order, view invoice and confirm values
View spent.pl and confirm values
Go through acquisitions module and confirm prices throughout are
correct.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Thu, 28 Dec 2017 15:11:11 +0000 (15:11 +0000)]
Bug 18736: Add OrderPriceRounding syspref
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Josef Moravec [Wed, 20 Mar 2019 14:29:25 +0000 (14:29 +0000)]
Bug 22330: (QA follow-up) Enable datatable in patron search
Test plan:
Try to search patron for circulation (or for creating hold), when there
are more than 1 patron, you should see a table with patrons found.
--> without this patch, the datatable is not created (for example
sorting the table by clicking to column heading does not work)
--> with this patch, the datatable works
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Kyle M Hall [Mon, 11 Mar 2019 18:26:49 +0000 (14:26 -0400)]
Bug 22330: (QA follow-up) Remove duplicate use lines, combine and sort remaning lines
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Kyle M Hall [Wed, 13 Feb 2019 20:45:28 +0000 (15:45 -0500)]
Bug 22330: Cache item and library objects when building the holds queue
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Kyle M Hall [Fri, 8 Feb 2019 19:46:18 +0000 (14:46 -0500)]
Bug 22330: Transfer limits should be respected for placing holds in staff interface and APIs
Branch transfer limits are respected for placing holds in the OPAC but nowhere else. This should be remedied.
Test Plan:
1) Set up a branch transfer limit from Library A to Library B
2) Verify you cannot set up a hold for an item from Library A for pickup at Library B from the staff interface ( without overriding )
3) Verify you cannot place that hold via ILS-DI
4) Verify you cannot place that hold via SIP
4) Verify a forced hold from Library A to Library B will not show up in the holds queue
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Liz Rea [Mon, 4 Mar 2019 20:15:04 +0000 (20:15 +0000)]
Bug 19417: Make error just a wee more human
Small follow up to make the text explicitly say "Import of records
failed" instead of "Failed to submit form"
Users don't even know that they're submitting a form, what they think
they're doing is uploading records. Let's use their words instead of
developer words.
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Thu, 5 Oct 2017 15:26:46 +0000 (15:26 +0000)]
Bug 19417: Display full error text when problem importing records
To test:
1 - Upload a file to stage
2 - Select your import options
3 - Delete the file from the server, example:
sudo rm /tmp/koha_kohadev_uploads/
4 - 'Click stage for import'
5 - Get an alert 'Failed to submit form: error'
6 - Apply patches
7 - Repeat 1-4
8 - Get a pretty error with additional info
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>
This patch adds a hidden_in_opac method that does the same calculation
done in places like opac-tags.pl. The condition that is checked is that
all items belonging to the biblio are hidden. This is the current
behaviour in the code.
To test:
- Apply this patches
- Run:
$ kshell
k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds a hidden_in_opac method that does the same calculation
done in GetHiddenItemnumbers, but for a single item, and doesn't get the
OpacHiddenItems syspref, but expects them to be passed as parameters (to
avoid multiple reads).
To test:
- Apply this patches
- Run:
$ kshell
k$ prove t/db_dependent/Koha/Item.t
=> SUCCESS: Tests pass!
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Tue, 18 Dec 2018 19:10:14 +0000 (19:10 +0000)]
Bug 22023: Further improve responsive layout handling of staff client menu bar
This patch makes a number of changes in order to improve the way the
staff client's header menu adjusts at narrower browser widths:
- Updated version of Bootstrap 3.3.7 which includes the "collapse"
JavaScript plugin.
- Modified default Bootstrap CSS using Bootstrap's customization tool.
These changes facilitate the removal of some custom CSS (overriding
Bootstrap) from staff-global.scss.
- Added Bootstrap config file for loading customizations at
https://getbootstrap.com/docs/3.3/customize/
- Revised button classes for buttons in Bootstrap-styled toolbars.
The modified default CSS resets the base font size in Bootstrap to
better match our global CSS. A side-effect of this is that toolbar
buttons ended up looking smaller than they should. Changing the
button class solves this.
- Restructure the header menu in order to allow different rules to
govern the appearance of the navigational part of the menu
(Circulation, Search, etc) and the user menu (Set library, My
account, Log out).
- Modify the cart JS to so that the popup works well at narrow widths.
To test, apply the patch, regenerate the staff client CSS, and clear
your browser cache.
- Log in to the staff client and observe the layout of the header menu
as you adjust the browser to various widths.
- Confirm that sections of the menu "collapse" as the window gets
narrower.
- Confirm that dropdown menus behave correctly and that links work.
- Confirm that the Cart link works as expected when the cart empty
and when it has items.
- Install and enable multiple translations, including at least one
set of sub-languages (e.g. fr-FR and fr-CA).
- Test the appearance of the language menus in the footer at
various browser widths.
- View pages with button toolbars and confirm that they appear unchanged
(e.g. biblio detail page, patron detail page).
NOTE: While this patch is intended to make improvements to staff client
responsiveness, it does so within a limited scope. There are still many
pages which do not work well at narrower browser widths.
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Thu, 7 Mar 2019 14:04:23 +0000 (14:04 +0000)]
Bug 21756: (QA follow-up) Add offest types to installer file
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Fri, 22 Feb 2019 09:39:49 +0000 (09:39 +0000)]
Bug 21756: (QA follow-up) Add offset_types to database
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Required for add_enrolement_fee_if_needed within Koha::Patron
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Thu, 21 Feb 2019 08:41:29 +0000 (08:41 +0000)]
Bug 21756: (follow-up) Add test for deprecation warning
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Josef Moravec [Wed, 20 Feb 2019 13:05:38 +0000 (13:05 +0000)]
Bug 21756: (QA follow-up) Fix Circulation.t
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Wed, 20 Feb 2019 11:10:49 +0000 (11:10 +0000)]
Bug 21756: (QA follow-up) Correct the test for 'Lost Item' offsets
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Wed, 20 Feb 2019 10:43:47 +0000 (10:43 +0000)]
Bug 21756: (QA follow-up) Fix for 'Spurious text after =cut'
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Sat, 15 Dec 2018 16:16:33 +0000 (16:16 +0000)]
Bug 21756: Remove use of manualinvoice from Koha::Hold
Known Side Effect: Prior to this patch hold cancellation fees
were not recorded in the FinesLog. After this patch, if the
FinesLog is enabled then the 'action' will be recorded as
`create_hold_expiration`.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Sat, 15 Dec 2018 15:58:46 +0000 (15:58 +0000)]
Bug 21756: Remove use of manualinvoice from Koha::Patron
Known Side Effect: Prior to this patch enrolment fees were not
recorded in the FinesLog. After this patch, if the FinesLog is
enabled then the 'action' will be recorded as `create_account`.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Fridolin Somers [Thu, 7 Mar 2019 13:46:29 +0000 (14:46 +0100)]
Bug 21832: add is_expired to ILS-DI example
Test plan :
1) Apply patch
2) Enable ILS-DI
3) Go to <opac URL>/cgi-bin/koha/ilsdi.pl?service=Describe&verb=GetPatronInfo
4) Check you see is_expired in example response
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Fridolin Somers [Tue, 12 Feb 2019 14:52:22 +0000 (15:52 +0100)]
Bug 21832: add unit test
Adds a check that is_expired exists in service GetPatronInfo.
Test plan :
Run : prove t/db_dependent/ILSDI_Services.t
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: remove ref to bug number, we have git for that
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Fridolin Somers [Wed, 14 Nov 2018 10:18:58 +0000 (11:18 +0100)]
Bug 21832: Restore is_expired in ILS-DI GetPatronInfo service
Since Bug 17578 removed C4::Member::GetMemberDetails, the information "is_expired" disappeared from ILS-DI service GetPatronInfo.
I propose to restore in by adding the code that exisited in C4::Member::GetMemberDetails directly in C4::ILSDI::Services.
Test plan :
1) Enable ILS-DI webservice
2) Choose a patron not expired
3) Call web-service (replace X with patron's borrowernumber) :
/cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=X
4) You see : <is_expired>0</is_expired>
5) Choose a patron expired
6) Call web-service (replace X with patron's borrowernumber) :
/cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=X
7) You see : <is_expired>1</is_expired>
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Thu, 7 Mar 2019 15:06:26 +0000 (15:06 +0000)]
Bug 21070: request.pl details links to biblio instead of moredetail.pl for that item
This patch alters the hold summary page so that links to records with
item-level holds go to the item detail page instead of the bibliographic
detail page. There is already a link to the bibliographic detail page in
the page heading.
To test, apply the patch and place or locate an item-level hold. In the
list of existing holds for that record, the linked barcode on the
item-level hold should take you to the corresponding item detail page.
Signed-off-by: Lisette <lisettes@latahlibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Fri, 22 Feb 2019 14:27:07 +0000 (14:27 +0000)]
Bug 15911: Use noEnterSubmit CSS class instead of prevent_submit.js
This patch removes the use of a separate js file, prevent_submit.js, in
favor of using a CSS class to trigger the same functionality in
staff-global.js.
To test, apply the patch and test the following pages to confirm that
pressing "Enter" when the cursor is in any field in the main form does
not submit the form.
- In Acquisitions, add to a basket from a new (empty) record
- In Acquisitions, receive an order line
- In Serials, locate a subscription and open the "Edit serials" page
from the "Serial collection" page.
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Wed, 6 Mar 2019 15:24:01 +0000 (15:24 +0000)]
Bug 8775: (follow-up) Change column header to "Collection"
This patch changes the table heading for ccode to be "Collection"
instead of "Collection code." Current templates vary, but "Collection"
is more logical because we show the description, not the code.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Fri, 22 Feb 2019 14:00:37 +0000 (14:00 +0000)]
Bug 8775: Add collection code to lost report
This patch adds a column for collection code to the lost items report.
To test, apply the patch and run the lost items report. You should see a
collection code column.
Test column configuration for this table: Go to Administration ->
Configure columns. Confirm that the "collection_code" column can be
configured and that configuration choices are applied correctly.
Signed-off-by: Bin Wen <bin.wen@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Fri, 22 Feb 2019 17:29:36 +0000 (17:29 +0000)]
Bug 22399: Improve responsive behavior of the basic marc editor
This patch makes markup and style changes to the basic MARC editor in
order to improve the page's handling of smaller browser widths. It adds
Bootstrap grid markup to the form to help accomplish this.
To test, apply the patch and load a record for editing in the basic MARC
editor. Adjust your browser width and confirm that the form adjusts well
to various widths.
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>
Owen Leonard [Wed, 25 Apr 2018 16:28:18 +0000 (16:28 +0000)]
Bug 20658: Move template JavaScript to the footer: Installer and onboarding
This patch updates the installer and onboarding templates so that
JavaScript is included in the footer instead of the header. A new
include file is added, installer-intranet-bottom.inc, so that only
required JS is being loaded.
Some markup changes are included to improve validity.
To test, apply the patch and start with a blank Koha database. Run
through the installer and onboarding processes and confirm that there
are no problems. Check especially JS-related interactions like
datepickers and fields which are validated via JS, like the password
inputs.
NOTE: The qa tool will flag this patch for not using the Asset plugin,
but it doesn't work correctly for installer files.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Katrin Fischer [Mon, 4 Feb 2019 20:36:08 +0000 (21:36 +0100)]
Bug 18952: Add internal note to acq details tab
Any important notes about an order are usually added to the
internal note. This patch makes the note visible on the
acq detail tab in the staff client.
To test:
- Add a basket
- Order something
- Add an internal note for the order
- Go to the detail page of the ordered record
- Switch to the Acquisition details tab
- Verify that with the patch the internal note shows
- Verify that the new column can be toggled using the
column visibility settings
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch changes expiration_date for end_date as voted when the RFC
was approved.
It also adds a test for the Location header being added correctly when
suspending a hold (SWAGGER3.4.1)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
- POST /holds/{hold_id}/suspension { "expiration_date": "2019-01-30" }
- DELETE /holds/{hold_id}/suspension
to suspend a hold or resume a suspended hold, respectively.
To test:
- Apply this patches
- Run:
$ kshell
k$ prove t/db_dependent/api/v1/holds.t
=> SUCCESS: Tests pass!
- Sign off :-D
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>
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>
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>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes holds.js call the endpoint with 'pickup_library_id'
instead of the old 'branchcode' property.
To test:
- Place a hold
- Go to the patron's detail page
- Go to the Holds tab
- Change the pickup location
=> SUCCESS: It works!
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes the /holds endpoint respect the voted RFC. Some
behaviours are changed as well:
- As we voted to introduce a /public namespace for unprivileged access to
endpoints, this endpoint gets the ability for owners and guarantors to
manipulate holds through the API.
- GET /holds now uses the objects->search helper, so it now has
pagination.
To test:
- Apply this patches
- Run:
$ kshell
k$ prove t/db_dependent/api/v1/holds.t
=> SUCCESS: Tests pass!
- Sign off :-D
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes the holds endpoint tests pass and expect data structures that match the voted RFC.
As we voted to introduce a /public namespace for unprivileged access to
endpoints, this endpoint gets the ability for owners and guarantors to
manipulate holds through the API.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Fri, 13 Apr 2018 08:22:26 +0000 (09:22 +0100)]
Bug 20563: Allow display of requested partners
This patch adds the display of requested partner email addresses when an
ILL backend provides the ability to send requests to partners. Partner
email addresses are displayed in the illlist and illview displays, they
are also included in the 'illrequests' API response.
* api/v1/swagger/paths/illrequests.json:
- Add 'requested_partners' as an 'embed' enum
* Koha/Illrequest.pm:
- Add 'requested_partners' accessor calling optional backend 'get_requested_partners' method.
- Store requested partners upon email send, calling optional backend 'set_requested_partners' method.
- Add 'requested_parners' embed to overloaded TO_JSON method.
* koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt:
- Add 'requested_partners' embed to illrequests API call
- Add render function for "Additional status" datatables column
- Add display of requested partner email addresses to illlist table
- Add display of requested partner email addresses to illview display
To test:
1) Enable Interlibrary loans
2) Add a backend that supports sending requests to partners, e.g.
FreeForm
3) Set up at least one partner
4) Create an ILL request
5) Send request to partner(s)
6) Observe partner(s) email address(es) are displayed in "View ILL
requests" view
7) Observe partner(s) email address(es) are displayed in "Manage ILL
request" view
As requested by Josef on IRC, we now mock the unmediated_ill backend
method and ensure it is called when the ILLModuleUnmediated syspref is
enabled and ensure it is not called when the syspref is disabled
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Thu, 26 Apr 2018 11:04:58 +0000 (12:04 +0100)]
Bug 18837: Introduce delegation to backends for unmediated workflows
This patch adds support to Illrequest.pm to allow delegation of
unmediated requests to happen in backends that support them.
It is a recreation of
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66629&action=diff
which had diverged sufficiently as to make it impossible to apply
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk> Signed-off-by: David Peacock <d.m.peacock@herts.ac.uk> Signed-off-by: Jayne Maisey <j.maisey@herts.ac.uk> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Thu, 26 Apr 2018 10:56:19 +0000 (11:56 +0100)]
Bug 18837: Add ILL Unmediated syspref stuff
This patch adds the syspref requirements for unmediated ILL requests. It
is a recreation of
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=66628&action=diff
which had diverged sufficiently as to make it impossible to apply.
* installer/data/mysql/atomicupdate/illunmediated_tables.sql: New
file.
* installer/data/mysql/sysprefs.sql: Add `ILLModuleUnmediated`.
* koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref:
Add `ILLModuleUnmediated` handling.
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk> Signed-off-by: David Peacock <d.m.peacock@herts.ac.uk> Signed-off-by: Jayne Maisey <j.maisey@herts.ac.uk> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Thu, 12 Jul 2018 10:12:00 +0000 (11:12 +0100)]
Bug 21063: Add "Columns settings" for ILL
This patch adds the "Columns settings" values for the illrequests table
Signed-off-by: Niamh.Walker-Headon@it-tallaght.ie Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Bug 21063: Add ability to show / hide columns
This patch adds the "Column visibility" functionality to the main ILL
request list table.
To test:
- Ensure ILL is enabled and you have some requests
- Apply patch
- From the "Koha administration screen, select "Configure columns"
- In the "Columns settings" page:
=> TEST: Ensure an "Interlibrary loans" category exists
- Upon expanding the category:
=> TEST: Ensure a table is displayed showing columns
=> TEST: Ensure the "action" column has "Cannot be toggled"
pre-selected
=> TEST: Change values for columns and ensure they're saved
- From the main staff menu, select "ILL requests"
- In the table:
=> TEST: Click the "Column visibility" button and ensure a modal
containing all columns (except "Action") is displayed
=> TEST: Select various columns and ensure they are shown and hidden
Signed-off-by: Niamh.Walker-Headon@it-tallaght.ie Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Bug 21063: (follow-up) Add user ID to column list
As originally specified in bug 20883, there is a requirement for some
users to be able to display the user ID (borrowernumber) in the UI.
This patch adds that ability to this bug, 20883 will be marked as a
duplicate of this one.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Bug 21063: (follow-up) Amendments for rebase
Modify to add the additional changes required now we're rebasing on top
of the dependency tree. Includes adding additional columns (and changing
indexes for search/filter where appropriate)
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Bug 21063: (follow-up) Add comments to column list
Since this bug is now dependent on Bug 18591 (Allow an arbitrary number
of comments on ILLs) we need to add the comments column to this table
and the list of selectable columns. This patch does this.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Bug 21063: (follow-up) Sanitize datatable data
This mitigates bug 22268 by sanitizing data prior to display using the
built in $.fn.dataTable.render.text() helper provided by Datatables.
The patch was added here, rather that in 22268 since this is the bug
that introduced the problem by increasing the number of fields that are
displayed in the table, some of which could contain user provided
malicious data
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Josef Moravec [Thu, 28 Feb 2019 11:14:46 +0000 (11:14 +0000)]
Bug 20750: (QA follow-up) Fix templates
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Bug 20750: (follow-up) Remove status_alias test
This test is now redundant.
We can't test the return of $req->status_alias against the value of
$req->{status_alias} any more since we've overloaded the status_alias
method and it won't always return the value of the object's property.
We test the functionality of the status_alias method elsewhere so we're
still covered.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch allows logging of arbitrary actions on request objects. A
chronological summary of these actions can then be displayed when
viewing a request.
This patch also adds logging of request status changes. Additional work
has been done on the BLDSS backend to log requests to the BLDSS request
status check API.
To test:
- Apply patch
- Ensure the Illlog logging preference is turned on
- Create an ILL request and perform actions on it that change it's
status.
- Navigate to the "Manage ILL request" screen
- Click the "Display request log" button
- Observe that a modal opens displaying a summary of the status changes.
Signed-off-by: Niamh Walker <Niamh.Walker-Headon@it-tallaght.ie> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Since this bug now is dependent on Bug 20581, it should be aware of the
custom statuses provided in 20581. This patch enables logging of request
statuses being changed to custom ones. As such the test plan is
modified:
To test:
- Apply patch
- Ensure the Illlog logging preference is turned on
- Ensure you have some custom request statuses defined in the
Authorised Values ILLSTATUS category
- Create an ILL request and perform actions on it that change it's
status.
- Edit the request and change status to a custom one
- Navigate to the "Manage ILL request" screen
- Click the "Display request log" button
- Observe that a modal opens displaying a summary of the status changes.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Fridolin Somers [Fri, 25 May 2018 14:51:15 +0000 (16:51 +0200)]
Bug 20823: UNIMARC XSLT add subfield t for subjects
In UNIMARC, 604 contains subfield t, see http://multimedia.bnf.fr/unimarcb_trad/B604-6-2011.pdf.
Actual XSLT files use template tag_subject for 604, it does not use t subfield.
This patch adds subfield t to tag_subject and tag_onesubject templates in intranet and OPAC XSLT files.
Test plan :
1) In UNIMARC catalog edit a biblio record to add 604$t
2) Use default XSLT files in sysprefs
2) Go to catalogue details page of this record using default XSLT files
3) Check $t is displayed at OPAC and intranet
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Test plan:
0/ Do not apply this patch
1/ Place several holds on a given item
2/ Use the inventory with the "skip waiting holds" option to list this item.
It will be displayed several times
3/ Apply this patch and confirm that the item is now only displayed once
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Mon, 4 Mar 2019 19:52:30 +0000 (16:52 -0300)]
Bug 22219: Add tests
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Thu, 7 Mar 2019 17:28:34 +0000 (17:28 +0000)]
Bug 22477: Missing DataTables configuration when searching patrons for holds
This patch adds columns configuration to the holds request page to fix a
JavaScript error in the console and to allow the patron search results
table to be enabled as a DataTable.
To reproduce: Place a hold on a title in the staff client. When prompted
for a patron, perform a search which will return multiple results. The
patron search results will appear in an unsortable table. A JS error can
be seen in the browser console.
To test, apply the patch and repeat the steps above. The patron search
results table should be sortable and there should be no JS error.
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Bin Wen <bin.wen@inlibro.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds a maintenance script that generates the missing
tags_approval entries based on the tags_all table, and then recalculates
the weights for both tags_approval and tags_index tables.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 21846: Make 'term' use utf8mb_bin collation on tags tables
This patch makes the utf8mb4_bin collation preferred for comparing tags.
Otherwise suppolemental unicode characters all match.
To test:
- Enable tags and disable moderation (or plan to moderate and accept tags)
- Tag 3 records:
a - with 🐋
b - with 🌮
c - with 👍
- Note the weight on each says '3'
- Click the tag to search, you get back all the records
- Apply the previous patches from this bug report
- Run:
$ kshell
k$ prove t/db_dependent/Tags.t
=> FAIL: Tests fail, related to counting stuffs
- Apply this patch and
(a) Run updatedatabase to upgrade the schema
- Run:
k$ prove t/db_dependent/Tags.t
=> SUCCESS: Tests pass!
(b) reset_all to get a fresh DB using kohastructure.sql
- Run:
k$ prove t/db_dependent/Tags.t
=> SUCCESS: Tests pass too!
- Sign off :-D
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Due to collation issues, add_tag_approval wrongly calculates
the weight for strings including extended UNICODE characters.
This patch introduces a test for this situation.
To test:
- Apply this patch on master
- Run:
$ kshell
k$ prove t/db_dependent/Tags.t
=> FAIL: Tests fail because all extended characters match the same
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 21846: Add Koha::Tags::Approval(s) and Koha::Tags::Index(es)
In order to avoid writing the tests using plain DBIC which would later
need to be replaced by a Koha::Object-based counterpart, I introduce
this stub classes.
Stub tests are added as well.
To test:
- Apply this patch
- Run:
$ kshell
k$ prove t/db_dependent/Koha/Tags.t \
t/db_dependent/Koha/Tags/Approvals.t \
t/db_dependent/Koha/Tags/Indexes.t
=> SUCCESS: Tests pass
- Sign off :-D
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Tue, 18 Dec 2018 17:02:19 +0000 (14:02 -0300)]
Bug 21987: Do not generate true color thumbnails if not needed
If the original image is not a true color image we should not generate a
true color thumbnail.
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Tue, 18 Dec 2018 17:02:14 +0000 (14:02 -0300)]
Bug 21987: Add tests
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Mon, 11 Mar 2019 14:47:01 +0000 (14:47 +0000)]
Bug 22493: Clean up DecreaseLoanHighHolds.t
To test:
1 - prove -v t/db_dependent/DecreaseLoanHighHolds.t
2 - should pass
3 - read code, confirm changes make sense
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>
We were passing around possibly undefined $return_date variables from
AddReturn and then instantiating a new DateTime object as a default for
each routine. This followup sets the default higher up the stack within
AddReturn which provider clearer logic and a small performance
improvment.
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, 14 Mar 2019 12:20:53 +0000 (08:20 -0400)]
Bug 14591: Update unit tests
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, 14 Mar 2019 11:58:09 +0000 (07:58 -0400)]
Bug 14591: Update other calls to AddReturn
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, 14 Mar 2019 11:54:09 +0000 (07:54 -0400)]
Bug 14591: book drop / drop box mode incorrectly decrements accrued overdue fines
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>