Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 24321: Make objects.search use mappings from Koha::Object(s)
This patch simplifies the objects.search helper so it relies entirely on
the result set object for the attribute mappings.
The result is no more to_api or to_model mappings are passed. The
controllers need to be cleaned up after this patch.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Note: the original version of this helpers accepted arbitrary mappings
and are now constrianed to real mappings on the Koha::Object level. As
such, the number of tests got reduced.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 24321: Make dbic_merge_sorting accept a result set as parameter
This patch makes dbic_merge_sorting accept a result set as parameter and
solves a FIXME in _build_order_atom.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/Koha/REST/Plugin/Query.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch makes the 'attributes_from_api' method from the singular
class available from the result set class.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Objects.t
=> SUCCESS: Tests pass!
4. Sign off :-D
5. Yeah, I skipped 3 :-P
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds exception handling to the attributes_from_api() method.
This can happen with invalid date/datetimes, for example.
Tests are added:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Object.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch makes the input date format explicit. It also adds a missing
POD.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Fri, 27 Dec 2019 14:21:27 +0000 (15:21 +0100)]
Bug 23893: No special care for booleans
Tests pass without that changes. If we need them they should be at
Koha::Object anyway.
About the date, I also think that that should be moved to Koha::Object
(we can guess it, like we do in Koha::Object->store, retrieve the
datatype and adjust). Also we can send a DT object to DBIC, no need for
an sql formatted date
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch makes the patrons endpoint use the new methods from
Koha::Object.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch makes the cities controller use the new methods from
Koha::Object.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/api/v1/cities.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 23893: Add new_from_api and set_from_api to Koha::Object
This patch introduces the following methods to the Koha::Object class:
- set_from_api
- new_from_api
This methods are going to be used when writing API controllers that map
to the attributes to the DB schema ones.
To test:
1. Apply this patchset
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Object.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch implements the from_api_mapping method, that calculates (and
caches) the reserve mapping from the to_api_mapping method.
A generic to_api_mapping is added to simplify things a bit in the generic
to_api method and so the mappings are reusable in the way they are in
from_api_mapping.
To test:
1. Apply this patches
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Object.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch introduces tests for the implemented methods.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Alex Arnaud [Thu, 6 Dec 2018 08:43:42 +0000 (09:43 +0100)]
Bug 21959: Batch item modification - ability to apply regular expression on text fields
Test plan:
- go to Tools > Batch item modification,
- select items to modify,
- for one or some text fields, check the second checkbox (Use regular
expression) and type your regex,
- check the regex has been applied.
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Mathilde Formery <mathilde.formery@ville-nimes.fr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Lucas Gass [Thu, 26 Dec 2019 17:12:25 +0000 (17:12 +0000)]
Bug 24308: Suggestions table on suggestions.pl should have separate columns for dates
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 23 Dec 2019 15:19:47 +0000 (16:19 +0100)]
Bug 24277: Fix date received editing when receiving an order
Bug 8417 added the ability to edit the date received, but a merge
conflict was wrongly resolved during a rebase of
commit 20d9ed618fbe3cdcb9c04444a1f8a584b0364069
Bug 13321: Rename variables
Test plan:
Create an order
Receive it
Set a date (different from today)
=> The date you picked should have been set in DB for the order
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 18 Dec 2019 13:04:58 +0000 (14:04 +0100)]
Bug 24263: Replace borrowers.relationship with NULL when was empty string
When you create a new patron, its relationship field is populated with
an empty string when we are expecting NULL.
Otherwise the about page will display a warning about a missing/wrong
relationship in data (that is not in the syspref)
Test plan:
0/ Do not apply the patches from this bug report
1/ Create a new patron (child)
2/ Notice that relationship column in DB is set to an empty string
3/ Go to the about page, notice the invalid warning about relationship
values not in the syspref
4/ Apply DB changes and tests
5/ Execute the update DB entry
=> The value in DB is now NULL when was ""
6/ Execute the tests
=> It fails
7/ Apply the last patch
8/ Add and edit a patron (child)
=> relationship is set to NULL in DB
9/ Execute the tests
=> They pass!
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 18 Dec 2019 13:08:34 +0000 (14:08 +0100)]
Bug 24263: DB changes
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 18 Dec 2019 13:04:35 +0000 (14:04 +0100)]
Bug 24263: Add tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 2 Jan 2020 10:38:18 +0000 (11:38 +0100)]
Bug 24327: Redirect to the login form if AnonSuggestion misconfigured
Test plan:
Turn on AnonSuggestion but set AnonymousPatron to an invalid value
Go to /cgi-bin/koha/opac-suggestions.pl?op=add
=> You see the login form
Signed-off-by: hc <hc@interleaf.ie> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 2 Jan 2020 10:26:49 +0000 (11:26 +0100)]
Bug 24327: Add warning to the about page is AnonSugggestions but AnonymousPatron
This patch adds a warning to the about page if AnonSuggestions is set
but AnonymousPatron.
Test plan:
Turn on AnonSuggestions and set AnonymousPatron to 0
=> You see a warning on the about page
Turn on AnonSuggestions and set AnonymousPatron to an invalid value
=> You see a warning on the about page
Turn off AnonSuggestions
=> No warning
Turn on AnonSuggestions and set AnonymousPatron to a valid value
=> No warning
Signed-off-by: hc <hc@interleaf.ie> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 2 Jan 2020 13:03:07 +0000 (13:03 +0000)]
Bug 24329: Prevent update of timestamp on action_logs updates
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>
Jonathan Druart [Mon, 6 Jan 2020 21:10:16 +0000 (22:10 +0100)]
Bug 24350: Fix Branches.pickup_locations
This will fix the following error:
Template process failed: undef error - Not a HASH reference at
/home/vagrant/kohaclone/Koha/Template/Plugin/Branches.pm line 96.
at /home/vagrant/kohaclone/C4/Templates.pm line 122
Koha::Libraries->pickup_locations does not always return an array, but
arrayref if $biblio is not a Koha::Biblio object.
I do not think it's the correct fix, the pattern in
Koha::Libraries->pickup_locations is wrong: we should not expect 2
different types for a given parameter, biblio should always be a
Koha::Biblio (idem for item btw).
That could be fixed easily if the template had the Koha::Biblio object
sent.
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 7 Jan 2020 11:10:05 +0000 (12:10 +0100)]
Bug 21684: Fix UploadedFile[s]->delete
Tests were failing with:
# Failed test 'Test delete via UploadedFile as well as UploadedFiles'
# at t/db_dependent/Upload.t line 193.
DBIx::Class::Row::delete(): Not in database at /kohadevbox/koha/Koha/Object.pm line 219
I am not sure this patch is perfect, a set of uploaded files should be
deleted in a transaction, which would be rollback if something is wrong.
But it will be tricky to restore the files after they have been deleted.
It seems that we should deal with that with a more complicated process
and should be part of a separate bug.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 7 Jan 2020 15:02:36 +0000 (16:02 +0100)]
Bug 24150: Prevent random failure comparing updated_on
Jenkins is currently failing (slow server, datetime comparison, etc.)
koha_1 | # Failed test at t/db_dependent/Koha/Old.t line 48.
koha_1 | # Structures begin differing at:
koha_1 | # $got->{updated_on} = '2020-01-07 14:15:22'
koha_1 | # $expected->{updated_on} = '2020-01-07 14:15:21'
koha_1 | # Looks like you failed 1 test of 1.
koha_1 |
koha_1 | # Failed test 'Koha::Old::Patrons'
koha_1 | # at t/db_dependent/Koha/Old.t line 49.
koha_1 | # Looks like you failed 1 test of 2.
koha_1 | [14:15:22] t/db_dependent/Koha/Old.t ...............................................
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Katrin Fischer [Sun, 29 Dec 2019 03:36:35 +0000 (03:36 +0000)]
Bug 24314: Update de-DE MARC21 frameworks for updates 28+29 (May and November 2019)
This updates the MARC framework files in the de-DE (German) installer
to the latest MARC standard. The files also include some translation
changes and fixes.
Files have been generated using the po files on translate.koha-community.org.
To test:
- Run the de-DE installer on a fresh database
- Verify that all files are installed without errors
- Verify that the frameworks are correctly in place
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
MARC21 files load without problems, no qa errors.
Loaded into 'en' install (delete fw then load) all frameworks look good.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 24312: Update MARC21 frameworks to Updates 28+29 (May and November 2019)
MARC21 format changes
Bibliographic
-------------
Update 28 (May 2019)
New subfield f in 540
New subfield g in 506,540
New subfield q in 506,540
New subfield 2 in 540
New subfield 2 in 100,110,111,130,240,
700,710,711,730,758
800,810,811,830
New subfield 7 in 856
New code b in 007/01 Sound Recording
Update 29 (November 2019)
New field 688
New subfield i in 041
New subfield t in 041
New subfield g in 751
Renamed subfield g in 041
Authority
---------
Update 28 (May 2019)
New subfield 0 and 1 in 024
Renamed subfield 2 in 024
New subfield 7 in 856
Update 29 (November 2019)
No changes
To test:
1) Remove all your frameworks
2) Check mandatory bibliographic and authority files load without problem
3) Check new fields/subfields
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>
Jonathan Druart [Tue, 7 Jan 2020 11:26:01 +0000 (12:26 +0100)]
Bug 24361: (bug 24217 follow-up) Fix several warnings in C4 modules
With bug 24217 pushed, lot of warnings appears during the tests are run.
Most of them are "Use of uninitialized value in "
Test plan:
Take a look at the output of run 1049
https://jenkins.koha-community.org/job/Koha_Master_D9/1049/consoleFull
Most of the warnings from this run will be removed by this patch
At least 2 are not fixed:
Use of uninitialized value in numeric eq (==) at /kohadevbox/koha/C4/Reserves.pm line 791.
t/db_dependent/Items_DelItemCheck.t => see 23463
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 7 Jan 2020 11:26:01 +0000 (12:26 +0100)]
Bug 24361: Fix warning in C4::Record line 435
Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/C4/Record.pm line 435
Caught by a failing test:
# Failed test 'Export csv with wrong marcxml should raise a warning'
# at t/db_dependent/Exporter/Record.t line 113.
# found warning: problem with :721 : :1: parser error : Start tag expected, '<' not found
# found warning: Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/C4/Record.pm line 435.
# expected to find warning: (?^u:.*Start tag expected.*)
Test plan:
Make sure the tests pass now
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Mon, 6 Jan 2020 22:49:37 +0000 (23:49 +0100)]
Bug 24150: Add missing koha_object[s]_class methods and skip for deletedborrowers
deletedborrowers does not have a PK, and adding it is out of the scope
of this patchset. Indeed we will have to handle possible duplication of
borrowernumber values, which does not seem trivial.
Having bug 20271 in mind, we will have to deal with this problematic
anyway later.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 21 Nov 2019 13:59:43 +0000 (13:59 +0000)]
Bug 24080: Add payout option to patron account page
This enhancement adds a refined workflow to allow librarians to pay out
money to patrons and record these payouts on the patrons account.
The use case is that a patron has somehow accrued credit, through a
refund perhaps, and the library wants to be able to physically hand over
some money to balance the patrons account.
Test plan:
1) Undertake a series of transactions that result in some outstanding
credit on a patrons account.
2) Note that a new 'Issue payout' button appears next to a credit with
an outstanding balance (but only if your user has the payout
permission or is a superlibrarian)
3) Click the 'Issue payout' button and a modal should appear
pre-populated with the amountoutstanding.
4) You should be able to edit the amount you wish to payout, make
payment or cancel.
5) Signoff
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 21 Nov 2019 14:28:03 +0000 (14:28 +0000)]
Bug 24080: Add updatecharge payout permission
Add a new subpermission called 'payout' to the 'updatecharges'
permission group which will allow/prevent payout actions to be performed
by staff.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 21 Nov 2019 13:22:39 +0000 (13:22 +0000)]
Bug 24080: Add 'payout' method to Koha::Account::Line
This enhancement adds a 'payout' method to Koha::Account::Line which can
be used to 'pay out' a credit to a patron.
When such a credit is 'paid out' this method will create a corresponding
account debit line with an amount equal to the amountoutstanding on the
original credit and the two acocuntlines will be immediately applied against
each other.
Test Plan:
1) Run the included tests and verify they pass.
2) Signoff
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Martin Renvoize [Thu, 21 Nov 2019 14:50:12 +0000 (14:50 +0000)]
Bug 24080: Payout account debit type
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Fri, 13 Dec 2019 23:42:28 +0000 (23:42 +0000)]
Bug 10469: Display more when editing subfields in frameworks
This patch removes the accordion feature from the MARC subfields
structure editor. The form is not long, and I think in this case the
accordion makes the process more difficult to navigate.
To test, apply the patch and go to Administration -> MARC frameworks ->
Framework structure -> Subfield structure -> Edit. Choose a tag with
multiple subfields to best test the changes.
The whole form should apppear, and tabs functionality should work
correctly. Test that making changes under multiple tabs works correctly.
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>
Owen Leonard [Mon, 16 Dec 2019 19:06:57 +0000 (19:06 +0000)]
Bug 7882: (follow-up) Update sorting interaction
This follow-up modifies the CSS for the sortable fields so that a
different icon is used. Elsewhere in Koha (stock rotation stage sorting)
we use the "bars" icon to indicate a sortable element. I think it would
be good to continue to use this. The cursor is now styled as a "Move"
cursor.
The configuration of the sortable function in the script has been
updated in two ways: 1. The movement of the element is constrained along
the y-axis, and 2. The movement of the element is contstrained to the
container within which it can be moved (for the tag, the tab, and for
the subfield, the tag).
To test, apply the patch and edit a MARC record in the basic cataloging
editor.
Confirm that the new icon is used, and that the "Move" cursor shows when
you hover over the icon.
Confirm that a tag can be dragged up and down within the constraints of
the visible section. A subfield should be only movable within its parent
tag.
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Maryse Simard [Wed, 23 Oct 2019 19:34:39 +0000 (15:34 -0400)]
Bug 7882: Add ability to move and reorder fields in MARC editor
Use jQueryUI sortable to make fields and subfields moveable in the
MARC editor for both records and authorities.
This patch convert items from div's to ul's and consequently alter css
and js to match. It also replace the up arrow with a more adapted icon
(from font awesome).
Primary authorship by Elliott Davis.
To Test:
1. Add or edit a record in cataloguing module.
2. You should be able to move the fields and subfields around.
- You can click on any part of the element to drag it, the move
icon to the left of the item is a good place to do it.
=> You can only change the order of fields of the same tag.
3. Make sure all of the javascript driven fonctionnality still work :
- Duplicate fields/subfields
- Remove fields/subfields
- Using the tag editor for control fields or to link authorities
- etc
4. Reorder some fields/subfields and save the record.
5. Edit the record again.
6. The order in the editor should match the changes which were saved.
- Empty subfields should appear after the ones with content.
7. Repeat steps 1-6 with the authority editor.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Cori Lynn Arnold [Wed, 18 Dec 2019 18:18:59 +0000 (18:18 +0000)]
Bug 24173: Advanced Editor: Show subtitle & published date on the search page
To test:
Prior to patch:
1/Verify that EnableAdvancedCatalogingEditor syspref is set to "enable"
2/Go to Cataloging
3/Click on "Advanced Editor" button
4/In left hand box put "specious" under Keywords and hit "enter"
5/verify that "Library of Congress" (or some other server) Z39.50 is checked
6/Verify that there are no headings for "Subtitle" and "Published"
Apply Patch
1/Go to Administration->Koha to MARC mapping
2/Add or verify that there are entries for "biblio.subtitle" and
"biblio.copyrightdate"
3/Go to Cataloging
4/Click on "Advanced Editor" button
5/In left hand box put "specious" under Keywords and hit "enter"
6/verify that "Library of Congress" (or some other server) Z39.50 is checked
7/Verify that there are headings for "Subtitle" and "Published" and the
data matches with the fields from Koha to MARC mapping when you click on
"View MARC" link for that record.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Mon, 18 Nov 2019 18:21:52 +0000 (18:21 +0000)]
Bug 24059: Remove unused Greybox assets from detail.tt
This patch removes reference to the Greybox include file because it is
unused.
To test, apply the patch and view the bibliographic details page. Test
various JavaScript-driven interactions to make sure no functionality has
been broken: Menus, tabs, table filters, MARC Preview, etc.
Searching for "gb-" or "GB_" should return no results in any files
related to the details page.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Aleisha Amohia [Wed, 11 Dec 2019 05:07:31 +0000 (05:07 +0000)]
Bug 24212: Increase size of OPAC 'send list' dialog box for IE
To test:
1) Create a list and view it in the OPAC (ensure you are using Internet
Explorer as a browser)
2) Click Send list
3) Notice the dialog box cuts off the content in the window
4) Close the popup, apply the patch
5) Click Send list again
6) Confirm the dialog box shows the entire window
7) Confirm the box is resizable and has scrollbars
Sponsored-by: Toi Ohomai Institute of Technology Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Pasi Kallinen [Tue, 19 Nov 2019 09:26:01 +0000 (11:26 +0200)]
Bug 24063: Add Sami language characters to Zebra
Some Sami languages need few more characters to be mapped, or
are otherwise very hard to search for.
Test plan:
1) Catalogue a new record with title "Ǩoǯeŋa"
2) Make sure zebra indexed that record, then try to search for
it with the text "kozena"
3) Apply patch
4) Redo 2, now the record should be found.
Signed-off-by: Pasi Kallinen <pasi.kallinen@koha-suomi.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 5 Dec 2019 15:33:00 +0000 (16:33 +0100)]
Bug 24181: Move the icon back into the input
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Thu, 5 Dec 2019 15:27:35 +0000 (16:27 +0100)]
Bug 24181: Make our datepicker inputs sexy
They are skinny and different from others.
Not that a problem, I am too.
But I do not think it is what they need.
Test plan:
Edit a patron and take a look at the input for "Date of birth"
=> Before this patch they are not looking great
=> After this patch they are beautiful
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Sun, 3 Nov 2019 23:45:44 +0000 (23:45 +0000)]
Bug 23957: Remove button style with famfamfam icon background and replace with Font Awesome
The patch modifies the markup and CSS related to the holds template in
the staff client when holds policy override is necessary. The CSS
background image is replaced with a Font Awesome icon. <input>s are
replaced with <button>s to allow for the icon markup.
To test, apply the patch and regenerate the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- Enable the AllowHoldPolicyOverride system preference.
- Start the process of placing a hold for a patron on a title which
would not normally be available for hold. For instance: The patron
already has too many holds.
- On the hold confirmation screen the "Place hold" buttons should
appear with a little yellow "warning" icon.
- Clicking either of the two "Place hold" buttons should trigger a
confirmation dialog. Test both the "Confirm" and "Cancel" options.
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Sun, 3 Nov 2019 22:31:39 +0000 (22:31 +0000)]
Bug 23956: Replace famfamfam calendar icon in staff client with CSS data-url
This patch modifies the staff client CSS so that the backround image for
datepicker input fields is defined as a data-url rather than a reference
to an image file.
To test, apply the patch and regenerate the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).
- In the staff client, view any form which includes a datepicker-styled
input. For instance, patron entry: date of birth, expiry; Aquisitions
-> Late orders -> Filter results.
- Confirm that the calendar icon looks correct.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Josef Moravec [Wed, 3 Jul 2019 22:29:42 +0000 (22:29 +0000)]
Bug 22284: Schema update
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Agustin Moyano [Wed, 29 May 2019 05:06:46 +0000 (02:06 -0300)]
Bug 22284: (follow-up) Squash multiple follow-ups
* Bug 22284: (follow-up) Use GetReserveControlBranch in Koha::Item->pickup_locations
* Bug 22284: (follow-up) Fix tests
* Bug 22284: (follow-up) Fix typo in request.tt
* Bug 22284: (follow-up) Filter pickup on specific item click
* Bug 22284: (follow-up) Fix typos transfered -> transferred
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Agustin Moyano [Tue, 28 May 2019 02:49:05 +0000 (23:49 -0300)]
Bug 22284: Add "patron's hold group" as new hold_fulfillment_policy option
This patch adds "patron's hold group" as a new option to Hold pickup library match
To test:
1. Set ReservesControlBranch preference to item.
2. Create a hold group
3. Go to circulation and fines rules
SUCCESS => in 'Hold pickup library match' there is a new option called "patron's hold group"
4. In a library not in hold group set 'Hold policy' to "any" and 'Hold pickup library match' to "patron's hold group"
5. Search for a user in the hold group
6. 'Search to hold' for items of the library of step 4
7. Select an item and 'Place hold for [user]'
SUCCESS => in 'Pickup at' you should see patron's hold group as options
8. In OPAC sign in as the same user of step 5
9. Search for the item in step 7
SUCCESS => in 'Pick up locations' you should see patron's hold group as options
10. Sign off
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
* Bug 22284: (follow-up) Remove commented warn and address test failures
* Bug 22284: (follow-up) fix test count after merge
* Bug 22284: (follow-up) fixes after 15496
* Bug 22284: (follow-up) fixes after 18936
* Bug 22284: (follow-up) Remove HomeOrHolding from reserves
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 22284: Filter item's pickup locations in holds_table.inc
This patch filters pickup locations per item in holds_table.inc
To test:
1) Go to Circulation and fines rules and change max holds allowed to > 0, and change 'Hold pickup library match' to homebranch
2) Search for a patron
3) Click on "Search to hold"
4) Search for any bilio
5) Place hold on a specific item
CHECK => Item's pickup location is a select with all libraries
6) Apply this patch
7) Repeat steps 2 to 5
SUCCESS => Item's pickup location is filtered by allowed pickup locations
8) Sign off
Sponsored-by: VOKAL Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 22284: New message, new column and filter pickup locations in reserve/request.tt
This patch adds a new message to 'Hold' column in 'Place a hold on a specific item' table.
The message is "Cannot place hold from patrons's library". It appears when patron's homebranch is not in item's hold group, and hold_fulfillment_policy is set to 'holdgroup'.
This patch also adds a new column "Allowed pickup locations" that lists allowed pickup locations per item.
Finally, the select that displays pickup locations is filtered by allowed pickup locations, when multi_hold is not enabled
To test:
1) Apply this patch
2) In library groups add a root group and check it as hold group.
3) Add two libraries to the group
4) In circulation and fines rules, in 'Default checkout, hold and return policy', in Hold policy change the value to 'From local hold group'
5) Search a patron from a different library than step 3, select one and click 'search to hold'
6) Search by location for items in any library of step 3
7) On any item, clic on 'Place hold for ...'
SUCCESS => when the page is loaded, in the 'Place a hold on a specific item', you should see the message "Cannot place hold from patrons's library" in 'Hold' column
=> You should see a new column called "Allowed pickup locations" and the message is "Any library"
8) In circulation and fines rules, in 'Default checkout, hold and return policy', in 'Hold policy' change the value again to 'From any library' and change 'Hold pickup library match' to "Item's hold group"
8) Repeat steps 5 to 7
SUCCESS => when the page is loaded, you should see the "Pickup at" select filtered by libraries in hold group
=> You should see in "Allowed pickup locations" a coma separated list of the libraries in item's hold group
=> If biblio has an item whose control branch is not in a hold group, you should see the control branch name in "Allowed pickup locations"
9) Sign off
Sponsored-by: VOKAL Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 22284: (follow-up) Default to circulation control branch when no hold libraries are found
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch modifies Koha::Libraries->pickup_location and moves most of the logic to
Koha::Item and Koha::Biblio in preparation for api endpoints in the future.
There where 2 methods added
1) Koha::Item->pickup_locations that given a patron, returns all pickup locations of
this item, considering hold fulfillment rules, and hold allowed rules.
2) Koha::Biblio->pickup_locations that given a patron, returns a distinct list of
libraries returned by each of this biblio items pickup location.
Koha::Libraries->pickup_location analyzes input param and calls Koha::Item->pickup_locations
or Koha::Biblio->pickup_locations as needed.
Also in opac-reserve.tt the way options where obtained to fill the pickup location select
was modified to pass the patron as a parameter.
To test:
1) opac: try to place hold on a item and check that all libraries are shown in the
pickup location select.
2) intranet: in Library groups, add 2 root groups marked as local hold group and
add different libraries to each.
3) opac: login as a user of a library belonging to one hold group, and search try to
place a hold on an item belongin to the other hold group.
4) intranet: in Circulation and fines rules, play with 'Hold policy' and 'Hold pickup
library match' rules.
5) opac: On each modification of the rules reload the page.
SUCCESS => Every time you reload the page, the number of pickup locations showed in
select varies.
6) prove t/db_dependent/Koha/Biblios.t t/db_dependent/Koha/Items.t
SUCCESS => Result: PASS
7) Sign off
Sponsored-by: VOKAL Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Agustin Moyano [Mon, 25 Mar 2019 02:00:36 +0000 (23:00 -0300)]
Bug 22284: New methods in Koha::Library::Groups and Koha::Library
This patch adds new methods in Koha::Library::Groups and Koha::Library.
1) For Koha::Library::Groups adds get_root_ancestor that returns all root
groups for a given search parameters, for example
Koha::Library::Groups->get_root_ancestor( { id => $group_id } )
2) For Koha::Library adds
2.1) get_hold_libraries: returns all libraries (including self) that
belongs to the same holdgroups. If $self belongs to several holdgroups
it will return a distinct list of all libraries belonging to them.
2.2) validate_hold_sibling: Returns 1 if the given parameters matches any of the
libraries that belong to any of the holdgroups this library belongs. For example
$library->validate_hold_sibling( { branchcode => $branchcode } )
To test:
1) apply this patch
2) prove t/db_dependent/Koha/Libraries.t t/db_dependent/LibraryGroups.t
SUCCESS => green letters :-D
3) Sign off
Sponsored-by: VOKAL Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Agustin Moyano [Mon, 25 Mar 2019 03:45:58 +0000 (00:45 -0300)]
Bug 22284: Control hold groups in C4::Reserves
This patch modifies C4::Reserves to control when hold group options where selected
in smart rules.
In CanItemBeReserved adds 2 new error status messages
1) branchNotInHoldGroup: when a patron's homebranch is not in item's hold group
2) pickupNotInHoldGroup: when a selected pickup location is not in item's hold group
Also CheckReserves is modified when item's priority is defined, to control by hold
group when required.
Finally, IsAvailableForItemLevelRequest was also modified to control by hold group when
required.
To test:
1) Apply this patch
2) prove t/db_dependent/Holds.t
SUCCESS => Result: PASS
3) Sign off
Sponsored-by: VOKAL Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Agustin Moyano [Mon, 25 Mar 2019 03:43:05 +0000 (00:43 -0300)]
Bug 22284: New hold group options in smart-rules
This patch adds new options for 'Default checkout, hold and return policy'
and 'Default holds policy by item type', both in 'Hold policy' and 'Hold
pickup library match' columns
To test:
1) Go to 'Circulation and fines rules' in admin
2) Check that there are no options for hold group in 'Hold policy' and 'Hold
pickup library match' columns
3) Apply this patch
SUCCESS => in 'Hold policy' you should see 'From local hold group' option, and in
'Hold pickup library match' you should see "Item's hold group"
4) Select any of those options and save
SUCCESS => options should be selected when page reloads
5) Sign off
Sponsored-by: VOKAL Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Agustin Moyano [Mon, 25 Mar 2019 01:56:06 +0000 (22:56 -0300)]
Bug 22284: Add new checkbox in Library Groups
This patch adds a new checkbox option 'Is local hold group' when you create a new root group.
To test:
1) In intranet go to Library Groups in admin module
2) Add new root group
3) Check that there is no 'Is local hold group' checkbox
4) Apply this patch
5) Add new root group
SUCCESS => a new 'Is local hold group' checkbox appears
6) Select 'Is local hold group' and save
7) Click edit button for root group
SUCCESS => 'Is local hold group' is checked
8) Sign off
Sponsored-by: VOKAL Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Agustin Moyano [Mon, 25 Mar 2019 01:50:42 +0000 (22:50 -0300)]
Bug 22284: New ft_local_hold_group column, and 'holgroup' enum option
In order to add groups for holds, this patch provides a new column in
library_groups to identify them. Also provides new enum option for
hold_fulfillment_policy column of default_branch_circ_rules,
default_circ_rules, default_branch_item_rules and branch_item_rules.
To test:
1) check that there is no ft_local_hold_group column in library_groups
and that there are no 'holdgroup' enum option in hold_fulfillment_policy
in default_branch_circ_rules, default_circ_rules, default_branch_item_rules
and branch_item_rules
2) apply this patch
3) perl installer/data/mysql/updatedatabase.pl && dbic
SUCCESS => !(step 1) ;-D
4) Sign off
Sponsored-by: VOKAL Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Tue, 24 Sep 2019 21:00:00 +0000 (18:00 -0300)]
Bug 24150: Add Koha::Old::*[s]
This bug report will add new classes for:
* Koha::Old::Patron[s]
* Koha::Old::Biblio[s]
* Koha::Old::Item[s]
* Koha::Old::Biblioitem[s]
Sponsored-by: Association KohaLa - https://koha-fr.org/ Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Jonathan Druart [Wed, 11 Dec 2019 12:02:07 +0000 (13:02 +0100)]
Bug 24217: use Modern::Perl for modules when strict is missing
We absolutely need that for modules.
We are enabling strict by using Modern::Perl.
Note that other modules from C4 use strict and warnings, instead of
Modern::Perl
Test plan: git grep 2505 **/*.pm should not return any results
And let's see later what needs to be fixed.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Lari Taskula [Tue, 12 Nov 2019 12:24:30 +0000 (12:24 +0000)]
Bug 24016: Add a failing test for overwrite-able manager_id in Koha::Patron::Message
To test:
1. prove t/db_dependent/Koha/Patron/Messages.t
2. Observe failure
t/db_dependent/Koha/Patron/Messages.t .. 2/12
Failed test 'Manager id should be overwrite-able even if defined in userenv'
at t/db_dependent/Koha/Patron/Messages.t line 90.
got: '1100'
expected: '1101'
Looks like you failed 1 test of 12.
t/db_dependent/Koha/Patron/Messages.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/12 subtests
Sponsored-by: Koha-Suomi Oy Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nick Clemens [Wed, 3 Jul 2019 19:11:54 +0000 (19:11 +0000)]
Bug 23261: Add notice for login/registering to RBdigital results
To test:
1 - You will need a valid library RBDigital account
2 - Fill in the RecordedBooks system preferences
3 - Open the catalog, perform a search with RBDigtal resuls, 'love' often works
4 - Click to the results
5 - Note if not logged you don't see availability
6 - Log in with a patron with no email, note you do not see any notice that you must register your email with RBDigital
7 - Apply patch
8 - Reload results, you now see a notice to register with rbdigital, do so unless you already have an account
9 - Add your associated email to the koha account
10 - Reload results, note you see availability
11 - Log out, reload results
12 - Note you see a promp to login to see availability
Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Owen Leonard [Mon, 28 Oct 2019 16:02:35 +0000 (16:02 +0000)]
Bug 23913: Use a single menu to sort lists in the OPAC
This patch modifies the sorting form on the OPAC list contents view so
that the two menus (sort field and direction) are combined into one.
This makes it consistent with the sort menu on the search results page.
To test, apply the patch and view a list with multiple titles on it.
Test the "Sort by" menu, trying all the various options. Confirm that
the pre-selected item in the sorting menu is correct after each re-sort.
Edit the list to change the default sorting and verify that the "Sort
by" menu reflects your selection.
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>