Commit graph

656 commits

Author SHA1 Message Date
234cced91d Bug 24108: Make export file names consistent
This patch renames the systempreference to be a bit clearer and uses
explicit options rather than a yes/no

Additionally it standardizes the export from the advanced cataloging editor
with that from the details page

To test:
 1 - Apply patches
 2 - Update database and restart all the things
 3 - Open a record in the advanced editor and save it as marc and xml
 4 - Note the file name is 'bib-{biblionumber.{format}'
 5 - Edit the syspref 'DefaultSaveRecordFileID' to be control number
 6 - Repeate 3-4 on a record with and without a control number
 7 - If control number present fiule name should be 'record-{controlnumber}.{format}'
 8 - Otherwise it should be as above
 9 - Repeat tests from the details page of a record
10 - Repeat tests from the opac details page of a record

Signed-off-by: David Nind <david@davidnind.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-17 16:28:25 +01:00
832aa322a8 Bug 23763: Make search on staff and opac use new routine
To test:
1 - Apply patch
2 - Search on staff and opac side
3 - Confirm you can paginate results
4 - Confirm you see 10 pages on pagination if under page 10
5 - Confirm you see 20 pages in pagination if over page 10
6 - Confirm you can go to first or last page

Signed-off-by: David Nind <david@davidnind.com>

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

JD amended patch: perltidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-08 17:09:32 +01:00
ff2c52e093 Bug 26707: Split cart and lists button on bibliographic detail pages
This patch modifies the toolbar shown on bibliographic detail pages so
that the "Add to cart" and "Add to lists" buttons are separate. The "Add
to cart" will now reflect whether the title is in the cart. The "Add to
lists" button will now be a menu of list choices like it is on the
search results page.

To test, apply the patch and rebuild the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Search for a title in the staff client and view the detail page for one
of the results.

Testing the cart button:

- In the toolbar you should see an "Add to cart" button and an "Add to
  lists" menu button.
- Clicking the "Add to cart" button should show the cart message
  associated with cart link in the header.
  - The label showing the number of items in the cart should be
    incremented.
  - The button  should change to a "Remove from cart" button.
- Clicking the "Remove from cart" button should correctly remove the
  item from the cart:
  - The label showing the number of items in the cart should be
    decremented.
  - The button should change to "Add to cart."
- Add a title to the cart and click the cart link in the header to open
  the cart pop-up window.
  - Click the "Empty and close" button in the cart window.
  - After you confirm the cart window should close. The "Remove from
    cart" button should now be an "Add to cart" button.
- Add a title to the cart and navigate between each of the other views
  of that title: Normal, MARC, Labeled MARC, and ISBD. On each page you
  should see a "Remove from cart" button.
- Test the add and remove functions from each of the other bibliographic
  detail views.

Testing the lists button:

- On the normal bibliographic detail page you should see an "Add to
  list" menu button. Clicking it should reveal the same kind of lists
  menu you see on the catalog search results page, with recent public
  and private lists and options for "More lists" and "New list."
  - Test that each of these options works correctly to trigger the
    expected pop-up window.
  - Confrim that the correct title is added to the correct list.
- Perform this test from each of the bibliographic detail pages: Normal,
  MARC, Labeled MARC, and ISBD.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-04 16:31:29 +01:00
45400055e4 Bug 23475: Use localStorage to preserve simple search values
To test:
1 - Enable IntranetCatalogSearchPulldown
2 - Perform a search that brings you to a single title
3 - Note the search is not displayed on the details page
4 - Apply patch
5 - Repeat
6 - Note the search is retained on details page
7 - Try with different dropdown values and search terms
8 - Test search terms including accented characters etc

Signed-off-by: David Nind <david@davidnind.com>

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

Bug 23475: (follow-up) Fix selectors and stray use statements

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-30 11:14:58 +01:00
0833724afe Bug 26032: (follow-up) show 'is new' filter only if items.new_status is used
Also adds a class 'item-new-status' to this filter to be able to hidde
even if items.new_status used.

