Commit graph

21 commits

Author SHA1 Message Date
Andrew Isherwood
a8435679d4 Bug 20563: (follow-up) Fix rebasing bug
Fix erroneous curly brackets

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-15 19:33:37 +00:00
Andrew Isherwood
7c14483010 Bug 20581: (follow-up) Passed value to status_alias
Now we have overloaded status_alias, we can no longer pass it undef (as
it uses that to determine if it's being used as a getter or setter). So
we now pass it -1 to indicate it should actually be setting undef (a
hack, I know, but what are you going to do...)

This patch makes sure ill-request.pl conforms to that. It also fixes the
testing of the passed parameter, which was wrong.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-02-22 14:31:31 +00:00
Andrew Isherwood
39471ea912 Bug 20581: (follow-up) Do not use PK for AV FK
As per:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20581#c133

We switch from using authorised_values.id when creating the foreign key
illrequests.status_alias, we now use authorised_values.authorised_value

I have added a migration from using id -> authorised_value, so when
existing users of this bug get this version, their DB migrates nicely
instead of just breaking.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-02-22 14:31:31 +00:00
Andrew Isherwood
5e0e8246be Bug 20581: (follow-up) Fix AV population
As per:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20581#c72

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-02-22 14:31:31 +00:00
Andrew Isherwood
85c9b7fb3a Bug 20581: Add display of status_alias to staff vw
- This patch adds display of the new status_alias value, when set, in
favour of the request's status value.
- It also allows the user to set a status_alias for an existing request.
When set, this value will be displayed in preference to the status.

Signed-off-by: Niamh.Walker-Headon@it-tallaght.ie

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-02-22 14:31:31 +00:00
85432a1f4c Bug 20640: (follow-up) Make error message translatable
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-01-28 13:06:31 +00:00
14d6a10de9 Bug 20640: (follow-up) Redirect to new request at completion
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-01-28 13:06:30 +00:00
cdf0d7640f Bug 20640: (follow-up) Degrade gracefully on error
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-01-28 13:06:29 +00:00
bf48a24277 Bug 20640: Add backend migration support to ILL
- Add core methods required to support the migration of ILL requests
between backends.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-01-28 13:06:29 +00:00
Andrew Isherwood
1c8952a36b Bug 20996: Remove prefix use of borrower category
This patch removes the potential use of borrower category as a ILL
request ID prefix. It makes no sense. We provide the ability for a site
to define a request prefix based on branch, there is no use case for
using the borrower category. Add to this that the borrower for every
request was being retrieved in order to get the category, it's a huge
performance hit also.

We also now require the <branch> block in the <interlibrary_loans> block
and complain if it's not present. The request prefix should be defined
in this block.

This patch also improves the performance of the API request that returns all
requests, optionally including additional data.

It also deprecates the overloaded TO_JSON method and moves the request
augmentation code into the API route's controller. It may be that we
want to shift it out of there at some point, but it is fine where it is
for now.

Signed-off-by: Magnus Enger <magnus@libriotech.no>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-11-02 10:33:02 +00:00
Andrew Isherwood
74f2a90324 Bug 20941: (follow-up) Switch 'media' -> 'types'
Clearing up the inconsistency mentioned in comment #35. There is one
place where we use the term 'media' for a template variable, everywhere
we refer to material types as 'types'.

NOTE: This is a breaking change for existing backends that still use
'media'. Of the PTFS Europe backends, only the Koha backend uses it,
this will be modified as necessary. Generally backends will supply this
variable themselves, so the breaking-ness of this change should be
minimal.

No test plan as it's backend dependent.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-31 13:45:57 +00:00
Magnus Enger
2460eb0597 Bug 18591: Allow any number of comments on ILLs
This patch makes it possible to add arbitrary comments to ILL
requests. Comments are read only and displayed in chronological
order. Comments can be added by librarians, but also added automatically
based on comments in the different protocols, so that comments from the
lending library can also be added.

To test:
- Enable the ILL module ("ILLModule" syspref + config in koha-conf.xml)
- Install the Dummy backend from here:
  https://github.com/PTFS-Europe/Dummy
- Create a Dummy ILL request
- Add comments to the request, checking that the name and borrowernumber
  of the person that added the comment is displayed ok
- Check that the displayed date and time the comment was submitted follows
  the "dateformat" syspref
- On the "List requests" page, check that the correct number of comments
  is displayed in the "Comments" column
- Check that the tests pass:
  prove t/db_dependent/Illcomments.t

Signed-off-by: andrew.isherwood@ptfs-europe.com

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-27 13:15:58 +00:00
Andrew Isherwood
a1b4941ab8 Bug 20772: Display and edit of price_paid
Signed-off-by: Barry Cannon <bc@interleaf.ie>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2018-10-13 08:34:33 -03:00
Andrew Isherwood
fca5a1cb3d Bug 21289: Fix "isa" bug during partner request
We cannot call 'handle_commit_maybe' inside a 'try' block.
handle_commit_maybe redirects the client then calls 'exit', this is
interpreted as an error and the 'catch' block is erroneously called.

This patch moves the calling of 'handle_commit_maybe' outside the try
block, it will only be reached if everything inside the try block
suceeds.

To test:
1) Enable ILL and have the FreeForm backend available
2) Create a patron category to hold ILL "partners" to whom requests can
be sent. The category can be called anything, you should note the code
you assign
3) Create a patron that belongs to your new category, the patron must
have a primary email defined.
4) In your <interlibrary_loans> block in koha-conf.xml, ensure you have
a <partner_code> element, it should contain the code you assigned in
step 2
5) Create an ILL request using the FreeForm backend
6) Once the request is created, select the "Place request with partners"
button
7) Select your "partner" from the "Select partner libraries" box
8) Click "Send email"
9) TEST: Observe no errors are displayed in the UI

