Commit graph

38594 commits

Author SHA1 Message Date
278df89bb5
Bug 22437: (follow-up) Move deletion of merge requests to DelAuthority
Lines can be moved. Deletion can be done too if skip_merge is not set.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-12 11:02:05 +01:00
891307f29b
Bug 22437: Delete older merge requests at new merge time
If you merge A to B, we should remove older AA merges (regular
merge to itself) in the queue before deleting A.

Test plan:
[1] Set merge limit in prefs to say X.
[2] Find three authorities A, B, C with linkcount >X, >X, <X.
[3] Merge C to B. This creates a 'BB merge' in the queue.
    Auth C is deleted.
[4] Merge B to A. Creating AA and BA in the queue.
    Auth B is deleted.
    Optionally verify that BB is no longer in the queue.
[5] Run the merge_authorities.pl cron job.
    Verify that the linkcount to A is the former total of ABC.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Phil Ringnalda <philringnalda@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-12 11:01:58 +01:00
6b85d1b073
Bug 22437: Add test case to Merge.t
Test proves now that a 'destructive merge' is removed by
DelAuthority.

Test plan:
Run t/db_dependent/Authority/Merge.t. Should fail when you
do not apply the other two patches and pass with them.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-12 11:01:49 +01:00
312efadd31
Bug 25421: Update POD
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-12 11:00:27 +01:00
6aeeae3e70
Bug 25421: Remove use of Koha::Libraries->pickup_locations
The current implementation uses Koha::Libraries->pickup_locations which
is problematic and due to be removed by bug 24368. This patch makes the
trivial change of just searching for libraries that are marked with
pickup_location => 1.

Calls to Koha::Item->pickup_locations and Koha::Biblio->pickup_locations
are as well adapted to the new arrayref return value.

To test:
1. Pick a record with only one item
2. Place a biblio-level hold on it
3. Edit the items: remove the item
4. Go to the Holds tab
=> FAIL: It explodes
5. Apply this patch and restart:
   $ sudo koha-plack --restart kohadev
6. Go back and go to the holds tab again
=> SUCCESS: No failure!
7. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-12 11:00:14 +01:00
6f1e9fe750
Bug 25421: Make ->pickup_locations only return an arrayref
This patch makes Koha::Item->pickup_locations and
Koha::Biblio->pickup_locations always return an arrayref.

Test are adjusted to reflect this:

1. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Biblio.t t/db_dependent/Koha/Item.t
=> SUCCESS: Tests pass!
2. Apply this patch and repeat 1
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-12 10:59:58 +01:00
1eae01fa14
Bug 25342: Unit test
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-12 10:59:11 +01:00
2a80407403
Bug 25342: Force ES id as string
To test:
1 - Be using ES
2 - Find a unique record by searchign for title or seomthing
3 - Edit the record
4 - Repeat search and confirm you are returned to the details page
5 - Go to Tools->MARC modification templates
6 - Add a template and define an action
7 - Go to Tools->Batch record modification
8 - Select Enter a list of record numbers
9 - Enter the biblionumber of the record you searched for
10 - Use the marc modification template you setup
11 - Complete the modification
12 - Repeat your search
13 - note you get two results, both pointing to same biblionumber
14 - Check the ES index, note that you have two entries, one with the biblionumber, and the other with #.0, e.g.:
    curl -XGET 'es:9200/koha_kohadev_biblios/data/14.0?pretty'
    curl -XGET 'es:9200/koha_kohadev_biblios/data/14?pretty'
15 - Apply patch
16 - Delete and rebuild ES index
    perl misc/search_tools/rebuild_elasticsearch.pl -d -b
17 - Repeat 2-12
18 - No duplication this time

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-05-12 10:59:00 +01:00
Katrin Fischer
0b75907757
Bug 23787: (follow-up) Format due date as due date
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-12 10:58:06 +01:00
851f433b77
Bug 23787: Add AUTO_RENEWALS to sample_notices
Removed "\" from "It\'s too late..." -- apparently that doesn't need to get escaped in YAML

To test:
- create a new English (en) install
- confirm presence of auto renewal notice

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>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-12 10:57:49 +01:00
Katrin Fischer
3aecd0afb0
Bug 23787: Add sample AUTO_RENEWALS notice to translatd installers
This adds the default auto renewal notice to the translated
installers. Translating will be handled by maintainers of the
installers, but this way we don't end up with installations
having a different set of notices than others.

To test:
- Verify the sample_notices.sql files load correctly
or
- Run the web installer for each of those languages and
  verify sample_notices loads correctly.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-12 10:57:34 +01:00