Addition to test plan:
1) Apply on a database without Koha to MARC mapping on items.new_status
2) Check you dont see the 'is new' filter in items search form
3) Apply on a database with Koha to MARC mapping on items.new_status
4) Check you see class 'form-field item-new-status'

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
8a874de3f4 Bug 26032: Add 'is new' filter in items search
In items search, add a filter on value of items.new_status with a Ignore/Yes/No.
Yes meaning != 0, No meaning = 0, with considering that NULL value is like 0.

This patch adds 'isnull' option to filter, this may be reused on other
fields.

Test plan :
1) Define an item subfield on items.new_status with authorised values YES_NO (0 or 1)
2) Edit an item A to set new_status=1
3) Edit an item B to set new_status=0
4) Perform an item search with 'is new' = 'ignore' => you get all items
5) Perform an item search with 'is new' = 'yes' => you get item A
6) Perform an item search with 'is new' = 'no' => you get all items but A

Signed-off-by: Emmi Takkinen <emmi.takkinen@outlook.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
Julian Maurice
96cc447045 Bug 25898: Prohibit indirect object notation
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 12:56:30 +02:00
7478b94306 Bug 26145: Correctly preserve itemnumber value
In order to know we are dealing with the cover images of a specific item
we need to pass it though the different forms.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
a06223a20d Bug 26145: Allow multi covers per item
In this patch we remove the limitation of 1 cover image per item

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
7bc87ce75e Bug 26145: Refactoring - Move C4::Images to Koha::CoverImages
Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
c3f2993bdb Bug 26145: Add the ability to upload a cover image per item
This patchset adds the ability to attach cover images at item level.
This commit message will explain the different patches that are
following.

The main idea is to have cover images for a given item. This is useful
for a bibliographic record linked with a subscription. Each item could
have the cover image for the serial numbers.

In this first patch there is a limitation to allow only 1 cover per
item, but a later patch will remove it. That way we will take advantage
of the recent work done to display nicely cover images (bug 25031), and
reuse it in this development (staff interface only).

In order to use a flexible and robust code, the legacy C4 code
(C4::Images) has been moved to Koha::CoverImages. Also the DB table
biblioimages has been renamed cover_images.

Test plan (for the whole patch set):
0. Turn off AllowMultipleCovers
1. Create a new bibliographic record and items
2. Attach a cover image to the bibliographic record
3. In the item list of the bibliographic detail page, you will notice a
new "Upload image" action. Select it
4. Select an image
=> Notice the new column in the item table
5. Upload another image
=> You cannot upload 2 images, you are going to replace the existing one
6. Turn on AllowMultipleCovers
7. Attach another image to the image
=> Notice the 2 images are displayed nicely, with navigation controls
8. Confirm you can view an image if you click on it and you can delete it
9. Test the OPAC view now
=> Cover image for items are displayed in the table, there is no
navigation controls here however.

Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
fec3cf23f1 Bug 24155: Apply weights if not advanced search
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
e474df6402 Bug 24155: Make weighting an option on advanced search
Currently we apply weighting to all searches except advanced search. The theory
being that when selecting indexes we don't want to apply weights. When searching
in ES weights are only applied to relevant results so it doesn't matter.

i.e. if weighting author*100 but searching subject, a term matching the subject search in author
is not boosted.

Given this, we should always apply weights, unless the user wishes not to

To test:
1 - Set some weighting
2 - Do some searches
3 - Note your terms and results, try advanced and regular searches specifying indexes or not
4 - Apply patch
5 - Note that opac and staff advanced search have option to apply weights
6 - Compare searches after the patch to see how weighting affects, it should be beneficial or not at all

Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
3d37f6f08c Bug 26458: Get item details using only itemnumber
This patch modifies moredetail.pl so that it can accept an itemnumber as
a single parameter.

To test, apply the patch and view a bibliographic record in the
catalog which has one or more items.

 - In the table showing holdings, click the barcode to view the item
   detail page for that item.
 - In the location bar, modify the URL so that it uses only the
   itemnumber parameter, e.g.

   /cgi-bin/koha/catalogue/moredetail.pl?itemnumber=1234

   The page should load correctly, showing information about just that
   item.