Signed-off-by: Barry Cannon <bc@interleaf.ie>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-10-01 11:03:48 +00:00
Andrew Isherwood
fbd233db5a Bug 20556: Marking ILL request as complete..
When marking a request as complete, the status is updated internally
then the user to redirected to the view of the request.

Although the redirect header is sent, there is no exit to indicate that
the program flow should stop. As a result, an attempt is made to render
the template, which fails.

This patch simply adds the missing exit.

TEST PLAN
---------

- Create an ILL request
- "Manage request" > "Confirm request"
- "Mark completed"
- TEST: Ensure that no error is written to the error log upon clicking
"Mark completed"

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-04-20 11:42:00 -03:00
45a8737721 Bug 7317: Display all the libraries, not only one
Before this patch only the first library defined in the system where
displayed.
TODO: Make sure we want to display all the libraries and not a
"filtered" list
see `git grep PROCESS options_for_libraries libraries|grep unfiltered`

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-11-09 13:31:10 -03:00
af59238ba0 Bug 7317: (followup) Remove extra columns from backends on the main list
This patch removes the extra columns functionality, simplifying the code.
It removes redundant code (in both Perl and JS), unused vars.

It removes the use of here_link and hardcodes the script path on the template.

It also adjusts the AJAX call so it uses the 'library' param instead of 'branch'.

The library column now displays the library name instead of the ID.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-11-09 11:42:16 -03:00
f747b10b69 Bug 7317: Handle missing email addresses gracefuly
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-11-09 11:42:15 -03:00
06f9e5fe3a Bug 7317: Handle backend absense more gracefuly
5/ This patch makes Koha::Illrequest->load_backend raise an exception
if the passed backend is invalid. This way we will catch more errors introduced.

The patch also disables the 'New Ill request' when no backends are available. Gets
rid of a related warnings.

Both OPAC and Intranet now display a warning message when no backends
are available.

Tests are added for the load_backend changes.

4/ This patch fixes the path for the checkboxes jquery plugin, and removes the include
for tablesorter, as this implementation uses Datatables. This is obviously code for older
Koha, ported to master.

TODO: There's something wrong on the styling. My idea is to get rid
of the custom column visualization tool, and have it display as regular
DataTables. We can then introduce the use of colvis on a separate bug
report.

Note: POD coverage for the exceptions file is wrongly tested. It is a false positive.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-11-09 11:42:14 -03:00
2d971d15b5 Bug 7317: (QA folowup) 404 if module is disabled (intranet)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-11-09 11:42:13 -03:00
Alex Sassmannshausen
8e86b5e093 Bug 7317: Interlibrary loans framework for Koha.
This Commit is at the heart of adding an interlibrary loans framework
for Koha.  The framework does not prescribe a particular workflow.
Instead it provides a general framework that can be extended &
implemented by individual backends whose responsibility it is to
implement a specific workflow.

The module is largely self-sufficient: it adds new tables to the Koha
database and touches only a few files in the Koha source tree.

Primarily, we add our files to the Makefile and the koha-conf.xml,
define ill paths for the REST API, and introduce links from the main
intranet, opac pages & user permissions.

Outside of this we simply add new files & functionality.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-11-09 11:42:12 -03:00