c9a032a8fc
Bug 25301: Removed URI parameter "categorycode" from the toolbar
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-12 10:56:13 +01:00
Petro Vashchuk
5b0e0f03c1
Bug 25301: removed URI parameter "categorycode" from "circulation.tt"
"Edit details" links in patron's circulation check-out page
was sending empty query parameter "categorycode" because there is no
defined template parameter in "circulation.pl"

This patch removes the URI parameter from "circulation.tt" template.

To test:
    1) You need to create or find expired or expiring patron.
    2) Head to patron's circulation check-out page.
    3) Inspect "Edit details" link.
    4) Observe empty parameter "categorycode=" in that link.
    5) Apply patch.
    6) Repeat step 3.
    7) Check that there's no "categorycode=" in the link anymore.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-12 10:56:05 +01:00
Petro Vashchuk
c79108e495
Bug 25301: removed useless URI parameter "categorycode" from template
Both "Edit details" links were sending empty query parameter
"categorycode" as there is no such template parameter in "moremember.pl"
defined at all, because template code block looks copy-pasted
from "circulation.tt".

This patch removes the parameter from "moremember.tt" template.

To test:
    1) You need to create or find expired or expiring patron.
    2) Head to patron details page of that patron.
    3) Inspect both "Edit details" links:
       one in the notification about expiration
       and other one in the "Expiration date:" field.
    4) Observe empty parameter "categorycode=" in those links.
    5) Apply patch.
    6) Repeat step 3.
    7) Check that there's no "categorycode=" in the links anymore.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-12 10:55:56 +01:00
a57cc4645d
Bug 25248: (bug 23463 follow-up) Adjust second occurrence
Same as the precedent patch for a single item deletion (vs delete all
items)
Item is returned if deletion  successful, not 1

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 14:18:48 +01:00
04ce87c4c0
Bug 16547: Remove more multi_holds inconsistencies
There was a bug, on the biblio's hold list view, if the pickup library
was changed, the next screen was "place a hold for no title"

http://pro.kohadev.org/cgi-bin/koha/reserve/request.pl?multi_hold=1&biblionumbers=

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 14:00:32 +01:00
2b2c605ea7
Bug 8132: Fix failing tests
* Add missing html filter (xt/find-missing-filters.t)
* Fix AddReserve call

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 11:51:04 +01:00
575878f0fb
Bug 25184: (RM follow-up) Syntax error correction
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 11:10:41 +01:00
David Roberts
0e0f09ba94
Bug 25130: Reason for accepting/rejecting a suggestion is not visible when viewing (not editing)
The patch adds the suggestion management reason to the display when
viewing a suggestion.

To test:

1) Edit a suggestion and assign a reason for accepting it.
2) View the suggestion (/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=XX&op=show, replacing XX with your suggestion ID)
3) Under suggestion management, the reason you've just assigned does not
display.
4) Apply the patch
5) Check the display again - the Reason should now be visible directly
under the status.

Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 10:02:29 +01:00
0d4b8cf126
Bug 24963: (follow-up) Fix another instance
This patch corrects the second instance of "auto renewal" in the
description of the AllowPatronToControlAutorenewal system preference.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 10:02:29 +01:00
d6ca541b55
Bug 24963: Terminology: Use "auto-renewal" instead of alternatives
This patch updates terminology in the templates so that "auto-renewal"
is used instead of "auto renewal" or "autorenewal."

To test, apply the patch and set the 'AllowPatronToControlAutorenewal'
preference to "allow patrons."

- Log in to the OPAC and view the "your account" page.
  - At the top of the "Checked out" tab you should see controls for
    turning auto-renewals on and off. The labels should be correct.
  - Turn off auto-renewals for this patron.
- In the staff interface, view the detail page for the patron you
  updated in the previous step.
  - In right-hand column of information about the patron you should see
    "Auto-renewal: Patron has opted out."
  - Add "&print=brief" to the page URL. Check that auto-renewal
    information displays correctly on this brief view as well.
- Go to Administration -> System preferences.
  - Under the "Circulation" tab, check that the description of the
    OPACFineNoRenewalsBlockAutoRenew preference refers to
    "auto-renewal."
  - Under the "Patrons" tab, check the description of the
    AllowPatronToControlAutorenewal refers to "auto-renewal."

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 10:02:29 +01:00
d7168b02bd
Bug 25327: Do not call authenticate_api_request to render the spec
The original code for Koha::REST::V1::Auth::under called
authenticate_api_request when requesting the API spec. This didn't make
sense, and recent changes on what conditions are tested for public
routes, broke the route.