Signed-off-by: David Nind <david@davidnind.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-30 16:15:33 +02:00
Katrin Fischer
bb73c5343c Bug 15851: (QA follow-up) Fix booleans to uppercase to make this work for Elasticsearch and UseControlNumber
Same test plan as before, but with UseControlNumber = Use and
Elasticsearch.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-03 14:18:23 +02:00
8da73fe428 Bug 15851: (follow-up) Only display the analytics link when required (staff)
This patch replicates the introduced behaviour, for the admin interface.
To test, follow the test plan from the OPAC, but on the intranet.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-03 14:18:23 +02:00
017e19567a Bug 24663: (follow-up) Remove authnotrequired if set to 0
2 newly added scripts

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-03 10:40:35 +02:00
638786e719 Bug 24663: Remove authnotrequired if set to 0
It defaults to 0 in get_template_and_user

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-03 10:40:35 +02:00
Agustin Moyano
c1be2b8817 Bug 19889: (follow-up) Fix few minor things
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

JD amended patch: remove unecessary indentation changes

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-31 16:17:58 +02:00
cb9c48a6f6 Bug 19889: Add feedback when exclusion is updated on moredetail.pl
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-31 16:17:58 +02:00
Agustin Moyano
bcf9b259c5 Bug 19889: Make it possible to exclude items and categories from local holds priority
This patch adds the ability to exclude patrons (by category) from local
holds, and items, by editing the item itself or by batch item
modification tool.

To test:
1. apply patches
2. updatedatabase
3. Enable LocalHoldsPriority preference, and leave
   LocalHoldsPriorityPatronControl in pickup library, and
LocalHoldsPriorityItemControl in holding library.
4. Search for a biblio with one item.
5. Place a hold with a patron (patron1) and set pickup location to a different
   library of the item's home library
6. Place another hold with another patron (patron2) and set pickup location to be
   the same as the item's home library
