Kyle M Hall [Mon, 1 Feb 2021 18:22:58 +0000 (13:22 -0500)]
Bug 27586: Import patrons script has a confirm switch that doesn't nothing!
If the script misc/import_patrons.pl is run without "--confirm" it reports
that it is "running in dry-run mode" but it is not!
Test Plan:
1) Import a CSV of patrons using import_patrons.pm *without* the --confirm parameter
2) Note that it does actually import the patrons
3) Apply this patch
4) Note that this time the patrons are not actually imported
5) Import again with --confirm
6) Note that the patrons were actually imported this time!
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>
(cherry picked from commit d3005a2a4c493c624ffd6204f6fccc83ea350361) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 19e0b91e12b520387938bb9c20bd605b757d3211)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Eden Bacani [Tue, 19 Jan 2021 21:21:51 +0000 (21:21 +0000)]
Bug 27395: Add a warning to PatronSelfRegistrationDefaultCategory
This patch adds a warning to the PatronSelfRegistrationDefaultCategory system
preference to not use a regular patron category for self registration.
If a regular patron category code is used and the cleanup_database cronjob is setup
to delete unverified and unfinished OPAC self registrations, it permanently and
and unrecoverably deletes all patrons that have registered more than
PatronSelfRegistrationExpireTemporaryAccountsDelay days ago.
It also removes unnecessary apostrophes at the end of two self registration
and modification system preference descriptions.
Test plan:
1. Apply the patch.
2. Check that the warning message for the PatronSelfRegistrationDefaultCategory
system preference is clear and makes sense.
3. Sign off!
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>
(cherry picked from commit 065c955cc67b6f113c9fb5d5ed918ba1400b5af9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit aea5a5800a6a4aead6e8fa61fd8a12d2e9b5f1e4)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Kyle M Hall [Wed, 20 May 2020 13:30:45 +0000 (09:30 -0400)]
Bug 25552: Add missing Claims Returned option to MarkLostItemsAsReturned
Marking an item as a return claim checks MarkLostItemsAsReturned to see if claim_returned is a value in MarkLostItemsAsReturned.
However, this option was never added to MarkLostItemsAsReturned so an a return claim can never be automatically removed from the patron record, even if they wanted such behavior.
Test Plan:
1) Apply this patch
2) Restart all the things
3) Note the new return claims option on MarkLostItemsAsReturned in the system preferences
Signed-off-by: Marti Fyerst <mfuerst@hmcpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e53d559f4212fa4b25412fdd6325ae469328f26a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1fa7920f2a97574d455944e632e16e43503e239e)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Petro Vashchuk [Mon, 25 Jan 2021 15:37:37 +0000 (17:37 +0200)]
Bug 27549: "use of uninitialized value" warning on renew.pl
On the beginning we have empty "barcode" parameter for this form, but that not taken into account in regular expression warning emitted: "Use of uninitialized value $barcode in substitution (s///) at /usr/share/koha/intranet/cgi-bin/circ/renew.pl line 47." in renew.pl
Fixed by making $barcode to become an empty string by default.
To reproduce:
1) Head over to the "Circulation -> Renew" page.
2) Check intranet-error.log there will be a warning "Use of uninitialized value $barcode in substitution (s///) at /usr/share/koha/intranet/cgi-bin/circ/renew.pl line 47".
3) Apply the patch, refresh the "Renew" page.
4) Ensure that the new "use of uninitialized value" warnings didn't appear in the console.
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>
(cherry picked from commit 1af07787032275813e1e458cfed8504b482cd1c6) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit fa472369c034cbcda80f6025ab3fbdbed58bda7c)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Petro Vashchuk [Mon, 25 Jan 2021 15:35:18 +0000 (17:35 +0200)]
Bug 27548: "use of uninitialized value" warning on branchoverdues.pl
On the beginning we have empty "location" parameter for this form,
but that not taken into account in comparison and undef warning emitted:
"Use of uninitialized value $location in string eq at
/usr/share/koha/intranet/cgi-bin/circ/branchoverdues.pl line 72" in branchoverdues.pl
Fixed by adding pre-check for $location.
To reproduce:
1) Head over to "Circulation ->Overdues with fines" page. Check
intranet-error.log where there will be many warnings
"Use of uninitialized value $location in string eq at /usr/share/koha/intranet/cgi-bin/circ/branchoverdues.pl line 72".
2) Apply the patch, refresh the "Overdues with fines" page.
3) Ensure that the new "use of uninitialized value" warnings didn't appear in the console.
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>
(cherry picked from commit c3d22687568640930bad9ffbb426033423e7efe9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 44d1675aaf1e602e12ccd669dad50a299654f89d)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Petro Vashchuk [Sun, 24 Jan 2021 19:42:10 +0000 (21:42 +0200)]
Bug 27538: fix correlation of fields in Holds to Pull table
Bottom filtering row of "Holds to pull" table do not correlate to other
ones, columns diverged from "Call numbers" cell: it should be under
"Available call numbers" while it's under "Available barcodes", and so
on to the last cell (while number of cells still adjusted).
To reproduce:
1) Head to the Holds to Pull page, check that bottom filtering row
shifted to the left by one, starting from the "Call number"
column and don't correlate to the upper table (for example, "Call
numbers" cell should be under "Available call numbers" while it's
under "Available barcodes"), and so on for all cells till the end
of the filtering row.
2) Apply patch.
3) Refresh Holds to Pull page and ensure that all filtering row
columns correlate to other rows columns correctly.
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>
(cherry picked from commit 65d09dc52097a6630d54ae45e3df1086b55a59ae) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit bc86c63c6b98d50908be039f9c45336d6b3471bf)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Nick Clemens [Fri, 29 Jan 2021 11:06:34 +0000 (11:06 +0000)]
Bug 27576: Don't show import recordds table after cleaning a batch
Currently if you clean a batch from the manage marc records page, the import records table appears with no items at the bottom of the screen
This is because we test for import_batch_id, we should also make sure we didn't just clean a batch
To recreate:
1 - Stage a batch for import
2 - Go to 'Manage staged records'
3 - 'Clean' the batch you just imported
4 - Note the empty table that appears at the bottom of the page
5 - Apply patch
6 - Repeat 1-3
7 - Note the table no longer appears
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit dc072ee4ba9361d35d92efd46b2935ff1b608b0d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 329d5797b3c6fc28814dc9f73717eb9f6eba0066)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Owen Leonard [Fri, 29 Jan 2021 13:19:12 +0000 (13:19 +0000)]
Bug 27571: "Add to lists" on MARC and ISBD view of OPAC detail page doesn't open in new window
This page corrects the global click handler in the OPAC so that all
"addtoshelf" links will work correctly to trigger the popup window for
adding titles to a list.
To test, apply the patch and test the process of adding a title to a
list in the OPAC from various places:
Nick Clemens [Thu, 28 Jan 2021 18:56:39 +0000 (18:56 +0000)]
Bug 26298: Don't set too_many_items_to_process if equal to limit
In the code we prepare items for display if less than or equal to the pref, but we don't allow
the edit if greater than or equal to the pref. The second case should be only 'greater than'
To test:
1- Set MaxItemsToProcessForBatchMod to 1000
2- Go to Reports
3- Make a report for itemnumbers that will give you at least 1000 items (ex. SELECT itemnumber FROM items)
4- Save and run the report
5- In "Rows per page", choose 1000
6- Click on "Batch operations with 1000 visible records" > Batch item modification
7- Notice that the item modification form isn't there and that the message says "Too many items (1000): You are not allowed to edit more than 1000 items in a batch."
8- Apply patch
9- Restart all the things
10- Run the report again and display 1000 rows
11- Click on "Batch operations with 1000 visible records" > Batch item modification
12 - Sucess!
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ae76d7626b0a23830b0269c00cbc2be73720d9ec) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7a8a166bd1e5a55062857a481bb543b0450cf2e1)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Kyle M Hall [Fri, 11 Dec 2020 12:13:12 +0000 (07:13 -0500)]
Bug 27204: Fix end boundary index, never return results for non-existant accountlines
There are two primary issues I've identified with requesting line items
for fees via SIP:
1) The end boundary is incorrect. For example, if send a request with a
BP ( starting item) of 1, and a BQ (end item) of 1, I should get just
the first item. Instead I will get two items
2) Our SIP server does not check bounds. For example, if I have 3 fines,
but I send a BP of 1 and a BQ of 5, I will get back 5 AVs, two of
them being "empty" because the patron only has 3 accountlines!
Test Plan:
1) Apply the unit test patch
2) prove t/db_dependent/SIP/Patron.t
3) Note the failures
4) Apply the second patch
5) prove t/db_dependent/SIP/Patron.t
6) All tests should pass!
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>
(cherry picked from commit 0a5232412fee9a9811b7354c8ea98ee889eaee3c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0ebfff111dcecca92deffb36fd62e58e0a9e3bba)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Jonathan Druart [Wed, 27 Jan 2021 09:22:27 +0000 (10:22 +0100)]
Bug 27530: Set correct dateofbirth for 'C'
Categories B, J, K and YA have a upper age limit of 17 years.
We are setting the dateofbirth to today - 15 years to prevent juvenils
to be 70!
Note that DATE_SUB is a MySQLism, but there is no way to be portable
here.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b647aff01d504533a5a3720c66e6adcf0067792f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 23dd20a9ced86e29ec37d01ade23eda92bb161b0)
Jonathan Druart [Wed, 27 Jan 2021 09:17:57 +0000 (10:17 +0100)]
Bug 27530: Set dateexpiry to 2099 in sample patrons
To prevent them to be expired.
Note that the last patron is kept expired.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit e3205b4c41497d83084a8a216eefa6dd377788b1) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c2f9610e3fddb93e247700b6030c8f4c54c8c872)
Jonathan Druart [Wed, 20 Jan 2021 11:09:30 +0000 (12:09 +0100)]
Bug 27450: Remove password from the mandatory fields when editing details
When a patron edit their personal details at the OPAC, the password must
be removed from the mandatory fields
Test plan:
0 - Don't apply the patch
1 - Set PatronSelfRegistrationBorrowerMandatoryField to require password
2 - Create or sign in as a patron on the opac
3 - Click 'Your personal details'
4 - Attempt to edit
5 - Save changes
=> They are rejected because not all required fields are populated
6 - Apply the patch
7 - Repeat 3 to 5
=> details are saved successfully
8 - Test the self registration feature and confirm that the password is
required
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4b2c284092eda3f70eaeaa1b136e9c0ae8f17f82) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 06c47d8f5b923ea3eba23b9127c201dd8d780693)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Nick Clemens [Thu, 28 Jan 2021 13:58:14 +0000 (13:58 +0000)]
Bug 27554: Clarify and add tests for update_category_to
This patch adds a comment to the existing tests, clarifying what they test, and verifying the expected patron is affected. The
original test should be broken by 26307 when the behvaiour is prevented
I additionally add a test for 'too old'
To test:
1 - Apply patch
2 - Prove tests, they should pass
3 - Verify the comments make sense
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD amended patch: behvaiour ==> behaviour
and add more info to the commit title
Bug 27580: Handle NULL values correctly in Koha::Items->filter_by_visible_in_opac
This patch fixes the internally used query so it doesn't consider NULL
values as IN the set.
To test:
1. Apply the regression tests patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Items.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: 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>
(cherry picked from commit b60ff6452ef2212a02f16ddc5c46edeb3d83a5e3) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 606f47b2e91dcc51b1348356d672e95f8943ab8a)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
This test makes all the generated sample items have undef copynumber,
and all rules are added copynumber => [ 2 ] on the tests as
suggested by Andrew on his failing example.
The tests are expected to pass. i.e. copynumber is clearly not equal to
2, so those items shouldn't be hidden.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Items.t
=> FAIL: Tests fail! undef is considered in [ 2 ]
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> 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>
(cherry picked from commit 00ea18282e622805321425789209ed9e0f8f7ea0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d767dc54a60e233afa9d295798eacc8cbc28a5f1)
Owen Leonard [Fri, 22 Jan 2021 15:20:00 +0000 (15:20 +0000)]
Bug 26755: Make the guarantor search popup taller
This patch changes the dimensions of the popup window in which
guarantors are chosen during the patron edit process.
The patch also removes an obsolete function delcaration for "Dopop"
which is unused.
To test, apply the patch and open a "child" type patron account for
editing.
Click the "Add guarantor" button. This should trigger a popup window.
Eyeball the size of the window, you'll be able to tell that it is
exactly 800 pixels wide.
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 5fbfecdb2f9dc690eec4a03569edef624fd6f452) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cc4f8b283fae830d631ffc1148179064f6f24872)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Nick Clemens [Tue, 24 Nov 2020 20:21:07 +0000 (20:21 +0000)]
Bug 26634: [20.05.x] Remove GetHoldRule subroutine in C4::Reserves
This routine is only used internally and incorrectly overrides
the precedence of holds rules - it should be removed
This patch removes the routine, adjusts tests, and adds test to
confirm correct precedence is followed
To test:
1 - At the All Libraries level, create a circ rule for a specific patron category and a specific item type that only allows 1 hold
2 - At the branch-specific level for Branch A, create an All/All rule that allows 2 holds
3 - confirm ReservesControll is set to patron's library
4 - find a patron from Branch A of the category for which you made your rule
5 - find two bibs with items of the itype got which you made your rule
6 - place a hold on one bib. success!
7 - try to place a hold on the second bib. you're told you cannot because the patron is only allowed 1 hold
8 - apply patch, restart services
9 - try to place your second hold again, success!
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Amy King [Thu, 21 Jan 2021 22:41:09 +0000 (22:41 +0000)]
Bug 20238: Display description of ITEMTYPECAT in search category
When adding or editing item types (Koha administration > Basic
parameters > Item types) the drop down list currently displays
the ITEMTYPECAT authorized value description. However, on the
item types page the authorized value is displayed in the search
category column.
This enhancement changes the item types page so that the search
category column displays the authorized value's description
instead of the authorized value code.
Test plan:
1. Go to Staff interface home page > Koha administration > Basic
parameters > Authorized values.
2. Find ITEMTYPECAT and add a new authorized value - make sure it
has a description.
3. Go to the Basic parameters > Item types page.
4. Edit an item type.
5. For the search category, select the new authorized value you
created. The desciption should be shown in the dropdown list.
6. Save the changes.
7. In the search category column for the item type you edited, it
should now display the description instead of the code.
8. Sign off!
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>
(cherry picked from commit d1e12c95e1d1ec907f6ed4465270569aa6c5a40d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7333d95a3f12f95f8ef00f9138a57d9dd72d7eb8)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Fridolin Somers [Tue, 12 Jan 2021 10:15:25 +0000 (11:15 +0100)]
Bug 14004: Add ability to temporarily disable JS/CSS sysprefs
It would be *super* handy if intranetuserjs and/or opacuserjs could be
temporarily disabled via a check-box or syspref.
Right now, debugging issues in intranetuserjs usuaally starts with
copying the contents into a text file, blanking the syspref and re-testing.
This patch adds this feature by setting syspref via ENV
OVERRIDE_SYSPREF like override via Apache config.
Implemented only for preferences :
OPACUserCSS OPACUserJS IntranetUserCSS IntranetUserJS
=> replaced with ' '
intranetcolorstylesheet intranetstylesheet
=> replaced with 0
Test plan :
1) Set some CSS in IntranetUserCSS like : #breadcrumbs{color:red}
2) Go to staff interface home page like : /cgi-bin/koha/mainpage.pl
3) See CSS impact is visible
4) Edit URL : /cgi-bin/koha/mainpage.pl?DISABLE_SYSPREF_IntranetUserCSS=1
5) See CSS impact is not visible
6) Check with the other preferences
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>
(cherry picked from commit 180db2f63b83dc4052b42e3073be9893e7495a1f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7a622302aae6ec8b4f4a4accaad8e37f5a8f9c0b)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
David Cook [Mon, 16 Nov 2020 00:31:21 +0000 (00:31 +0000)]
Bug 27029: Add data-biblionumber attribute to OPAC detail page
This patch adds a data-biblionumber attribute to the
div#catalogue_detail_biblio elements on opac-detail.pl, so that
Javascript running on the page can easily fetch and use the
record's biblionumber.
Signed-off-by: Mark Hofstetter <mark@hofstetter.at>, <koha@trust-box.at> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f17a631d873f971ac139534fc2867c7ac86b7bd5) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 823e51ca4eef18208480bb6e6d975a1a1bef9bbe)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Owen Leonard [Fri, 22 Jan 2021 16:43:58 +0000 (16:43 +0000)]
Bug 27531: Remove type attribute from script tags: Cataloging plugins
This patch removes the no-longer-valid "type" attribute from script tags
found in cataloging plugin templates.
I don't think testing each plugin individually is a reasonable thing to
ask for a test. I think a visual verification of the changes in the
patch should be enough.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 32d482130749fdb17cb33e2ee48b0ae0acce835a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f656ab418d6f181052b0a17eadbb6eb2baa9668d)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Owen Leonard [Tue, 27 Oct 2020 12:23:45 +0000 (12:23 +0000)]
Bug 25614: Move ILL request keyword filter to sidebar
On the ILL request list page there are two filters for the table: One in
the sidebar and one configured automatically by the DataTables plugin. I
think these two systems are conflicting somehow to prevent the "clear
filter" button in the table toolbar from working correctly.
This patch doesn't fix the bug but avoids it: Since the filter field in
the table toolbar is duplicating the functionality of the form in the
sidebar, we could hide it and rely on the sidebar filter instead.
To test, apply the patch and go to the ILL requests page in the staff
interface.
- The table of requests should display without a search form or "clear
filter" button at the top.
- The left-hand sidebar form should now have a "keyword" filter option
which searches any column in the table.
- Other filter fields should work as before.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6c5ad42eddce1c357bf6dc64301f774f93a06e0e) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8ae3c07f0147ab19f03f9daa98ad40443490b4aa)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
James O'Keeffe [Tue, 19 Jan 2021 21:16:49 +0000 (21:16 +0000)]
Bug 11344: Perldoc issues in misc/cronjobs/advance_notices.pl
This patch removes the double ups in the perldoc of the above file,
deleting the less clear double ups. The missing "-c" in OPTIONS
appears to have been fixed in an earlier patch (it is there
already).
Task Plan:
1. Run perldoc misc/cronjobs/advance_notices.pl in the terminal. Note
the double ups of NAME, SYNOPSIS, and DESCRIPTION
2. Apply the patch
3. Run the command again. The double ups should be gone, with the more
clear version of each of NAME, SYNOPSIS, and DESCRIPTION remaining.
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>
(cherry picked from commit 5cb6927458dfd9195a7f9cb536b2ca386f7ffb88) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit ecad2b444134fce35c05d54e69c54f09464dd1f3)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Bug 27327: Get rid of indirect object notation in Koha::Club::Hold
This patch makes the code follow the PERL29 coding guideline. Period.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 17a3476d7e45fae092fdd20ce78df8b0945d1fb1) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6f3f1366d7ec18c8990a1577e87a6bf0da8bfa40)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Mazen Khallaf [Tue, 19 Jan 2021 02:01:43 +0000 (02:01 +0000)]
Bug 27179: Misspelling of Method in REST API files
Test Plan:
1. Run "git grep -i mehtod" (which should return 2 files)
2. Apply patch
3. Rerun grep command (should return no files)
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a22b3bb504b0a9a77aa9ce3e9f326cc71fcf8d96) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 252564ebd74bef4a0f6c902b82ecb902c8905986)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Mazen Khallaf [Tue, 19 Jan 2021 01:49:43 +0000 (01:49 +0000)]
Bug 27210: Typo in patron-attr-types.tt
Test Plan:
1. Make sure the ExtendedPatronAttributes syspref is active
2. Go to Administration > Patron attribute types
3. Click New patron attribute type
4. Check the sentence next to the Editable in OPAC checkbox (Should say
"Requires above, does not work during self-registration if
PatronSelfRegistrationVerifyByEmail if set." - Notice the use of
'if set')
5. Apply Patch
6. Repeat steps 2-4 (Should now say "Requires above, does not work
during self-registration if PatronSelfRegistrationVerifyByEmail
is set." - Notice the use of 'is set')
7. If it says 'is set', the patch works as expected.
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c5170f8ee1b6ce3007787d2415aba7794dbaded3) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit a9cbacb822073ded7317630ae0c7931baf3070ac)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
ava li [Tue, 19 Jan 2021 21:01:15 +0000 (21:01 +0000)]
Bug 24811: French SQL files "news" link fixed
This fixes a broken link in the sample news items for fr-FR and fr-CA.
Test plan:
1) Apply the patch.
2) Install the French language files - see
https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client
3) When Koha is in French, from the home page of the staff interface go to Tools/Outils > News/Annonces, and make sure the two news items are there.
-If not, try importing the two files into your database or reset and install Koha in French (fr-FR or fr-CA).
4) There should be a news item with the heading Et maintenant ?, click the 5th link "proposez des correctifs et des améliorations".
5) If should take you to
https://wiki.koha-community.org/wiki/Version_Control_Using_Git
and there is no 404 error, the patch has worked!
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c6009f32205c7b6c19a4dfe0346a1ebed0c05a71) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4ba318f8a8d1566fd36f09f0cdbbfd9da2f49fd2)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
ava li [Tue, 19 Jan 2021 03:44:44 +0000 (03:44 +0000)]
Bug 24810: French SQL files for "news" removed "3"
TEST PLAN
Follow https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client in order to install french.
When koha is in french, from home go to tools/outils, then
news/Annonces, make sure the two files are there.
Preview them there or view them from the homepage and check that the 3
is gone.
If the files are not there, try importing the two files into your
database.
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 42aac43290dbcb8cb1cfecbe685e738c8a95ee67) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 35e723fc5323ef62f672c917f040134428b5ba24)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Ella Wipatene [Thu, 21 Jan 2021 02:45:07 +0000 (02:45 +0000)]
Bug 24055: (follow-up) Description of PayPalReturnURL system preference
Have rephrased it as 'configured return URL' as this is what they call
it on the PayPal website.
To test:
- Go to Administration/ System preferences
- Search for PayPalReturnURL
- Verify description has changed to 'configured return URL' as one of
the options.
Sponsored.by: Catalyst IT
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>
(cherry picked from commit 297d93ec449c08430c13ba75659f48e6a3f563c0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cfa66a3e59d1167f5240bf7228a6d78dd8e95d64)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Katrin Fischer [Sat, 11 Apr 2020 20:05:14 +0000 (20:05 +0000)]
Bug 24055: Rephrase description of PayPalReturnURL slightly
changes 'OPAC's alias' to 'specified URL' as suggested by
Tomas on comment#2.
To test:
- Go to Administration / System preferences
- Search for PayPalReturnURL
- Verify description has changed to "specified URL" as
one of the options
Signed-off-by: Michal Denar <black23@gmail.com> 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>
(cherry picked from commit 4b31073af292e391cd1df1be3894029460fa6040) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 3e586acb7474c9292e7f7dbea883a0e73613d980)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Nick Clemens [Thu, 21 Jan 2021 16:09:58 +0000 (16:09 +0000)]
Bug 20527: (QA follow-up) Fix type 'Wiriteoff'
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c706b8aa13edd39769324ad2d5937d9d4d5ae583) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 49f01ce2985794e1e7a2e503be7fa27c6a8a36b8)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Eden Bacani [Thu, 21 Jan 2021 02:54:30 +0000 (02:54 +0000)]
Bug 20527: Corrected paid to amountwrittenoff
Test Plan
1. Go to My account and go into accounting
2.Create manual invoice (If you already have invoices skip this step)
3.On the Make a payment tab click on Write off under actions of an
invoice
4. Click on Writeoff amount label and make sure that the amount written
is highlighted in green.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f3992816b20bf97de904d485e775c32b93df0726) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 21a1fb0cc239f24ee14f8659e96033f66314a226)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Ella Wipatene [Thu, 21 Jan 2021 01:46:21 +0000 (01:46 +0000)]
Bug 11996: (follow-up) Updating the uk-UA currency
I have changed GRN to UAH in both
installer/data/mysql/ru-RU/optional/sample_currency.sql and in
installer/data/mysql/uk-UA/optional/sample_currency.sql
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>
(cherry picked from commit 732e69f4b25b7af22ab034f143b8df5d7ffd263a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 63babb7401c9c94ba22e5e8a65725772e84dd546)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Ethan Amohia [Thu, 17 Jan 2019 02:42:32 +0000 (02:42 +0000)]
Bug 11996: Made RUB default currency for ru-RU
Didn't know how to change the uk-UA default currency.
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>
(cherry picked from commit 6bb8065af69438673ca5ed0bca0664c366a87e02) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e001395c1a3afa53ea2df7cdd34738dd3ea6f0da)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Eden Bacani [Thu, 21 Jan 2021 01:20:49 +0000 (01:20 +0000)]
Bug 24447: Changing 'DUE' to example in database that exists.
Test Plan:
1.Using perldoc C4/Members/Messaging.pm check that message_name
attribute name example is Item_Due and not DUE.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 0a0ff7c5ceab836631be060a4571681ff40e275c) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9c4aeca752210bbb504a84d84dbe49a9394ff0a3)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Bug 23290 explicitly disabled entity expansion during XML parsing for security reasons.
However, many XSLTs define the following entity:
<!ENTITY nbsp " " >
They don't use the entity  , but its presence could lead to confusion.
Signed-off-by: Eden Bacani <eden.bacani@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 10c08b6552c7063c4c029701018d6f54e6549acb) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit c83158f5bf80f6f4fdfd5ae7e6abfbfbc033f681)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Catherine Ma [Tue, 19 Jan 2021 01:08:28 +0000 (01:08 +0000)]
Bug 27457: Set focus for cursor to Debit type code field
Test Plan:
1.Click administration
2.Click debit types
3.Click new debit type
4.Check if the cursor is in the first form field (it shouldn't)
5.Add patch
6.Repeat steps 1-3
7.Check if the cursor is in the first form field (it should)
Sponsored by Catalyst IT Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 958a91dc4ec3965956bfbdb8d4cdae5db07c7a0f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1868aa3a735288e98909aa9f97fefa73d92ea642)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Amy King [Wed, 20 Jan 2021 00:57:35 +0000 (00:57 +0000)]
Bug 27458: Set focus for cursor to Credit type code field
Test Plan:
Before applying patch
1. Click on Administration
2. Scroll down to Accounting and click on Credit types
3. Click New credit type
4. Note how the cursor does not focus on Credit type code field
5. Apply patch
6. Repeat steps 1-3
7. Note how the cursor now focuses on Credity type code field
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
JD amended patch: Edit commit title
- <td>[% name %]</td>
+ <td>[% INCLUDE 'patron-title.inc' patron=patron %]</td>
We can simply remove the $name variable from the controller script.
Test Plan:
1. Check out a book
2. Check in a book
3. Note what happens
4. Apply patch
5. Repeat step 1-2
6. Note that it doesn't break and everything still works
JD Amended patch: fix commit message
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 113992e620095aac59253cf653acfa47f1ec7768) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6a4541776e4b8f6176de7ba85e2f2011574ddd5c)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Kyle M Hall [Thu, 18 Jun 2020 17:23:04 +0000 (13:23 -0400)]
Bug 25808: Renewal via the SIP 'checkout' message gives incorrect message
If a renewal via SIP cannot be made because the patron has reached the maximum number of renewals,
the AF screen message should read "Item has reached maximum renewals!",
instead we get "Item checked out to another patron".
Test Plan:
1) Check out an item to a patron
2) Using the SIP CLI tool, run checkout messages until the checkout has
reached the maximum number of renewals
3) Note the incorrect message in the AF field
4) Apply this patch
5) Restart the SIP server
6) Run another SIP checkout message
7) Note the message is now correct!
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 6cdfa37e63901c713f817fb44c279367a0c21ab0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 606a3a2e21fe230d163b2d5d3458ec5351d7f9a9)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Andreas Roussos [Fri, 8 Jan 2021 14:45:32 +0000 (15:45 +0100)]
Bug 27192: Automatically set focus to the item type input box
When adding a new item type, you have to click inside the
"Ιtem type:" input box before you can start entering text.
This patch fixes that by adding the "focus" class to the relevant
<input> element so that cursor focus is set when the page loads.
Test plan:
1) Try to add a new item type: notice how you have to manually
click inside the "Item type:" input box before you start typing.
2) Apply this patch.
3) Repeat step 1) -- this time the "Item type:" input box should
gain focus automatically.
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a219a78239049245768ae3abd781136745f9a01f) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 791bd8803115691b0f8567eec6d99ef9509455bf)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Nick [Thu, 19 Dec 2019 03:20:36 +0000 (03:20 +0000)]
Bug 24272: add check_sysprefs_cache.pl
This script ensure that no sysprefs have been changed directly in the database and/or
that the cache has not become corrupted. We have occasionally seen this happen on production sites
To test:
1 - In the staff interface go to Administration
2 - Search for system preference 'IntranetUserJS'
3 - Add content to the syspref:
console.log('Hi!');
4 - On the command line launch mysql
sudo koha-mysql kohadev
5 - Alter the syspref directly
UPDATE systempreferences SET value = "console.log('Bye!');" WHERE variable = 'IntranetUserJS';
6 - run the script
perl misc/maintenance/check_syspref_cache.pl
7 - You are warned about the altered system preference
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit de5527f37d898e756cac4d8ed9de63c6576c1241) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 5a1e18efd87c34ef9f158c4a6f663d30ab3a4e43)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Jonathan Druart [Wed, 13 Jan 2021 10:11:36 +0000 (11:11 +0100)]
Bug 27416: Make "Modify tag" and "Add tag" translatable
Those two strings are not translatable as they are passed from the
controller.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4491cdd803226c22c585f3a23f6aa77000841bed) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 054428a57d4b810bc3278d625de573a66cb5d076)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Jonathan Druart [Thu, 14 Jan 2021 09:42:53 +0000 (10:42 +0100)]
Bug 15448: Fix ISE
The method Koha::Items->itemnumber is not covered by tests!
Trace begun at /kohadevbox/koha/Koha/Objects.pm line 592
Koha::Objects::AUTOLOAD('Koha::Items=HASH(0x55981fd94790)') called at /kohadevbox/koha/opac/opac-reserve.pl line 465
Bug 15448: (follow-up) Adapt to changes on bug 24254
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 8af3ecdd538f22bfbf4d99bda629283fe856f3de) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 655c4427c7d2c9e4d05c016fa52833feb9c59892)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Bug 15448: (follow-up) Fetch the patron category once
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c9f66f5e6b5360a57885c26436c7eb3f2747bd28) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cdfea7001131055c8d91459d4c48dbc4adb4741e)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Bug 15448: Filter out items hidden in OPAC on placing hold
This patch leverages on bug 24254's
Koha::Items->filter_by_visible_in_opac to filter out items that
shouldn't be presented to the end user in the OPAC interface.
To test:
1. Circulation and Fine rules for item-level holds are set to allow.
2. Setting the OpacHiddenItems preference to "ccode: [SUPPRESS]"
3. An item with collection Code Suppress is set.
4. Search for the title in the OPAC.
=> SUCCESS: The Suppress ccode item isn't shown.
5. View the detail page for the title.
=> SUCCESS: The suppress ccode item isn't shown.
6. Place a hold on the item:
-- Click "Show more options"
-- Select "A specific item"
=> FAIL: the ccode with the opachiddenitems rule has an item that appear in the list to place a hold
7. Apply this patch and repeat 6
=> SUCCESS: The item doesn't show!
8. Sign off :-D
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 051f5519861cb2365ddd06d08a9047648af2318b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 284b2da589aabb2475b1292b1cf843be818b384e)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Bug 24254: Implement separate filters and add patron param
This patch introduces two new methods for stacking filters on
Koha::Items:
- filter_out_lost
_ filter_out_opachiddenitems
This two filters are what actually happened inside the
filter_by_visible_in_opac. Everything is covered by tests.
In the process I added a Koha::Patron param to the method that is
internally used to decide if the OPACHiddenItems syspref needs to be
honoured or not. This *could* be better done with a fallback to
C4::Context->userenv if no param is passed.
I decided to leave that part for later, if we really find it would help
(e.g. if bug 10589 gets some action and we really need something here to
handle that).
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Bug 24254: Read the OpacHiddenItems preference internally
After discussing the 'rules' parameter usefulness we decided it was not
the best idea, and the gains in terms of 'performance' would me
meaningless (in-memory caching of sysprefs). This patch makes a really
minor tweak to the tests so they mock the C4::Context->yaml_preference
method, but keeping the same original rules to highlight no behaviour
change takes place.
Then the rules parameter is removed from the calls, and the tests should
keep passing.
A minor change to make $rules = undef is made to highlight the // {}
behaviour when reading the syspref..
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Items.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> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
On C4::Search and C4::Circulation the uses of the items.itemlost field
highlight the fact that the comparisson itemlost <= 0 was wrong, as it
is evaluated as a Perl boolean.
The column can only be an int and NOT NULL, so we need to check if it is
0 to ponder if not hidden.
This patch changes the tests to reflect this, and adjust the
Koha::Items->filter_by_visible_in_opac implementation to adapt to this.
To test:
1. Apply this patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Items.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> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
This patch adds a method based on the original idea from Nick, but on
Koha::Items.
The idea is to build a proper filter, based on the current rules for
hiding things, directly on the DBIC query. The caller takes care of
knowing if the filtering should apply (i.e. checking the patron category
exceptions) and then it would do something like:
my @items;
if ( <patron_category_does_not_have_exception> ) {
@items = $biblio->items->filter_by_visible_in_opac(
{
rules => $rules
}
);
}
else {
# still want to enforce 'hidelostitems'
@items = $biblio->items->filter_by_visible_in_opac;
}
To test:
1. Apply this patches
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Items.t
=> SUCCESS: Tests pass!
3. Look at the use cases on the tests, read the code
=> SUCCESS: It all makes sense
4. Compare with Koha::Item->hidden_in_opac
=> SUCCESS: It all makes sense
5. Sign off :-D
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Nick Clemens [Tue, 22 Dec 2020 19:28:28 +0000 (19:28 +0000)]
Bug 27297: Add required and blank options to av-build-dropbox.inc
This patch adds two options to av-build-drobx
required - which will add the required attribute to the select
blank - which will add a blank option to avoid preselecting others
To test:
1 - In OpacSuggestionMandatoryFeilds select itemtype
2 - Go to OPAC
3 - Add a suggestion
4 - Don't fill out any fields
5 - Submit
6 - Suggestion is added
7 - Delete it
8 - Apply patch
9 - Add a suggestion
10 - Note itemtyp edefaults to 'None'
11 - You cannot submit until you select a value
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit cb95c9140316d4b9dc28cd696d14106b460774aa) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 6124adab15d39cd94e8a8c2fa9f21bde80e0e317)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Lucas Gass [Wed, 23 Dec 2020 20:47:32 +0000 (20:47 +0000)]
Bug 27306: Add subtitle to return-claims-table
To test:
-turn on claim returned
-find some items with a 245b or add a 245b to some items
-check those items out and mark them as claimed returned
-on the borrowers /cgi-bin/koha/circ/circulation.pl page look at the return-claims-table
-no subtitle
-apply patch and clear browser cache, restart_all
-now you should see the subtitle
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ee6c4548ad27c3efd4c78956e70336baffb994b0) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 44e986d6728e7f93618241ae28f12b11ae59faf0)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Owen Leonard [Thu, 3 Dec 2020 12:06:46 +0000 (12:06 +0000)]
Bug 26713: Add pagination to bottom of saved SQL reports table
This patch adds a second pagination menu to the bottom of the report
results table.
To test, apply the patch and go to Reports.
- Run a report which will return multiple pages of results (greater
than 20).
- The results should display with a pagination bar at the top and bottom
of the table.
- Confirm that both pagination menus work correctly.
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>
(cherry picked from commit dbc74154754c4d5d03baa7c96b8511e0c2e0d036) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 544b4c44930053a8c173eaafb304fa8b362de572)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Nick Clemens [Thu, 24 Dec 2020 13:35:28 +0000 (13:35 +0000)]
Bug 27308: Skip blank lines when inserting new
The intent of the macro insert new function is to add a new field at the correct numerical place in the record. If you have a blank line while editing, however, the new line will be inserted at the blank line, rather than checking the rest of the record.
To test:
1 - Create a macro like
new 690=‡aLOCAL SUBJECT
2 - Insert a blank line into your record somewhere before where the 690 should be inserted
3 - Run the macro
4 - Line is inserted before the blank line
5 - Apply patch
6 - Reload (ensure cache is cleared and JS files are reloaded)
7 - Remove the previously created field, but leave the blank
8 - Run the macro
9 - Field is created at correct position
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 27308: (QA follow-up) Remove commented line
I don't think we need to keep the original line as a comment.. this
patch simply cleans it up.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 3b0f86b53173d30da5dbb42710a7c9bf9edaa3bb) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d27b1018a96667c6fce8fc746e968e9a206858a0)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Nick Clemens [Thu, 24 Dec 2020 14:04:55 +0000 (14:04 +0000)]
Bug 27307: Don't drop phrase directive when searching keyword index
We convert 'keyword' to '' as an index since we want it to search all fields
When we are searching 'as phrase', however, we should not drop the search type
To test:
1 - Enable IntranetCatalogPullDown
2 - Set searchEngine to Elasticsearch
3 - Perform a search for 'Keyword as phrase' for a phrase that does appear in a record
4 - You get the result
5 - Reverse the order of words in the phrase
6 - You still get a result?
7 - Apply patch
8 - Restart all the things
9 - Reversed search does not return record
10 - Correct order and search, correct record returned
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 9cfce5f010c485ee5e046bcc99a9d33a70d9213a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit d9b2c504639e3e336a0ef8a1f75c31452a556e90)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Nick Clemens [Mon, 23 Nov 2020 18:37:48 +0000 (18:37 +0000)]
Bug 26957: Don't remove words that are also operators from search terms
FindDuplicate has a hardcoded regex to remove 'and', 'or', and 'not' from any search fields, however,
is does this with no regard for these terms being embedded in the middle of a word or phrase.
E.g.:
'Coupland' becomes 'Coupl'
'Frog and toad' becomes 'frog toad'
etc.
This patch simplay removes the substitutions as we already quote the terms as well
To test:
1 - Add records to your system like:
The night circus by Erin Morgenstern
Frog and toad all year
Nothing ever happens
2 - Attempt to add purchase suggestions like
title: the night circus, author:Morgenstern, Erin
title: For and toad all year
title:nothing ever happens (case is important)
3 - No warnings about existing biblios
4 - Apply patches
5 - Delete existing suggestions
6 - Repeat step 2
7 - Each attempt should warn you of existing biblio
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit a52a9d787544aae384aee1a33c9d3bb35d98f8fa) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 680fc0f77d9c7c3c20dacc14c9db94b52d009ee4)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Nick Clemens [Wed, 9 Dec 2020 15:39:09 +0000 (15:39 +0000)]
Bug 27180: Update fines on holidays
This patch removes code that prevents fines from being update on holidays.
The fines are already being calculated, and that takes the calendar into account if
needed, so fines won't be assessed on holidays if they shouldn't.
To test:
1 - set finesCalendar to 'ignore'
2 - Checkout an item due yesterday
3 - Ensure circ rules have a fine amount set
4 - Make today a holiday
5 - run fines.pl
6 - No fine assessed
7 - Apply patch
8 - run fines.pl
9 - Fine assessed!
10 - set finesCalendar to 'use'
11 - checkout an item, due yesterday
12 - run fines.pl
13 - no fine assessed
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>
(cherry picked from commit 80e1b4e66f01a07cad9bf37625d879f649edf52a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 69821f7aba39009b850aef5716a0818f3cb61d54)
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Jonathan Druart [Mon, 14 Dec 2020 14:54:54 +0000 (15:54 +0100)]
Bug 27196:[20.05.x] Don't explode if item that is waiting if checked in by SIP
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>