We could add another condition, but it really doesn't make sense to call
authenticate_api_request if it should be publicly available in any
configuration, as discussed on the bug.

This patch adds a trivial check and the requested route, and lets the
request through in any case in 'under'.

To test:
1. Point your browser to:
   http://kohadev.myDNSname.org:8080/api/v1/
   http://kohadev.myDNSname.org:8080/api/v1/.html
=> FAIL: In both cases you get an authorization error.
2. Apply the regression tests patch
3. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/auth.t
=> FAIL: The tests reflect the situation, and fail
4. Apply this patch
5. Repeat 1 and 3
=> SUCCESS: All good!
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 10:02:29 +01:00
20d493090a
Bug 25327: Regression tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 10:02:29 +01:00
Grace McKenzie
5a1f42e793
Bug 17853: Don't remove () from 780 link text
To test:
- Catalogue a record with 780, Indicators 00 and $a some text including parentheses.
    e.g. Hospitals (Chicago, Ill. : 1936)
- Verify that the () are not shown in the link text and are not part of the URL.
- Apply patch
- Verify that the () are shown in the link text and are not part of the URL.

Signed-off-by: Felix Hemme <felix.hemme@thulb.uni-jena.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

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

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

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

Bug 17853: Don't remove () from 785 link text and restore link value of 780

The only thing we change for 780 and 785 is, that if the display
text contains (), they are no longer removed.

To test:
- Catalogue a record with 785$a some text (including) parenthesis
    e.g. Hospitals (Chicago, Ill. : 1936)
- Verify that the () are not shown in the link text and are not part of the URL.
- Apply patch
- Verify that the () are shown in the link text and are not part of the URL.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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-05-11 10:02:18 +01:00
e97ca8ab15
Bug 25157: Silent patron deletion cmd line script
Without -v the script will no longer display messages unless the error
is major.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 09:57:07 +01:00
a0c2012ce9
Bug 8132: (QA follow-up) Missing filter
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 09:56:28 +01:00
af495b93c7
Bug 8132: Adding message when deleting from the UI
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 09:56:23 +01:00
c256a30998
Bug 8132: Delete the items in a transaction and rollback if something wrong
The last_item_for_hold case cannot be guessed (easily), and so we are going to
delete the items in a transaction. If something wrong happened we
rollback and display a list of items that caused the rollback.

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 09:56:17 +01:00
e8414baf5b
Bug 8132: Adding a new message 'last_item_for_hold' blocking item deletion
If an item is the last one of a biblio that have biblio-level hold
placed on it, we should block the deletion.
It takes effect if the hold is found (W or T), to follow existing
behavior for item-level holds.
If we want to block deletion for any holds we should deal with it on a
separate bug report.

Test plan:
0/ Setup
Apply the patches
Create Biblio B1 with 1 item
Create Biblio B2 with 2 items
Create Biblio B3 with 1+ item
Create Biblio B4 with 1+ item
Create Biblio B5 with 1+ item
Place a biblio-level hold on B1 and B2
Place an item-level hold on B3 and B4
Confirm the item-level hold for the items of B3 to mark it waiting.

1/ Delete those 6 items in a batch
=> delete of item from B1 is blocked on first screen - only 1 item left
and there is a biblio-level hold on the record
=> delete of items from B2 is *not* blocked on first screen - One of
them will block the deletion, but so far we are not aware of that
situation
=> delete of item from B3 is blocked on first screen - there is a
waiting item-level hold placed on the item
=> delete of item from B4 is *not* blocked - there is a hold but it is
not found
=> delete of item from B5 is *not* - there is no reason to block its
deletion

Note that you can only select items from B2, B4 and B5

2/ Select them and confirm the deletion
=> Nothing happened and you get a message saying that one of the 2 items
from B2 is blocking the whole deletion process

3/ Remove the biblio-level hold from B2
4/ Repeat 1
=> The deletion has been effective!

=> Note that there is something a bit weird as we are blocking items
from a biblio that has biblio-level holds on it (not found), but we
do not blocking the deletion of an item with a waiting item-level hold

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 09:56:09 +01:00
2363179198
Bug 8132: No changes but disable checkboxes
When the list of items is displayed we already know if there will be a
problem during the deletion. So let's disable the checkbox to tell the
user in advance that items cannot be deleted.

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 09:56:00 +01:00
Bernardo Gonzalez Kriegel
040abebb7d
Bug 25410: Sync liblibrarian and libopac descriptions
During translations some subfields show different
descriptions for intranet/opac

Just a little string change