7. ./misc/cronjobs/holds/build_holds_queue.pl
8. Go to circulation -> holds queue
9. Search by the item's home library
CHECK => only the hold for patron2 (with the pickup location the same as the
item's home library) appears in the table
10. Go back to the biblio details page and click on "Items" tab
CHECK => There is a new section in the item's details between "Statuses"
and "History" called "Priority"
11. Set exclude to "Yes" and update
12. repeat steps 7 to 9
SUCCESS => only the hold for patron1 now appears, even the other hold had local
hold priority
13. Repeat step 10 and 11 but this time set exclude to "No"
14. repeat steps 7 to 9
CHECK => the hold for patron2 is back
15. Edit patron2's category and set exclude from local holds priority to
    "Yes"
16. Repeat steps 7 to 9
SUCCESS => the hold for patron1 is back
17. Go to tools -> Batch item modification and in barcode list place
    several (existing) barcodes and press continue
CHECK => There is a new section in the bottom called "Priority"
18. Set exclude to "Yes" and save
SUCCESS => all items in the list now have exclude setted to "Yes"
19. Try to checkout the first item to a patron3
SUCCESS => Alert message appears saying that patron1 has a hold on that
item
20. Click on Yes and then checkin that item
SUCCESS => There is a modal window saying that a hold was found for
patron1
21. prove t/db_dependent/HoldsQueue.t t/db_dependent/Holds/LocalHoldsPriority.t
22. Sign off

Sponsored-by: Cooperative Information Network (CIN)

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-31 16:17:58 +02:00
add2f752b9 Bug 26139: Centralize code for "Place hold" button (detail)
There is a "norequest" boolean passed to the include cat-toolbar.inc, to
display or not the "Pace hold" button.
This flag was not calculated in some place (ISBDdetail and moredetail
for instance)

Here we centralize the code to make it more robust and less regression
prone.

Note that the same problem appears at the OPAC (opac-MARCdetail is
always display the button). That will have to be fixed separately

Test plan:
Create biblio A with 0 item, B and C with 1 item and D with 2 items
item for B is not for loan, C is for loan and D has 1 of each
Go to the bibliographic detail page of each record and confirm that the
"Place hold" button appears appropriately.
Test the different tabs of the catalogue module

QA note: This patch is only centralizing the existing code, but it is
still too naive. To manage the visibility of this button we certainly
want to copy what is done in C4::Search::searchResults:
  # can place a hold on a item if
  # not lost nor withdrawn
  # not damaged unless AllowHoldsOnDamagedItems is true
  # item is either for loan or on order (notforloan < 0)
  $can_place_holds = 1
    if (
         !$item->{itemlost}
      && !$item->{withdrawn}
      && ( !$item->{damaged} || C4::Context->preference('AllowHoldsOnDamagedItems') )
      && ( !$item->{notforloan} || $item->{notforloan} < 0 )
    );

Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-25 11:31:49 +02:00
fbd727869f Bug 23166: Remove filtering from controllers
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-25 11:31:49 +02:00
f563c5a8e9 Bug 23166: Replace the count of orders with Koha::Acq::Orders
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-25 11:31:49 +02:00
03bcf66273 Bug 23166: Remove baskets_deletedorders code
This is never used.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-25 11:31:49 +02:00
d073755a66 Bug 23166: Remove baskets_orders code
This is never used.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-25 11:31:49 +02:00
Chris Cormack
782688a7cd Bug 8732: Allowing biblio level itemtypes to display instead of MARC ones
This patchset adds a new syspref: BiblioItemtypeInfo

If you set BiblioItemtypeInfo to Koha, you will see the Koha
record level itemtype info. This info is also shown if item-level_itypes
is set to biblio

Display of icons are controlled by
noItemTypeImages/OpacnoItemTypeImages

Material type display is controlled by DisplayIconsXSLT/DisplayOPACIconsXSLT

To test:
 1 - Apply patch
 2 - Update database
 3 - Do an opac search and view results
 4 - Switch pref to 'Koha' and refresh
 5 - Note itemtypes appear
 6 - Click in to a record details
 7 - Note you see itemtype and icon
 8 - Switch the pref
 9 - Note you don't see record level itemtype and icon
10 - Repeat in staff interface

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-24 12:10:53 +02:00
dd1eec2715 Bug 18501: Add _set_found_trigger
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-20 12:31:59 +02:00
79da944246 Bug 18501: Auto refund if mark as found from cataloguing
If an item is marked as found (ie. not itemlost) we need to refund the
patron.

Test plan:
Mark an item as lost to create a fee for the patron
Mark it as found from the cataloguing module and confirm that the patron
is refunded

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-20 12:31:59 +02:00
2bb09975bc Bug 5428: Jump back to the search result after deleting a record
This patch adds the ability to jump back to the search result after a
record has been deleted.
Also it keeps the "browser" when all items are deleted from a
bibliographic record

Test plan:
- Start a new search
- Select a record with items
- Delete all the items
=> You still see the browser
- Delete the record
=> You are back to the adv search form but we new link "Go back to the
results" is present at the top of the page

Limitation: As we delete the record we do not longer know the offset,
we are back to the first page of the result list

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-13 07:55:45 +02:00
ed4fc58894 Bug 26012: Correctly format "paid for" info on the item details view
The string is built controller side, which does not let the template
format the info nicely.
We want to display patron's info using patron-title.inc and the date
with the KohaDates plugin

Test plan:
- Make sure there is a replacement cost in the item
- check it out
- Mark it lost
- Pay the lost item fee
- Go to the detail page and look on the items tab for the item
- It will show an entry with "Paid for?" label
The patron's info and date must be correctly formatted

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-12 11:46:37 +02:00
5c190388ae Bug 26133: Remove GetMarc* calls in detail.pl
There are several calls in catalogue/detail.pl that can be removed:
GetMarcISBN, GetMarcAuthors, GetMarcSubjects, GetMarcSeries, GetMarcUrls and GetMarcHosts
They pass a variable to the template that is never used.

Test plan:
Confirm that this TT variable is never used.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-05 17:36:28 +02:00
a51a4f117d Bug 26141: Remove duplicated code from search.pl
commit 417553a9e4
  Bug 12478: starting to add search to staff client

This commit added code related to the itemtypes to the advanced search, but this code already existed.

The weird bit is:
$template->param(advancedsearchesloop => \@advancedsearchesloop);
my $types = C4::Context->preference("AdvancedSearchTypes") || "itemtypes";
my $advancedsearchesloop = prepare_adv_search_types($types);
$template->param(advancedsearchesloop => $advancedsearchesloop);

We are passing twice advancedsearchesloop to the template.

Test plan (for QA):
Review the changes and confirm that we can safely remove this code

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-05 17:36:28 +02:00
3b9c0f338b Bug 20799: (QA follow-up) Move syspref check
This patch moves the syspref check into the controller to save a DB
query if the module is not enabled.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

JD - amended patch: removing trailing parenthesis in the IF statement

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-24 14:11:53 +02:00
Magnus Enger
9a6b28a914 Bug 20799: Add link from biblio to ILL detail view
Some ILL systems (e.g. Libris in Sweden) require a link between
a biblio and an ILL request. When such a link exists it is nice
to display an actual link from the biblio detail view to the
ILL request detail view. This patch adds such a link. For users
without ILL privileges, the requests should still show, but not
be clickable links.

To test:
- Make sure you have a couple of ILL requests created with the
  FreeForm backend. (FreeForm does not let you tie a request to
  a biblio through the UI, but we will add connections directly
  in the database.) Lets assume these have illrequest_id's a and b.
- Make sure you have a record, let's call the biblionumber x.
- Apply the patch and make sure there are no changes in the biblio
  detail view of biblionumber x.
- Log into the database and connect the biblio to the first request:
  UPDATE illrequests SET biblio_id = x where illrequest_id = a;
- Check that the biblio detail view now says this:
  "ILL requests: Request a"
- Verify that the "Request a" part is a working link to the detail
  view of ILL request a.
- Do this in the database:
  UPDATE illrequests SET biblio_id = x where illrequest_id = b;
- Check that the biblio detail view now says this:
  "ILL requests: Request a, Request b"
- Verify the links work as expected.
- Log in as a staff user and check that the requests are still
  listed, but not displayed as clickable links.
- Sign off

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-07-24 14:11:53 +02:00
f843e8be51
Bug 23591: Hide archived suggestions
However we are adding a note on top of the table to tell how many
suggestions are archived. It seems that there is no good reason to
display the archived suggestions on this table.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 16:36:41 +01:00
6380c479b6
Bug 23591: Display a new "Suggestion detail" tab on the bib detail page
This patch adds a new "Suggestion detail" tab on the bibliographic
detail page. It will help suggestion management.

Test plan:
- Create several suggestions for a given biblio
- Go to the detail page of the bibliographic record and confirm that
there is a new "Suggestion detail" tab with all the suggestions you
created.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 16:36:30 +01:00
21c9b685bf
Bug 20415: Remove UseKohaPlugins system preference
Owen Leonard 2018-03-16 10:47:47 UTC :
<<
I don't think the system preference adds any security. There are already multiple permissions required for working with plugins:

- Configure plugins
- Manage plugins ( install / uninstall )
- Use report plugins
- Use tool plugins

And even with those permissions your server must be configured to allow the use of plugins.
>>

Test plan :
1) Install kitchen sink plugin https://github.com/bywatersolutions/koha-plugin-kitchen-sink
2) Run misc/devel/install_plugins.pl
3) Set config enable_plugins=1
4) Check all parts of the plugin are working
5) Set config enable_plugins=0
6) Check all parts of the plugin are disabled

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-26 11:42:02 +00:00
bbb504c86f
Bug 23463: Replace ModItem with Koha::Item->store
Starting to replace the ModItem calls with Koha::Item->store

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-23 09:26:30 +00:00
c8468a9202
Bug 5103: Refactor the code to avoid repetition
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-16 10:56:45 +00:00
Aleisha Amohia
4432429c1e
Bug 5103: (follow-up) Using mapped item fields instead of hardcoding subfields
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-16 10:56:36 +00:00
Aleisha Amohia
8d505e371f
Bug 5103: Format dates in MARC detail using dateformat syspref
This patch fixes the formatting of dates on the following pages:
- catalogue/MARCdetail.pl (staff)
- cataloguing/additem.pl (staff)
- opac-MARCdetail.pl (opac)

