Jonathan Druart [Fri, 21 Aug 2020 14:07:46 +0000 (16:07 +0200)]
Bug 26069: Pass correct URL to twitter
We don't provide the url of the detail page so the twitter JS code
retrieve the current location, with the search terms.
Test plan:
Do a search
Click on a result
Click on the twitter button and confirm that the link only contain
biblionumber=x in the parameter
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Ere Maijala [Thu, 18 Jun 2020 13:43:42 +0000 (16:43 +0300)]
Bug 25504: Improve REST API spec loading errors
Test plan:
1. Introduce a typo in swagger.json or another spec json file.
2. Restart plack if used or try to access the REST APIs
3. Without the patch, verify that an incomplete error message and potentially lots of stack trace are logged.
4. With the patch, verify that much more meaningful error messages are logged and stack trace is omitted.
5. Fix the problem introduced in step 1 and verify that no messages are logged, or only warning about bundle is logged with Debian Stretch.
6. Repeat with a REST API plugin.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Mon, 24 Aug 2020 14:24:39 +0000 (14:24 +0000)]
Bug 25273: (follow-up) Don't die on unknown authtype
We are guessing authtype code and inserting the heading built accorindg to C4::Heading
If we can't identify the auth type, we can format the heading. There is a record in the koha test
data that is missing the heading field so type cannot be idenfitied
This prevents us from dying n a record where we cannot identify the type.
Note: This code will also be triggered for custom authority types, higlighting
that they won't link because of hardcoded mappings in C4::Heading. We must tackle this
on a new bug
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Tue, 28 Apr 2020 12:19:56 +0000 (12:19 +0000)]
Bug 25273: Make match-heading rely on authority type configuration
The match-heading field is a special field used only by the linker, not accessible
to staff or patrons via the interface. This field is used to store the constructed
'search form' used for matching bib headings to authority fields.
In bug 24269 I attempted to use the mappings defined in the inferface and also inject the search term.
This did not work as too many subfields were indexed on their own and leading to false matches.
In this bug we remove the mappings for this field, and create it ourselves during
the indexing process. The C4::Headings module is still used to generate the correct form,
however, the mappings are set based on the authority types in the system. This gives the user
the ability to add new typoes, but prevents mapping changes from breaking linker functionality
To test:
1 - Start form a sample database with ElasticSearch working
2 - Download via Z39.50 2 authorities, one of which is a narrower heading of the other, e.g.:
Waterworks
Waterworks - Costs
3 - Place a heading for the broader term in a record. e.g. Waterworks
In 650$a, without the cataloguing authority plugin. We don't want
the link created now.
You need syspref BiblioAddsAuthorities => allow
4 - Make sure linker is set to default
5 - Attempt to link the records
misc/link_bibs_to_authorities.pl
6 - Linking fails
7 - Apply patch
8 - refresh index settings (if using a custom file, remove 'match-heading')
You can reset mappings in the UI or run this:
misc/search_tools/rebuild_elasticsearch.pl -v -d -r
9 - Reindex ES
10 - Try to link again
11 - It succeeds!
12 - Run the tests
prove t/db_dependent/Koha/SearchEngine/Elasticsearch.t
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug 25273: (follow-up)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Thu, 27 Aug 2020 16:27:09 +0000 (16:27 +0000)]
Bug 17661: (follow-up) Update regex to support Unicode characters
Rather than limiting initials to [A-Z] we should test for a broad
range of uppercase letters.
The ES/Zebra changes are slightly different because of Perl vs Java regex
conventions. POerl may support either, but I found 'Uppercase' to be a bit more explicit
More info here:
https://perldoc.perl.org/perlunicode.html
TO test:
Same plan as before but use Ж. as the ending initial
Confirm the period is preserved and other punctuation removed
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The current code for facets doesn't pull strip ending punctuation from facets
This causes duplicate facets for terms that should be combined
Sometimes series can have different punctuation depending on the field they are in
Author initials punctuation should be preserved
To test:
1 - Do search and pull up some records
2 - Edit some of the records to have authors like:
Date, C.J.
Date, C.j.
Date, C.J .
3 - Edit the records to have some series statments like:
830 $aDate, C.J. ;$v5
830 $aDate, C.J. ; $v5
830 $aDate, C.J.; $v5
4 - Add some 490s to the record with first indicator 1 and series like:
You wouldn't want to--
You wouldn't want to
You wouldn't want to..
5 - Search again and note you have 3 facets each for author and series
6 - Apply patch
7 - Repeat
8 - Now you get 2 facets for author, period not removed when following Upper case immediately, is otherwise
9 - Now you should have a single series facet
10 - Switch search engine to ES (index before applying patch)
11 - Note facets are separate again
12 - Reset mappings and reindex
perl misc/search_tools/rebuild_elasticsearch -v -r
13 - Repeat search, facets combined as above
Signed-off-by: Sarah Cornell <sbcornell@cityofportsmouth.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Tue, 25 Aug 2020 19:30:00 +0000 (19:30 +0000)]
Bug 26289: Add missing variable definition to templates
This patch puts definition of the missing "searchid" variable into an
include file to be used by various bibliographic detail pages. The
variable is required by several JavaScript functions.
To test, apply the patch and locate or create a record with no items.
Open the labeled MARC view and choose Edit -> Delete record. Confirm the
deletion. The deletion should complete correctly.
Perform the same test with the detail view, ISBD view, MARC view, and
items view.
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Mon, 24 Aug 2020 13:22:24 +0000 (09:22 -0400)]
Bug 26281: Add cancellation reason to holds history
Bug 25534 adds the ability to store the cancellation reason when a hold
is cancelled and communicate it to the user. It would be great if the
cancellation reason could also be shown on the holds history.
Test Plan:
1) Apply this patch
2) Cancel a hold with a reason
4) Browse to holds history for the holds' patron
5) Note the reason shows in the status column if one was provided
Working ok.
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 26 Aug 2020 10:58:44 +0000 (12:58 +0200)]
Bug 26015: Replace 2 missing occurrences
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Fri, 14 Aug 2020 17:09:58 +0000 (17:09 +0000)]
Bug 26015: Terminology: Fix tons more staff clients to staff interfaces
This takes care of more occurences of staff client and changes it to
staff interface, including in code comments.
To test:
- I think in this case careful code review is what we look for.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Fri, 17 Jul 2020 23:17:45 +0000 (01:17 +0200)]
Bug 26015: Terminology: Use staff interface instead of staff client
We have agreed to use 'staff interface' instead of 'staff client'
and similar terms. This fixes the template files where staff client
appears:
To test:
- Check Administration > Patron categories
- Check the title of the staff interface start page in your
browser tab
- Check the description of hte catalogue permission
- One more: this changes the message shown when someone managed
to log in as the database user - as we no longer allow that, I am
not sure if it can be triggered.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Wed, 29 Jul 2020 10:56:37 +0000 (10:56 +0000)]
Bug 25639: Add search query strings as global javascript variables
To test:
1 - Search on OPAC for "qwertyuiop"
2 - View the HTML source
3 - Find 'qwertyuiop' in the source, it is not easily accessible via JS
4 - Apply patch
5 - Repeat
6 - Note that now there are global variables with the query strings
7 - Add to OpacUserJs:
console.log( query_desc );
console.log( querystring );
console.log( query_cgi );
8 - Reload page and confirm variables are warned in the JS console (Press F12)
9 - Sign off
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Agustin Moyano [Tue, 25 Aug 2020 17:53:55 +0000 (14:53 -0300)]
Bug 22789: (follow-up) Fix atomic update, GUI and more than one hold
This patch
* sets one check for reserves and another for old_reserves in
atomic update
* Adds a message below the checkbox and adds detail when a hold is non
priority
* Fixes issue when there are more than one hold, but the first is non
priority
* Adds test case for this last scenario
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Agustin Moyano [Wed, 19 Aug 2020 21:12:32 +0000 (18:12 -0300)]
Bug 22789: Add non priority feature to C4 classes and staff interface
This patch implements necesary code to implement non priority feature
To test:
1) Apply all patches.
2) Run updatedatabase.
3) Checkout a specific item for patron1.
4) Place a hold on the same item for patron2 (do not check non priority
hold checkbox).
5) Try to renew the item for patron1.
CHECK => in checkouts table, there is a message that the item could not
be renewed because there was a hold.
6) Cleanup all checkouts and holds.
7) repeat steps 3 to 5, but this time check the non priority checkbox.
SUCCESS => item was renewed
8) prove t/db_dependent/Holds.t
Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Sat, 23 May 2020 06:23:37 +0000 (06:23 +0000)]
Bug 20057: Fix capitalization and rephrase system preference as a sentence
This makes changes to strings involved in this feature:
- Rephrases the system preference description into a sentence
- Rephrases message shown in OPAC on submitting (library has not actively
approved, so just say that the record has been modified)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Liz Rea [Tue, 19 May 2020 10:50:04 +0000 (12:50 +0200)]
Bug 20057: (follow-up) Add text for auto accepted changes
1. Apply patch.
2. Make sure syspref "AutoApprovePatronProfileSettings" is set to "Disable".
3. Edit patron personal details via opac interface.
4. Expect modifications to require manual approval by staff via link on main page.
-> 4a. Text for patron says that changes are pending acceptance by the library
5. Set syspref "AutoApprovePatronProfileSettings" to "Enable".
6. Edit patron personal details via opac interface again.
7. Expect modifications to have been approved automatically.
-> 7a. Text for patron says that changes have been submitted and accepted by the library.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
David Gustafsson [Tue, 19 May 2020 10:44:31 +0000 (12:44 +0200)]
Bug 20057: System preference for auto approval of patron profile changes
Testplan for this patch:
1. Apply patch.
2. Make sure syspref "AutoApprovePatronProfileSettings" is set to "Disable".
3. Edit patron personal details via opac interface.
4. Expect modifications to require manual approval by staff via link on main page.
5. Set syspref "AutoApprovePatronProfileSettings" to "Enable".
6. Edit patron personal details via OPAC interface again.
7. Expect modifications to have been approved automatically.
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
This works, we may want some different text for this situation in the OPAC, it still says the librarian has to approve the change.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Sat, 23 May 2020 23:27:49 +0000 (01:27 +0200)]
Bug 25129: Update German (de-DE) web installer sample files for 20.05
This translates the new notices and CSV profie for late orders,
makes some minor changes to the patron category descriptions
and numbering patterin labelling.
To test:
- Make sure German language is installed, see:
https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client
- Run the web installer and choose de-DE
- Select all sample files
- Make sure they all install without any errors
Bonus:
- If you can speak German, you can check the translations as well :)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Fri, 17 Jul 2020 22:03:28 +0000 (22:03 +0000)]
Bug 26013: Fix formatting for dates on "Manage stage MARC records" page
The "staged" dates were not formatted according to system
preferences DateFormat and TimeFormat as the appropriate TT
filters were missing.
To test:
- Stage a record in MARC format
- Go to Staged MARC management
- Check the date in the list of imports
- Click on the import and check the "Staged:" date
- Apply patch
- Repeat and verify formatting is now correct
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Katrin Fischer [Fri, 17 Jul 2020 23:07:07 +0000 (23:07 +0000)]
Bug 26014: Add publication year and edition to Z39.50 results in acquisition
The publication year and edition columns were present in
the Z39.50 results in cataloguing, but were missing in
acquisitions.
To test:
- Go to acquisitions
- Create a new basket
- Create an order within it from 'external source'
- Search for a title, for example with LOC
- In a separate tab, go to cataloguing
- Search the same record with Z39.50
- Compare result lists, date and edition are missing from acq
- Apply the patch
- Repeat search in acquisitions
- Verify result lists now match up
- Bonus: Date was changed to Year which is more fitting and
will translate better.
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Fridolin Somers [Fri, 7 Aug 2020 08:58:51 +0000 (10:58 +0200)]
Bug 26175: Remove warn if undefined barcode in misc/export_records.pl
When using misc/export_records.pl --deleted_barcodes if barcode is NULL you get warn :
Use of uninitialized value in say at /home/koha/src/misc/export_records.pl
Also exporting barcode if empty string makes no sense.
Test plan :
1) Delete an item with barcode = NULL
2) Run : misc/export_records.pl --date=`date +%d/%m/%Y` --deleted_barcodes --filename=/tmp/deleted_barcodes
3) Check you se no warn "Use of uninitialized value in say ..."
4) Delete an item with barcode = ''
5) Run 2)
6) Check there is no empty line in /tmp/deleted_barcodes
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
JD Amended patch
<p>The included <a href="https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v2.0/schema.json">api/swagger-v2-schema.json</a> file is licensed under the[-the-] <a href="https://github.com/OAI/OpenAPI-Specification/tree/master/schemas/v2.0">Apache License, Version 2.0</a>, by the <a href="https://www.openapis.org/about">OpenAPI Initiative [-(OAI)</a></p>-]{+(OAI)</a>.</p>+}
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
David Cook [Wed, 1 Jul 2020 02:26:01 +0000 (02:26 +0000)]
Bug 23653: use local copy of swagger v2 schema
By default, JSON::Validator::OpenAPI tries to fetch the
swagger v2 schema from http://swagger.io/v2/schema.json.
If you've installed from CPAN, JSON::Validator::OpenAPI will
come with a cached copy, so it won't try to fetch it over HTTP.
However, if you've installed from libjson-validator-perl
from Debian/Ubuntu, the Debian package excludes the cached copy,
so JSON::Validator::OpenAPI tries to fetch it over HTTP.
Unfortunately, today and other days in the past, the file at
http://swagger.io/v2/schema.json has been unavailable, and this causes
Koha to crash in a perpetual loop.
This patch includes a copy of the swagger v2 schema, and it loads
it locally rather than fetching over HTTP.
The changes to Koha/REST/Plugin/PluginRoutes.pm are not required,
since the validator isn't currently called there, but I've added
a patch to future proof it.
To Test:
0a) Remove /usr/share/perl5/JSON/Validator/cache/36d1bd12eeed51e86c8695bd8876a9df
if it exists
0b) Block external access to http://swagger.io/v2/schema.json or
test during an outage when it's unavailable
0c) Do not apply patch
1) koha-plack --restart kohadev
2) Note that it crashes in a loop and is unavailable in web browser
3) Apply patch
4) koha-plack --restart kohadev
5) Note that Koha comes up and there are no errors in the Plack logs
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Mon, 18 May 2020 17:32:45 +0000 (13:32 -0400)]
Bug 25534: Add ability to send an email specifying a reason when canceling a hold
Some libraries would like to be able to cancel a hold with the option to
specify a reason. Providing a reason would generate an email to that
patron.
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Restart all the things!
4) Create new AV category "HOLD_CANCELLATION", add some cancelation reasons
5) Add new Holds module notice "HOLD_CANCELLATION", add an email version.
A quick test version would be "Reason: <<reserves.cancellation_reason>>"
--
[% USE AuthorisedValues %]
Reason: [% AuthorisedValues.GetByCode( 'CANCELLATION_REASON', hold.cancellation_reason, 'IS_OPAC' ) %]
[% IF hold.cancellation_reason == "MY_AV_VALUE" %]
IF perhaps you'd like to have a much longer explanation than just the
one sentence in the AV description, you can use IF blocks using Template
Toolkit markup!
[% END %]
--
6) Place a hold for a patron
7) On request.pl, select the 'del' option for the hold
8) Select a cancellation reason and choose "Update hold(s)"
9) Note a new message has been queue for the patron with the cancelation reason
11) Test again from circulation.pl
12) Test again from moremember.pl
10) Cancel a hold with no reason, note no email is generated
11) Delete your authorised values, not the feature is disabled
12) Reinstate the authorised values, but delete the notice,
you should now be able to cancel a hold with a reason,
but no email will be generated
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 25662: (follow-up) Add tests for the wrong patron_id added behaviour
This patch adds trivial tests for the new error (400) raised when the
passed patron_id doesn't exist.
To test:
1. Run:
$ kshell
k$ prove t/db_dependent/api/v1/holds.t
=> SUCCESS: Tests pass!
2. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 25662: Make the route for holds restpect maxreserves
This patch fixes the behaviour for the POST /holds route. It assumed
maxreserves was checked in CanItemBeReserved which is not the case.
Tests are added to check for this behaviour.
To test:
1. Apply the regression tests
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/holds.t
=> FAIL: Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Tue, 28 Jul 2020 11:55:18 +0000 (07:55 -0400)]
Bug 25958: Allow LongOverdue cron to exclude specified lost values
When lost items are not marked as returned, they are still subject to
the long overdue cron, so an item that has already been marked Lost may
automatically roll to Long Overdue. In some cases, a library may not
want that lost value to change. This becomes especially important with
the introduction of Claims Returned, which uses a variety of lost.
Test Plan:
1) Set up a long overdue item that would be moved to lost by longoverdue.pl
2) Run the cronjob with the new --skip-lost-value option
3) Note the item is not altered
4) Include that value in the new system preference DefaultLongOverdueSkipLostStatuses
5) Run the cronjob *without* the new option
6) Note the item is not altered
7) Run the cronjob again with the new command line option, but set it to
a different value so the item will be affected
8) Note the item is altered as it would have been before this patch was
applied
Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 25 Aug 2020 09:38:32 +0000 (11:38 +0200)]
Bug 23166: Early return if no set
It prevents valid_template check to raise
Can't call method "filter_by_current" without a package or object reference at /kohadevbox/koha/Koha/Template/Plugin/Context.pm line 49.
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 7 Aug 2020 10:01:10 +0000 (12:01 +0200)]
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 )
);
Joonas Kylmälä [Mon, 24 Aug 2020 15:34:10 +0000 (18:34 +0300)]
Bug 23166: (QA follow-up) Add POD text
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>
Jonathan Druart [Tue, 5 May 2020 13:51:25 +0000 (15:51 +0200)]
Bug 23166: Call the methods from the .inc
We do not longer need the order variables to be passed from the
controllers, we can call the methods on the biblio object instead.
There is something wrong with our ->search method and TT behaviours, it
is hard to retrieve object list in a scalar context.
If [% objects.method.count %] is called, objects.method will get the
first object of the list and count will explode (Koha::Object->count
does not exist)
We need to force the call in a scalar context to retrieve an iterator
and prevent to fetch all the objects (we could have called all then
size, but it's not efficient)
If adopted I will move the plugin on a separate bug report to ease
backport
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>
Jonathan Druart [Tue, 5 May 2020 13:50:17 +0000 (15:50 +0200)]
Bug 23166: Add filter_by_current and _cancelled Koha::Acq::Orders methods
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>
Jonathan Druart [Tue, 5 May 2020 13:27:28 +0000 (15:27 +0200)]
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>
Jonathan Druart [Thu, 20 Jun 2019 02:35:20 +0000 (21:35 -0500)]
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>
Jonathan Druart [Thu, 20 Jun 2019 02:11:20 +0000 (21:11 -0500)]
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>
Jonathan Druart [Thu, 20 Jun 2019 02:10:15 +0000 (21:10 -0500)]
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>
Nick Clemens [Wed, 1 Apr 2020 13:39:13 +0000 (13:39 +0000)]
Bug 25033: Move branchfilter to top of page
There is confusion becase it is not obvious when the suggestions page is being limited to a branch
Moving the branch filter to the top of the page makes it easier to see
To test:
1 - Apply patch
2 - From mainpage or acqui-home note the link to suggestions takes you to suggestions limited to current branch
3 - Change the dropdown
4 - Note the page refreshes and loads the correct suggestions
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Wed, 1 Apr 2020 12:46:17 +0000 (12:46 +0000)]
Bug 25033: Remove CountSuggestion
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Wed, 1 Apr 2020 12:38:02 +0000 (12:38 +0000)]
Bug 25033: Display both local and all pending suggestions counts if the numbers differ
To test:
0 - Be in staff client as a superlibrarian
1 - Place some suggestions
1 for any branch
1 for signed in branch
1 for another branch
2 - Go to Koha main page, 3 suggestions pending
3 - Click 'Suggestions pending approval' - you see one suggestion
4 - Click on 'Acquisitions' in breadcrumbs , 3 suggestions pending
5 - Click manage suggestions - you see one suggestion
6 - Apply patch
7 - On mainpage and acqui-home you now see "Centerville: 1 / All libraries: 3" suggestions
8 - Confirm that the links take you to suggestions view of your branch or all libraries respectively
9 - Turn on IndependentBranches
10 - Create a user with acquisition and suggestions permissions but not superlibrarian in one of the branches used above
11 - Sign in as that user
11 - See "Centerville: 1" suggestion on mainpage and on acqui home
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>
Martin Renvoize [Fri, 21 Aug 2020 08:24:29 +0000 (09:24 +0100)]
Bug 26265: Add pos directory to the Makefile
This patch adds the /pos directory to the Makefile so that pos gets
properly mapped at make and install time.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Chris Cormack [Sun, 30 Sep 2012 21:58:06 +0000 (10:58 +1300)]
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>
Owen Leonard [Thu, 6 Aug 2020 12:41:23 +0000 (12:41 +0000)]
Bug 16112: (follow-up) Form style improvements, clear date
This follow-up makes some markup and style improvements in order to make
the renew form more consistent with similar forms like checkout and
check-in.
It also adds a "Clear" button for the datepicker field, matching similar
date inputs.
To test, apply the patch and go to Circulation -> Renew.
- With or without the SpecifyDueDate system preference enabled the
form should look correct.
- With the SpecifyDueDate preference enabled you should see the date
form below the barcode input field.
- Select a date and test that the "Clear" button works to clear it.
- Compare to the check-in page to confirm that they look consistent
with each other.
Signed-off-by: Marco Abi-Ramia <marco.abi-ramia@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 4 Aug 2020 14:55:56 +0000 (16:55 +0200)]
Bug 16112: Add the ability to define due date for batch renew
Same as bug 16748, for batch renew.
Test plan:
Check an item in
Renew it using the circ/renew.pl page
=> You can pick a due date!
=> The date is kept from one renew to another
Renew it until you reach the maximum number of renewals
=> You get a warning with "continue without renewing"
=> The date is still kept
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nick Clemens [Thu, 1 Nov 2018 15:11:36 +0000 (15:11 +0000)]
Bug 21750: Move collection code to its own column on checkins table
To test:
1 - Set 'ShowAllCheckins' to show
2 - Set a collcection code for an item
3 - Check it in
4 - Note it displays in the the 'Item type' column
5 - Apply patch
6 - Check it in again
7 - Note the new 'Collection' column
8 - Hide/show the column using column visibility on the checkins page
9 - Go to Admin->Configure columns
10 - Test the various settings for this column and check in the item to
make sure they work as expected
Signed-off-by: Devinim <kohadevinim@devinim.com.tr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
It adds a new localization directory that could
host a custom SQL file for each language,
xx-YY/custom.sql
This will be the last file to be loaded at
install time, it can be used to set any difference
from default values.
It can't be deselected at install time.
Moved corresponding files for de-DE, it-IT,
nb-NO and completed es-ES
To test:
1) Apply the patch
2) Install es-ES/de-DE/it-IT/nb-NO translation (any lang)
( cd misc/translation; ./translate install es-ES )
3) Do a clean install using es-ES
4) After all files have been loaded check:
* A new section labeled "Localization data added"
with one file, custom.sql
* Inspect the value of FrameworksLoaded syspref,
last entry must be custom.sql
5) Remove/rename the file or localization dir and
repeat 3/4, install must proceed normally
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
And automatically extends the test when new scopes are added.
This also obsoletes the "Get effective issuing rule in correct order"
test in t/db_dependent/Koha/IssuingRules.t
To test:
1. prove t/db_dependent/Koha/CirculationRules.t
Sponsored-by: The National Library of Finland Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD amended patch: perl tidy
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Sat, 13 Jun 2020 10:36:01 +0000 (12:36 +0200)]
Bug 25728: Use a svc script instead of the REST API endpoint
The try to implement correctly the REST API endpoint for authorised
values failed.
This patch uses an easy to implement svc script for the POST route.
Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 9 Jun 2020 16:02:14 +0000 (18:02 +0200)]
Bug 25728: Don't explode if no CAN_* var defined
Sponsored-by: Orex Digital Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 9 Jun 2020 15:57:19 +0000 (17:57 +0200)]
Bug 25728: Fix the clone field feature
Sponsored-by: Orex Digital Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 9 Jun 2020 15:34:30 +0000 (17:34 +0200)]
Bug 25728: Don't explode in the advanced editor
Sponsored-by: Orex Digital Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Tue, 9 Jun 2020 15:34:34 +0000 (17:34 +0200)]
Bug 25728: Create AV when cataloguing an authority record
Test plan:
Same as the first patch but when cataloguing an authority record
Sponsored-by: Orex Digital Signed-off-by: Hugo Agud <hagud@orex.es> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>