To test:
1) Check if changes make sense and
there are no errors
2) Check if a clean install loads default marc21
frameworks without problem.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 09:54:59 +01:00
Katrin Fischer
ef55bc44fd
Bug 24098: Standardize Fines/Fees & Charges
This patch suggests to adopt the terminology used in the OPAC
to only use charges and leave off the Fines or Fees.

To test:
- Add a charge to your account
- Check the note on the details and checkouts tabs
- Check the tab name on the details tab
- Activate batch checkouts via systempreferences for your
  patron category:
  - BatchCheckouts
  - BatchCheckoutsValidCategories
- Add a guarantee to your patron and allow to see fines
  (requires: AllowStaffToSetFinesVisibilityForGuarantor)
- Add a manual fine for the guaranee above NoIssuesChargeGuarantee
- Go to the batch checkout tab of your patron and verify note there

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 09:54:20 +01:00
bea36d9f09
Bug 25343: Use of item in review/comment feature is misleading
This patch updates the terminology associated with leaving a comment in
the OPAC. the word "item" is replaced with the more specific "title."

To test, apply the patch and make sure the  reviewson system preference
is enabled.

 - Log in to the OPAC and view a bibliographic record which has no
   comments.
 - Under the "comments" tab, verify that the text in the tab says
   "There are no comments on this title. Post your comments on this
   title."

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 09:53:19 +01:00
George Veranis
9f00c5912e
Bug 19312: Fix typo in template
This patch fixes a simple typo

Test plan:
1) Go to Administration -> MARC bibliographic framework
2) Select a framework and add plugin unimarc_field_121a.pl to 121 field
3) Open cataloguing screen
4) Go to 121 field and check if for subfield a shows two times the value
   2-dimensional
5) Apply the patch
6) Go to 121 field again and check if it shows 2 different values

Mentored-by: Andreas Roussos <a.roussos@dataly.gr>
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-05-11 09:52:04 +01:00
David Roberts
4318d84433
Bug 25388: There is no link for the "online help"
This patch removes a non-existent link to the online help from the marc
subfield editor.

To test:

1) Go to Admin > MARC Bibliographic framework > Edit MARC structure >
Edit subfield (for example /cgi-bin/koha/admin/marc_subfields_structure.pl?op=add_form&tagfield=000&frameworkcode=AR)
2) Check that the Max Length value in the Advanced constraints area
contains text saying "See online help"
3) Apply patch
4) Check that the reference to the online help has disappeared.

Remove tabs from start of line

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 09:50:19 +01:00
Nicolas Legrand
0c0bb0dacf
Bug 25099: Sending a LANG variable to plug-in template
To make internationalised plug-ins, it may be useful to get the lang
from C4::Languages::getlanguage. This patch adds
C4::Languages::getlanguage result to a LANG variable which is sent to
the template plugin.

In your plugin, you can add a i18n directory containing
lang[-DIALECT].inc files with a TOKENS hash like this:

    [%
      TOKENS = {
        PLUGIN_NAME = "Mannequin"
        PRESENTATION = "Voici un example d'outil."
        CLICK_ME = "Cliquez moi !"
      }
    %]

The plugin template can then include such a lang[-DIALECT].inc with a
hash containing all the plugin strings:

    [% TRY %]
        [% PROCESS "$PLUGIN_DIR/i18n/${LANG}.inc" %]
    [% CATCH %]
        [% PROCESS "$PLUGIN_DIR/i18n/default.inc" %]
    [% END %]

The strings are then printed in the template with something like:

    [% TOKENS.PRESENTATION %]

Test plan:

1. apply patch
2. install, enable and run BULAC Mannequin plugin
3. it should print stuff in english by default
4. install french French (fr-FR)
5. change you Koha lang to French
6. run again the plugin
7. ho là là! French!

Thanks to Tomàs Cohen and his pay via paypal plug-in from which most
ideas in this patch are taken.

Sponsored-by: BULAC - http://www.bulac.fr/
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 09:49:07 +01:00
Katrin Fischer
cc4b6b34c0
Bug 25082: Don't remove characters from string
At the moment, show-lang-041 will either get a code
or an AV description to deal with. If it's a description,
we don't want to remove spaces and other chars from it.

To test:
- Repeat tests from first patch with an AV in LANG category
  that consists of multiple words, has a - and other possible
  punctuation.
- The description should show correctly in OPAC and staff.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 09:46:18 +01:00
Katrin Fischer
8cfe35b044
Bug 25082: Make 041 descriptions display, if authorised value list is used
When 041$a or another subfield is linked to an authorised value list,
Koha will replace the codes with the descriptions from the authorised
value in the MARCXML before passing it to the XSLT.