To test:
1) Ensure that the following fields are visible in the opac, intranet
and editor. You may need to edit the subfields in your default
bibliographic framework
952$d date accessioned
952$q date due/on loan
952$r date last seen
952$s date last borrowed
952$w replacement price date

Also ensure you have dateformat system preference set

2) Go to cataloguing/additem.pl for a biblio. Fill in the fields above
if required. Save
3) Remain on cataloguing/additem.pl. Notice the items table at the top
of the page, the dates are in the generic yyyy-mm-dd format
4) Go to catalogue/MARCdetail.pl for that biblio. Notice dates in wrong
format
5) View this biblio in the opac opac-MARCdetail.pl. Scroll to bottom to
items table. Notice dates in wrong format.
6) Apply patch, restart memcached and plack and refresh pages
7) Dates should now be formatted according to dateformat preference
8) Confirm that changing the preference changes the format of the dates

Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-16 10:56:25 +00:00
a28e1928d3
Bug 21746: Remove NO_LIBRARY_SET
NO_LIBRARY_SET was used when the DB user was logged in. Since bug 20489
it's not longer possible. We could remove the code.

One occurrence left in C4::InstallAuth as there is no (real) logged in user yet.

Test plan:
* Install Koha to make sure NO_LIBRARY_SET is not needed during the
install process
* Login into Koha
* Make sure the your library's name is displayed correctly in the header
* Set another library
* Confirm that the library's name is updated

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No problem during install, nor changing library.
Fixed (pre-existing) tab in circ/branchtransfers.pl
No errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-03-02 10:20:42 +00:00
a1849d5fa0
Bug 24545: Fix newly added files
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-24 13:31:27 +00:00
7d8b96803f
Bug 24545: Fix license statements
Bug 9978 should have fixed them all, but some were missing.
We want all the license statements part of Koha to be identical, and
using the GPLv3 statement.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-24 13:31:26 +00:00
Julian Maurice
40219cf2a6
Bug 18433: Allow to select results to export in item search
This adds a column of checkboxes in the results table to be able to select the
items to be exported