The XSLT was made to translate codes into descriptions - as there is
no code now, this fails and 'unknown language' is shown.

The patch changes the handling so that when the XSLT is handled something
that doesn't match a known code, it displays the subfield without
processing.

To test:
- Create some records with 041.
  Examples: http://www.loc.gov/marc/bibliographic/bd041.html
- Verify this displays nicely in staff and OPAC
- Apply patch
- Verify display is unchanged
- Remove the patch
- Change one of your MARC frameworks (use another framework than
  for your first test records)
  and link the 041 subfields to the LANG authorised value list
- Go to administration and create some entries for LANG with language
  codes and descriptions
- Catalog a 041 using the normal editor (not advanced)
- You can now use a pull down to select the values you want
- Verify the display is now 'Unknown language' for this record
- Apply patch
- Verify all records display the language descriptions now, using
  an authorised value or not
- Run misc/maintenance/generate_MARC21Languages.pl

Verify the output at the end reads like:
<xsl:otherwise>
    <!-- when 041\$a is mapped to an authorised value list, this will show the description -->
    <xsl:value-of select="\$code" />
</xsl:otherwise>

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 09:46:02 +01:00
72f013937c
Bug 25325: ElasticSearch mapping export lacks staff_client/opac fields
Run test:
prove t/db_dependent/Koha/SearchEngine/Elasticsearch/ExportConfig.t

Or:

Run export_elasticsearch_mappings.pl script. See that opac/staff_client fields
are exorted.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 09:43:09 +01:00
f08e7ff8b5
Bug 25325: Test ES lack of staff_client/opac fields
Run this test to see that export_elasticsearch_mappings.pl doesn't export
staff_client/opac fields.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 09:43:00 +01:00
f806adf0ea
Bug 25184: DBRev 19.12.00.087
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 08:57:47 +01:00
82e866fcb5
Bug 25184: Add syspref
It's entirely possible that some libraries are relying on the current
before for part of their workflow. Do to this possibility, it seems like
a good idea to control this behavior via a system preference.

Test Plan:
1) Apply this patch set
2) Run updatedatabase.pl
3) Set TrapHoldsOnOrder to "don't trap"
4) Set an item's notforloan value to -1
5) Place a hold on that item
6) Check in the item
7) Note the item is not trapped for hold
9) Set TrapHoldsOnOrder to "trap"
10) Check in the item
11) Koha should now ask if you'd like to trap the item for the hold!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 08:55:13 +01:00
cc938e6be1
Bug 25184: Items with a negative notforloan status should not be captured for holds
Negative notforloan statuses should allow holds to be placed but not captured.

Due to coronavirus, we have libraries setting all returned materials to a negative notforloan value of Quarantine for several days.
They're using UpdateNotForLoanStatusOnCheckin to set that status automatically. However, those items are still capturing for holds,
even though those items cannot be checked out until the notforloan status is removed.

In cases like an On Order item where we do want the hold to fill at checkin,
UpdateNotForLoanStatusOnCheckin should be used to clear that notforloan status so the hold can fill.

In master, if I set an item to a not for loan but holdable status ( < 0 ) I can place the hold,
capture the hold and set it to waiting, but *not* check it out to the patron!
This does not make sense. I should not be able to trap an item for checkout unless it can be checked out.

Test Plan:
1) Set an item's notforloan value to -1
2) Place a hold on that item
3) Check in the item
4) Trap the item for that hold
5) Attempt to check the item out to the patron, you will be unable to
   because it is notforloan
6) Apply this patch
7) Restart all the things!
8) Repeat steps 1-3
9) The screen should no longer ask if the item should be trapped
   to fill the hold!

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Catherine Ingram <Catherine.Ingram@cedarparktexas.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-11 08:55:05 +01:00
fc9ef3a279 Bug 25423: (follow-up) Fix wrong test
This is confusing: why does it pass on all OSs but Debian 8?

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2020-05-08 16:45:52 -03:00
fcc6836925 Bug 25423: Force call to update and empty with an instanciated object
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-05-08 15:42:37 +02:00
6f6bde3c24 Bug 25423: (follow-up) Unit tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-05-08 15:42:37 +02:00
7c87ac8c3b Bug 25423: Unit tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-05-08 15:42:37 +02:00
02fc6ca6d1 Bug 25423: Add Koha::Exceptions::Object::NotInstantiated
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-05-08 15:42:37 +02:00
b5ff3696b5 Bug 23185: (follow-up) K:C:Register->make_default should use no_triggers
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-05-08 13:14:59 +02:00
74586912c0 Bug 17355: (QA follow-up) Fix used package name
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2020-05-07 19:10:29 -03:00