Test plan:
1. Go to item search and click 'Search'
2. Without checking any checkbox, verify that the export still works (it should
   export all results)
3. Tick some checkboxes and re-export, verify that only selected items are
   exported

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-19 16:07:58 +00:00
0d33dbcf2e
Bug 24103: Add option to dump search query to templates
To test:
1 - Apply patch, update database
2 - Note new syspref 'DumpSearchQueryTemplate'
3 - Leave it off
4 - Enable DumpTemplateVariablesOpac and Staff
5 - Search on staff and opac
6 - View the source
7 - Search for 'search_query' - you shouldn't find it
8 - Enable the new pref
9 - Repeat, but you should find the query
10 - Test staff/opac search and advanced search, cataloguing search, authority search, authfinder search, adding to a basket form a new biblio
11 - All should work and show the query
12 - This will work under both ES and Zebra

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-19 15:58:41 +00:00
82716a0172
Bug 23084: Replace grep {^$var$} with grep {$_ eq $var}
We certainly faced 3 similar bugs due to this syntax: bug 23006, bug
22941 and bug 17526.

To prevent other issues related to this syntax this patch suggests to
replace them all in one go.

Test plan:
Confirm that the 2 syntaxes are similar
Eyeball the patch and confirm that there is no typo!

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-17 10:44:45 +00:00
Andreas Jonsson
932596cc47
Bug 24506: Multibranch limit does not work with ElasticSearch
Test plan
1. Set up a system with ElasticSearch
2. Set up or make sure ther are at least two branches
3. create a group of branches
4. make sure there are items associated with any library in the group
5. make a search in opac limited by the library group
6. make an advanced search in intra limited by the library group
7. change SearchEngine system preference to Zebra and repeat 5. and 6.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-17 10:39:06 +00:00
6fcbf109d6
Bug 13574: Fix display of repeatable item subfields
Applies to OPAC and staff: opac-MARCdetail and catalogue/MARCdetail.

Test plan:
[1] Pick an item. Pick two fields say URI and copy number, and fill these
with a value like A | B. (The pipe char is important.)
[2] Verify that the display of the item block on opac-MARCdetail shows
both A and B in those columns. (Previously only B was shown.)
[3] Verify the same on catalogue MARC detail, items tab.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Holly Cooper <hc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-17 10:38:06 +00:00