Martin Renvoize [Fri, 21 Sep 2018 10:42:28 +0000 (11:42 +0100)]
Bug 21387: Receive items from - form should include tax hints
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Fridolin Somers [Fri, 16 Mar 2018 10:59:04 +0000 (11:59 +0100)]
Bug 20435: Allow lowercase prefix in inventory value builder
Cataloging value builders for inventory stocknumberAV.pl and stocknumberam123.pl use a regexp to define if entered text is a prefix or not.
It actually only allows uppercase characters. A library may want to catalog with lowercase characters in inventory number and using those value builders.
Note that in database the text is not case-sensitive.
Test plan:
1) Configure stocknumberAV.pl value builder on an item subfield
2) Create an autorized value category 'INVENTORY'
3) Create in this category a value with code 'UC' and description '10'
4) Create in this category a value with code 'lc' and description '20'
5) Create a new item
6) Focus on stocknumber subfield
7) Enter '123' and click on value builder, the entry stays '123'
8) Enter 'UC' and click on value builder, the entry turn to 'UC 0000000011'
9) Enter 'lc' and click on value builder, the entry turn to 'lc 0000000021'
Same for stocknumberam123.pl
To elaborate on step #1:
Go to Administration->MARC Bibliographic framework
Click on the "Action" button to view the framework
for the item you will be creating, view MARC structure.
Search for Tag 952 (LOCATION AND ITEM INFORMATION (KOHA))
Select Actions->Subfields
Edit subfield i for "Inventory Number"
In the "Other options" pane, select the plugin to test.
Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Wed, 24 Oct 2018 15:39:13 +0000 (15:39 +0000)]
Bug 21647: Clean up SRU fields mapping templates
This patch makes corrections to the SRU field mapping templates
(bibliographic and authority):
- Bootstrap grid
- JavaScript to the footer
- Other markup corrections
To test, apply the patch and go to Administration -> Z39.50/SRU servers
- Add or edit an SRU server
- Click "Modify" next to the SRU search fields mapping field.
- Confirm that the popup window layout is correct.
- Confirm that adding information to the form is correctly saved to
the SRU server form.
- Test this process with SRU server record type set to both
"Authority" and "Bibliographic."
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Fri, 26 Oct 2018 18:50:59 +0000 (15:50 -0300)]
Bug 21696: Use Koha::Account->lines from Koha::Account
There is now Koha::Account->lines, we should use it instead of
Koha::Account::Lines->search
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 21673: (QA follow-up) Fix typo and remove unused library
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Thu, 25 Oct 2018 19:55:32 +0000 (16:55 -0300)]
Bug 21673: Use Koha::Account::Lines->total_amountoutstanding when needed
There are several times the same pattern to retrieve the sum of
amountoutstanding columns for Koha::Account::Line set.
We should use Koha::Account::Lines->total_outstanding instead.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
The actions_col template param requires a DB search, only to display the
'Actions' column header vs. an empty string. But there will always be
buttons in there, that were added *after*.
It made sense when only the 'Reverse' button was displayed, but now both
'Print' and 'Details' are displayed anyway.
This patch removes it for good :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Mark Tompsett [Mon, 15 Oct 2018 18:50:09 +0000 (18:50 +0000)]
Bug 20629: (follow-up) fix reverse_col value
Before this patch the Void button didn't appear.
After this patch the Void button appears on payments.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Kyle M Hall [Mon, 15 Oct 2018 16:53:27 +0000 (12:53 -0400)]
Bug 20629: Pass accountline objects to template instead of hashref
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Kyle M Hall [Mon, 15 Oct 2018 12:02:31 +0000 (08:02 -0400)]
Bug 20629: Remove ability to 'reverse' payments
Test Plan:
1) Apply this patch
2) Note all references to reversing payments have been removed
3) Note ability to void payments remains unchanged
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Wed, 26 Sep 2018 15:00:16 +0000 (15:00 +0000)]
Bug 20078: (follow-up) Prevent conflict from attribute duplication
To test:
1 - Apply first patch
2 - Attempt searching by arp, no results
3 - Apply this patch
4 - Copy bib1.att and ccl.properties to the correct locations
5 - Restart zebra
6 - Rebuild indexes
7 - Search agian, success!
Signed-off-by: Margie Sheppard - Central Kansas Library System CKLS <msheppard@ckls.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Mon, 12 Feb 2018 10:58:35 +0000 (10:58 +0000)]
Bug 20078: Add accelerated reading indexes to getIndexes
To test:
1 - Find a bib with 526$c and 526$d populated, or populate them
e.g. 526$a 5.5 | 526$d 14
2 - Try searching for 'arl:5.5' or 'arp:14'
3 - Your record should be returned in results
4 - Add the indexes as dropdowns by entering the following in intranetuserjs:
$(document).ready(function(){
// Add Accelerated Reading Level to advanced search
if (window.location.href.indexOf("catalogue/search.pl") > -1) {
$(".advsearch").append('<option value="arl">Accelerated Reading Level</option>');
}
// Add Accelerated Reading Point to advanced search
if (window.location.href.indexOf("catalogue/search.pl") > -1) {
$(".advsearch").append('<option value="arp">Accelerated Reading Point</option>');
}
});
5 - Search using these in the dropdown, your record will not be found
6 - Apply patch
7 - Repeat searches directly and by using dropdown, your record should be returned.
8 - prove t/db_dependent/Search.t
Signed-off-by: Margie Sheppard - Central Kansas Library System CKLS <msheppard@ckls.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Apparently it has never been used, we should remove it to avoid unnecessary maintenance.
Test plan:
git grep GetLastAcquisitions
must not return any results
NOTE: POD Coverage test failure is expected on removal
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Wed, 24 Oct 2018 14:01:18 +0000 (14:01 +0000)]
Bug 21645: Clean up library groups template
This patch modifies the library groups administration page to help
compliance with several coding guidelines:
- Move JavaScript to the footer
- Convert to Bootstrap grid
- Other markup corrections
To test, apply the patch and go to Administration -> Library groups.
- Confirm that the page how has a "Library groups" heading.
- Confirm that action buttons in the table of library groups are styled
correctly.
- Test both adding and editing groups. The "Required" label on required
fields should be styled correctly.
- Test all JavaScript-driven interactions on the page:
- Adding, editing, and deleting groups
- Removing libraries from groups
- Expanding and collapsing group hierarchies
- Validate the page's HTML and confirm that there are no errors found
in the main body of the page.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Tue, 24 Jul 2018 13:00:21 +0000 (13:00 +0000)]
Bug 21570: Update two-column templates with Bootstrap grid: Various
This patch modifies several assorted templates to use the
Bootstrap grid instead of YUI.
This patch also removes obsolete "text/javascript" attributes from
<script> tags and "text/css" attributes from <style> tags in the
modified templates.
To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Wed, 20 Jun 2018 16:12:41 +0000 (16:12 +0000)]
Bug 20970: Reformat basket information on acquisitions basket page
This patch reformats the display of information on the acquisitions
basket page, hiding form controls until they are triggered. Some basket
information is now in the second column in order to balance the two
columns better.
The "Library" label has been replaced with the more precise "Managing
library."
Unrelated change: Removed script type attributes.
To test, apply the patch and view a basket in acquisitions. Test these
processes:
- Adding and removing managing users
- Setting and changing managing library
- Setting and changing basket group
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Kyle M Hall [Mon, 15 Oct 2018 10:36:51 +0000 (06:36 -0400)]
Bug 21568: Add more spans with classes around callnumbers in OPAC for additional styling
It would be nice if the callnumber portion of the callnumber + label was in a span,
and it also makes sense to wrap the entire callnumber string in a span as well.
This was started on bug 21340 but I have found more callnumbers in the search results that need spans.
Test Plan:
1) Apply this patch
2) Search for something in the OAPC with multiple results
3) View the HTML source
4) Note the new spans around the callnumbers, like: <span class="CallNumber"
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Fri, 5 Oct 2018 14:31:05 +0000 (14:31 +0000)]
Bug 8630: (follow-up) Template corrections
This patch makes two corrections to templates: One to correct the case
of a variable, an error which I introduced when adding html filters.
The other removes a redundant image tag from the recent comments
template.
To test, apply the patch and log in to the OPAC as a user with
checkouts. Cover images on the "your summar" page should appear
correctly.
View the "recent comments" page and confirm that images still appear
correctly.
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 8630: (follow-up) Make Adlibris cover show on OPAC overdues tab
and fix alignment of cover on Staff detail page.
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Persson [Wed, 7 Oct 2015 14:42:57 +0000 (16:42 +0200)]
Bug 8630: Adlibris covers (OPAC SCSS changes)
This patch adds two new CSS classes specific to Adlibris covers.
Sponsored-By: Halland County Library Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Persson [Thu, 8 Oct 2015 07:13:00 +0000 (09:13 +0200)]
Bug 8630: Adlibris covers (OPAC templates)
Changes to OPAC templates.
Depends on new CSS clases defined in separate patch.
Test plan:
To test this particular patch (intranet templates) you need:
* The syspref patch applied
* The intranet CSS patch applied
To test:
* Apply this patch
* Enable covers (if not done already)
* Go to staff interface, log in as a priviliged user.
* Select "More" -> "Administration" ->
"Global system preferences" -> "Enhanced content".
* Set ""AdlibrisCoversEnabled" to "Show" under "Adlibris".
* Save changes
* Add a book with a known cover/ISBN (if none exists)
* Set MARC field 020 a,
"INTERNATIONAL STANDARD BOOK NUMBER" to: 9780451524935
* Set MARC field 245 a, "Title" to: 1984
* Save changes
* Test opac-results.tt
* Search library catalog from OPAC for "1984".
* You should be sent to:
http://127.0.1.1/cgi-bin/koha/opac-search.pl?idx=&q=1984
* Cover image should be shown to the right of each title
with CSS class: "adlibris-cover"
* Test opac-detail.tt
(continued from previous test's location)
* Click on the title with cover (1984, ISBN: 9780451524935)
* Cover should be displayed to the left in full size.
* If clicked, should link to the full-size image.
Test opac-results-grouped.tt
* This template is only used if an external "grouping" server is
setup and the syspref "OPACGroupResults" is set to "Use".
* Personally I did not test this, b/c: terminally lazy
* Test opac-showreviews.tt
* Could not find any links to this location, manually enter it:
http://127.0.1.1/cgi-bin/koha/opac-showreviews.pl
* Image should be shown to the right in full size.
* If clicked it should take you to the detail view with the
comments tab opened.
* Test opac-showreviews-rss.tt
* Click on the RSS icon from previous test's start location.
URL should be:
http://127.0.1.1/cgi-bin/koha/opac-showreviews.pl?format=rss
* An image tag linking to the full-size image without any
styling class should be present.
* Test opac-user.tt
* Click on your username to open:
http://127.0.1.1/cgi-bin/koha/opac-user.pl
* Covers should be shown for checked out items with
CSS class: adlibris-cover
* When clicked the destination should be the same as
clicking the title column entry: opac-details.pl
* Test opac-opensearch.tt
* Click on "Advanced search" and enter "1984" then press "Search"
* This search screen uses a different template.
* Cover image should be shown to the right of each title
with CSS class: "adlibris-cover"
* If clicked, should link to the OPAC detail view.
* Test opac-readingrecord.tt
* Click on your logged-in name to go to your personal page.
* Click on "Your reading history" tab on the left.
http://127.0.1.1/cgi-bin/koha/opac-readingrecord.pl
* Covers should be shown in leftmost column with
CSS class: adlibris-cover
* If clicked, should link to the same as the 'Title' link.
Sponsored-By: Halland County Library Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Fri, 5 Oct 2018 13:56:12 +0000 (13:56 +0000)]
Bug 8630: Adlibris covers (intranet CSS)
This defined two new CSS classes for use by the intranet templates.
Apply this patch before doing the testing of "intranet templates".
Sponsored-By: Halland County Library Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Persson [Thu, 8 Oct 2015 07:12:27 +0000 (09:12 +0200)]
Bug 8630: Adlibris covers (intranet templates)
Changes to staff interface (intranet) templates.
Depends on new CSS clases defined in separate patch.
Test plan:
To test this particular patch (intranet templates) you need:
* The syspref patch applied
* The intranet CSS patch applied
To test:
* Apply this patch
* Enable covers (if not done already)
* Go to staff interface, log in as a priviliged user.
* Select "More" -> "Administration" ->
"Global system preferences" -> "Enhanced content".
* Set ""AdlibrisCoversEnabled" to "Show" under "Adlibris".
* Save changes
* Add a book with a known cover/ISBN (if none exists)
* Set MARC field 020 a,
"INTERNATIONAL STANDARD BOOK NUMBER" to: 9780451524935
* Set MARC field 245 a, "Title" to: 1984
* Save changes
* Test results.tt
* From the main intranet page, select "Search the catalog" and
enter the title we added, "1984" and press "Search".
* You should end up with the url:
http://127.0.1.1:8080/cgi-bin/koha/catalogue/search.pl?q=1984
* The cover image should be shown in the leftmost column.
* If cover is clicked, the full cover image should be shown.
* Test detail.tt
(continue from the search results used in prev. test)
* Click on the title text, you should be sent to:
http://127.0.1.1:8080/cgi-bin/koha/catalogue/detail.pl?biblionumber=2
* The cover image should be shown on the right.
* If clicked, the full cover should be shown.
Sponsored-By: Halland County Library Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Persson [Mon, 5 Oct 2015 09:13:15 +0000 (11:13 +0200)]
Bug 8630: Adlibris covers (syspref files)
This patch adds a system preference for cover images from Swedish
book retailer Adlibris. Images are retrieved via http or https
from an external web server. This might leak OPAC and Staff
interface data to third parties and should thus be used with
caution.
Sponsored-By: Halland County Library
Test plan:
Test 1: Test upgrade procedure for clean installation.
Start by removing existing sysprefs, if present:
$ mysql -u kohaadmin -p -D koha
> DELETE FROM `systempreferences` WHERE `variable` LIKE 'Adlibris%';
* Apply this patch which will add a pref file, update the 'syspref'
structure and add an atomic upgrade file.
* Install the update:
Koha$ perl installer/data/mysql/updatedatabase.pl
* Once upgraded and logged in, Select 'More', 'Administration',
'Global Preferences' and finally 'Enhanced content'.
There should be a new option called 'Adlibris'.
The first option should default to "Don't show", if not the
patch is broken.
The second options should show the default URL:
http://www.adlibris.com/se/organisationer/showimagesafe.aspx
If not, the patch is broken.
Test 2: Changing sysprefs
* In the control panel, change the first value from "Don't show"
to "Show" and save the changes. Use MySQL client to inspect changes:
$ mysql -u kohaadmin -p -D koha
> SELECT * FROM `systempreferences` WHERE `variable` LIKE 'Adlibris%';
The column 'value' should now have the value '1', if not the patch
is broken.
Test 3: Apply update to existing data
* Re-execute the installer now that the database has the data already:
Koha$ perl installer/data/mysql/updatedatabase.pl
If any errors occur the patch is broken.
Examine the database contents:
$ mysql -u kohaadmin -p -D koha
> SELECT * FROM `systempreferences` WHERE `variable` LIKE 'Adlibris%';
If the values were overwritten by the installer the patch is broken.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 16280: purge_suggestions.pl: Cron job log should tell number of days used
To test:
- Apply patch
- Set syspref CronjobLog to "Log"
- Set syspref PurgeSuggestionsOlderThan e.g. to 20
- From console, run misc/cronjobs/purge_suggestions.pl
- Check entry in cgi-bin/koha/admin/preferences.pl?op=search&searchfield=log
- Verify that log entry contains number of days (20, same as in syspref)
- From console, run misc/cronjobs/purge_suggestions.pl -days 100
- Verify that log entry contains number of days (100, same as in param -days)
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Wed, 23 May 2018 19:04:02 +0000 (19:04 +0000)]
Bug 19490: (follow-up) Add tooltip to each row
To test:
1 - Run batch modification on some items
2 - Hover over the holds column
3 - Note the tool tip
4 - PLace some holds to verify combinations of item/record level holds
show appropriately
Nick Clemens [Mon, 14 May 2018 20:57:57 +0000 (20:57 +0000)]
Bug 19490: Add a 'Holds' column to the items batchmodification tool
To test:
1 - Add some items to bathc modification
2 - Note there is no indication fo holds
3 - Apply patch
4 - Reload and note you can see how many holds (or none)
5 - Note you can hide this column with css:
#batchMod-edit .holds_count { display: none; }
6 - Note the column has a tooltip to indicate item vs. record holds
Bug 21740: Show @ when editing fixed-length fields on bibliographic frameworks
This is a consistency issue: we store '@' as the subfield for
fixed-lenght fields, yet on editing '_' is displayed (on the form and
the tab). This was probably done to avoid URI encoding problems in the
past.
This patch restores the '@' everywhere.
To test:
- Open the MARC structure for any bibliographic MARC framework
- Choose Actions > Subfields on any fixed-length field
=> ERROR: Notice the tab has an underscore (_) and the subfield code is '_' as well.
- Cancel
=> SUCCESS: '@' is displayed on the list
- Apply this patch
- Restart all the things:
$ restart_all
- Choose Actions > Subfields on any fixed-length field
=> SUCCESS: '@' is displayed in the tab title, and on the 'Subfield
code' form field.
- Save some changes
=> SUCCESS: Things work correctly.
- Sign off :-D
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Devinim <kohadevinim@devinim.com.tr> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Josef Moravec [Mon, 5 Nov 2018 08:51:32 +0000 (08:51 +0000)]
Bug 20996: (follow-up) Fix test
- Fixes the t/db_dependent/Illrequest/Config.t
- Adds tests for Koha::Illrequest::Config->has_branch
0) Do not apply the path
1) Run test t/db_dependent/Illrequest/Config.t
2) It fails - it is because the Koha/Illrequest/Config.pm prefixes
handling changed
3) Apply the patch
4) Run test again, it should pass now
5) Read through the test code and confirm it makes sense
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Julian Maurice [Fri, 5 Oct 2018 13:18:59 +0000 (15:18 +0200)]
Bug 21501: Remove dead code from course reserves module
search_on parameter is not used in any templates so course-reserves.pl
can be simplified a bit
Test plan:
1. Go to course reserves module and verify that it is still working
2. `git grep search_on` should return nothing
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Fri, 29 Jun 2018 08:23:38 +0000 (09:23 +0100)]
Bug 20968: (follow-up) Replace tabs with spaces
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Kyle M Hall [Wed, 27 Jun 2018 17:21:53 +0000 (13:21 -0400)]
Bug 20968: Rename method get_intranet_catalog_toolbar_button to intranet_catalog_biblio_enhancements_toolbar_button
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Kyle M Hall [Wed, 27 Jun 2018 17:13:37 +0000 (17:13 +0000)]
Bug 20968: Add unit tests
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Wed, 27 Jun 2018 16:13:27 +0000 (17:13 +0100)]
Bug 20968: (follow-up) Respond to feedback
This patch:
- Removes the unecessary testing for
intranet_catalog_biblio_enhancements method in detail.pl
- Renames get_toolbar_button to get_intranet_catalog_toolbar_button
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Wed, 20 Jun 2018 11:47:10 +0000 (12:47 +0100)]
Bug 20968: Add hooks into cat-toolbar.inc to display buttons
This commit adds hooks into cat-toolbar.inc to allow the display of
arbitrary buttons as supplied by plugins within the
intranet_catalog_biblio_enhancements class that provide the method
get_toolbar_button
To test:
1) Download the plugin from
https://github.com/PTFS-Europe/cla-permissions-check-plugin
2) Follow the installation instructions from:
https://github.com/PTFS-Europe/cla-permissions-check-plugin
3) TEST: Observe that the "CLA Check Permissions" button takes the user
to the Check Permissions page and a modal displays containing the
results of the query
4) Remove the API key from the plugin "Configuration" page
5) TEST: Ensure that the "CLA Check Permissions" button takes the user
to the Check Permissions page and message displays informing the user
that "Did not receive required request parameters"
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Marcel de Rooy [Fri, 12 Oct 2018 05:54:24 +0000 (07:54 +0200)]
Bug 14385: (QA follow-up) Additional changes and fixes
[1] searchResults: second my $interface can be removed: unused
[2] call of getitemtypeimagelocation on L2119 needs interface key
[3] ISBDdetail: No need to find patron again (line 182 vs 84)
[4] opac-search: No need to find patron twice (657 and 631)
[5] tabs on line 2220 of C4/Search.pm (qa tools warn)
[6] Ugly hack to overcome "Undefined subroutine &C4::Items::ModZebra"
by loading C4::Items before C4::Biblio when running tests
Koha/BiblioUtils/Iterator.t and Labels/t_Label.t.
This is a more general problem that needs attention somewhere else.
It seems that Biblio.pm is one of the suspects.
[7] This patch set makes Search.t crash/fail with me. Note that without
these patches Search.t still passed! Why o why..
A little debugging pointed me to a missing MPL branch (aarg).
Adding the simple test on the result of Libraries->find in
C4::Biblio::GetAuthorisedValueDesc made the test continue.
[8] Resolve: Variable "$borcat" is not available at opac-detail.pl line 246
Lexical $borcat cannot be used in sub searchAgain in opac-detail.pl
under Plack. Must be defined with our (or passed as argument).
[9] Resolve crash on TWO serious typos in opac-basket on ONE line:
Koha::Patron->find({ borrowernumber -> $borrowernumber })
Yeah: find is in Koha::Patrons and we need => !!
No need to pass a hash to find method btw for a pk value.
[10] Serious bugfixing here. Add List::Util to opac-basket.
Can't locate object method "none" via package "1".
You can't test everything :)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
After this longer list I renamed Final to Additional in the patch title :)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Mark Tompsett [Mon, 5 Mar 2018 20:11:52 +0000 (20:11 +0000)]
Bug 14385: Squash of a lot of patches rebased
- Added missing GetHiddenItems parameter change case
Without this prove t had a failure.
- Always use mocks, not set_preference
- Tweaks so t/db_dependent/00-strict.t passes
There was a typo botcat vs borcat and borrowernumber was never
defined. Grabbing from userenv, like other code does.
- Tweak t/db_dependent/Items.t to fully test changes
This will test all the if structures fully in GetHiddenItemnumbers.
prove t/db_dependent/Items.t
- Tweak borrower category code
$borrower->{categorycode} on a Koha::Patron is not the
same as $borrower->categorycode. Fixed error.
- Search was returning URLS for wrong interface
There was one search context place wrong. Changed it to $is_opac
as the logic for setting $is_opac was modified correctly.
- Corrected issues with category code.
When a user isn't logged in, $borrower is undef and causes error
when determining category code. Added conditional check.
- Properly trigger all changes in C4/Search.pm
- Fix QA Test tool failures
C4/Search.pm had some tabs.
- Add some commenting to make sense of logic
- Refactor EmbedItemsInMarcBiblio parameters to hashref
- Add missing test to trigger Koha/BiblioUtils/Iterator change
- Add borrower category overrides
These files generally add borcat parameter to GetMarcBiblio.
Others might include correction of filtering of items
(opac-basket), or a comment as to why no changes were done
(opac-search).
In the case of opac-search, correcting the first FIXME will
likely correct the OpacHiddenItems issues on tags. As such,
that is beyond this bugs scope.
Some code had loop optimizations and fixes made, like a
'next unless $record' when the biblio shouldn't even be in
the list.
- Modify opac-ISBDdetail and opac-MARCdetail
Both files had similar logic. They were rearranged and
optimized, so that both files would have practically identical
initial blocks of code.
Optimizations were possible, because GetMarcBiblio
returns a filtered record, so that there is no double call
(once in the opac-### file and once in GetMarcBiblio) to
GetHiddenItemnumbers.
- Fix hiding in opac-tags
opac/opac-tags.pl was not properly hiding.
There is currently one known bug associated with tags left.
If you have two biblios tagged by different people with the
same tag, the opac-search will show the one you tagged that
is supposed to be hidden, because tag searches work differently
than regular searches. This is beyond the scope of this bug.
See the FIXME's in opac/opac-search.pl
- Trigger the C4::ILSDI::Services changes
prove t/db_dependent/ILSDI_Services.t
- Added missing 'my'
- Test C4/Labels/Label.pm changes
- Improve C4::Record::marcrecord2csv test cases
- Corrected opac-details searchResult call
- Fix breaking issues constraint in ITerator test
- Fix ILSDI_Services test when clubs with branch exist
Bug 14385: (follow-up) Changes to sysprefs.sql and atomicupdate
Run updatedatabase.pl when testing
Sponsored-by: Catalyst IT Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Changes the API for calling GetHiddenItems and all the places in the code that call it. This is to allow borrower categories to be passed in.
Adds an OpacHiddenItemsExceptions syspref to allow certain borrower categories to be able to see items, even if they are marked hidden by OpacHiddenItems
To test:
1) Make two borrowers, one in a category that should see everything (ie Adult), and another in a category that should only see certain things (ie Adult - exceptions)
2) Add the borrower that can see everything (the Adult) to OpacHiddenItemsExceptions
3) To the OpacHiddenItems syspref, add an item type (ensure that you have some records that fall under this type in your library).
4) Log in as the borrower that should only see certain things (Adult - exception)
5) Do a search, filtered to show records which are the item type that you specified in the OpacHiddenItems syspref. No records should show for this borrower as this item type is hidden to them.
6) Log in as the borrower that should see everything (Adult)
7) Do the same search. There should be results from this search, as this borrower category has been specified as an exception to the hidden items
Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Wed, 24 Oct 2018 01:17:51 +0000 (01:17 +0000)]
Bug 21640: Enable output to STDOUT for Itiva outbound script
To test:
1 - Enable the TalkingTechItivaPhoneNotification
2 - Copy 'HOLD' notice 'email' transport to the phone section
3 - Enable EnhancedMessagingPreferences
4 - Find a patron and enable 'phone' for the 'Hold filled' notice
Note: You might not be able to do this straightaway, bug 21639
If the phone box has a '-' and not a checkbox:
sudo koha-mysql kohadev
INSERT INTO message_transports (message_attribute_id,message_transport_type,is_digest,letter_module,letter_code) VALUES (4,'phone',0,'reserves','HOLD');
5 - Place a hold for the patron
6 - Check it in and confirm the hold to set it waiting
7 - sudo koha-shell kohadev
8 - perl misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl --type=RESERVE -w 0 -v
9 - Note the Output says it will be on STDOUT, but nothing is output
10 - Apply patch
11 - repeat
12 - Hold info is output to command line
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Fri, 28 Sep 2018 12:44:16 +0000 (13:44 +0100)]
Bug 20996: (follow-up) Fix column name expectation
This bug changes how request metadata is obtained. Previously the
appropriate backend's metadata function would return it. For at least
the FreeForm backend, the metadata property names we title cased. The
datatable JS was expecting this and breaks with the new metadata getting
which is performed in the API controller, which just returns the
property names as they appear in the DB.
This patch changes the expectation of the JS to match what's coming back
from the API
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Tested by repeatedly loading the API-call
http://intranet/api/v1/illrequests?embed=metadata,patron,capabilities,library
in Chromium and watching the reported time to load the URL. There
is a siginificant decrease in the time with the patches compared to
the time it takes without the patches. I had some concerns along the
way, but they have all been fixed.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tested by repeatedly loading the API-call
http://intranet/api/v1/illrequests?embed=metadata,patron,capabilities,library
in Chromium and watching the reported time to load the URL. There
is a siginificant decrease in the time with the patches compared to
the time it takes without the patches. I had some concerns along the
way, but they have all been fixed.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Tue, 25 Sep 2018 14:19:53 +0000 (15:19 +0100)]
Bug 20996: (follow-up) Add <branch> to conf tpl
Since we now require the <branch> block, we should add it to the config
templates
Signed-off-by: Magnus Enger <magnus@libriotech.no> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
We were immediately unblessing all request objects after retrieval then,
at a later stage, re-instantiating each one so we could call methods on
that. This was a very bad idea. We now preserve the objects for as long
as we can.
Signed-off-by: Magnus Enger <magnus@libriotech.no> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
- Remove unit tests relating to TO_JSON
- Add tests for new explicit embedding
- Modify tests relating to now deprecated brw_cat
Signed-off-by: Magnus Enger <magnus@libriotech.no> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch removes the potential use of borrower category as a ILL
request ID prefix. It makes no sense. We provide the ability for a site
to define a request prefix based on branch, there is no use case for
using the borrower category. Add to this that the borrower for every
request was being retrieved in order to get the category, it's a huge
performance hit also.
We also now require the <branch> block in the <interlibrary_loans> block
and complain if it's not present. The request prefix should be defined
in this block.
This patch also improves the performance of the API request that returns all
requests, optionally including additional data.
It also deprecates the overloaded TO_JSON method and moves the request
augmentation code into the API route's controller. It may be that we
want to shift it out of there at some point, but it is fine where it is
for now.
Signed-off-by: Magnus Enger <magnus@libriotech.no> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Thu, 18 Oct 2018 21:10:19 +0000 (18:10 -0300)]
Bug 21604: Fix add/edit fund/budget
[Strict SQL modes context]
For insert aqbudgetperiods:
Incorrect integer value: '' for column 'budget_period_id'
For insert/update aqbudgets
Incorrect integer value: '' for column 'budget_owner_id'
Incorrect decimal value: '' for column 'budget_encumb'
Test plan:
Add/edit budgets and funds
A good example of why we should use Koha::Object for all our objects
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Fri, 19 Oct 2018 13:37:26 +0000 (14:37 +0100)]
Bug 21620: Prevent stockrotation cronjob failures
Superflous use of sprintf combined with rebasing issue left the
stockrotation cronjob such that a 'No action taken' email report would
catastrophically fail with the error:
Redundant argument in sprintf at ./stockrotation.pl line 316
This patch both resolves the error and cleans up some additional
unrequired sprintf usage.
Test Plan
1) Create a rotation plan
2) Add some items to the rotation plan
3) Run the cronjob using `stockrotation.pl --report=email --send-email
--execute`
4) Note the lack of errors
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Thu, 25 Oct 2018 16:34:44 +0000 (13:34 -0300)]
Bug 21656: Update 4 missing sample_notices.sql
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Thu, 25 Oct 2018 16:32:17 +0000 (13:32 -0300)]
Bug 21656: Reduce the risk of possible side-effects
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Mark Tompsett [Thu, 25 Oct 2018 15:30:10 +0000 (15:30 +0000)]
Bug 21656: (follow-up) Fix atomicupdate
The atomicupdate is going to run as part of an upgrade.
It needs to UPDATE, not INSERT.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Wed, 24 Oct 2018 10:14:56 +0000 (11:14 +0100)]
Bug 21656: Fix for bad TT syntax in default stock rotation notice
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Magnus Enger [Tue, 16 Oct 2018 19:25:43 +0000 (21:25 +0200)]
Bug 21585: Ignore missing firstname in ILL requests table
To test:
- Make sure you have a patron with just a surname and no firstname
- Create an ILL request so that the name of this patron shows up in
the Patron column of the ILL requests table
- Before the patch, the name will display as "null Surname"
- Apply the patch
- Reload the ILL requests page
- The name should now display as just "Surname"
- Sign ye merrily off
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Mon, 29 Oct 2018 21:16:19 +0000 (18:16 -0300)]
Bug 21717: Fix generation of real's values
With strict SQL modes we now have TestBuilder tests that fail randomly with:
Out of range value for column 'tax_rate_on_receiving'
Out of range value for column 'discount'
We are trying to insert a value that is too high for the type defined at DB level.
It happens for discount when a value > 100 is generated. The datatype is float(6,4).
From the MySQL Doc:
"""
MySQL permits a nonstandard syntax: FLOAT(M,D) or REAL(M,D) or DOUBLE PRECISION(M,D).
Here, (M,D) means than values can be stored with up to M digits in total, of which D digits may be after the decimal point.
"""
So float(6,4) does not allow 100.
To recreate easily the issue:
use t::lib::TestBuilder;
my $builder = t::lib::TestBuilder->new;
$builder->build( { source => 'Aqorder', value => { discount => 100 } } )->{discount};
To make sure this patch fixes the issue you can use this script:
use Modern::Perl;
use t::lib::TestBuilder;
my $builder = t::lib::TestBuilder->new;
my ( $real, $i ) = ( 0, 0 );
while ( $real < 100 ) {
$real = $builder->_gen_real( { info => { size => [ 6, 4 ] } } );
warn $i++;
}
warn "$i - $real";
Test plan:
0/ Does not apply this patch
1/ Run the snippet above
2/ Confirm that it fails quite quickly (constantly before 500 for me)
3/ Apply this patch
4/ Run again the script
5/ Confirm that it is stuck in an infinite loop
6/ CTRL-C :D
QA Note:
Other _gen_* subroutine may need a fix, but we will wait for them to fail
TODO:
1. Add JS check to the interface to prevent the use to enter a value > 100
2. Allow '100' as a valid value for discount (?)
Followed test plan, patch worked as described Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Tue, 16 Oct 2018 17:52:25 +0000 (14:52 -0300)]
Bug 21556: Do not crash if a biblio is deleted twice
To recreate:
- Go to a bibliographic detail page
- Delete it
- Go back
- Delete it again
=> Without this patch you will get a 500
Can't call method "holds" on an undefined value at
/home/vagrant/kohaclone/C4/Biblio.pm line 406.
=> With this patch applied it will silently redirect you to the search
form.
Note: We could/should improve the behavior and display a message, but
DelBiblio will need to be moved to Koha::Biblio->delete and other
callers adjusted
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
David Cook [Fri, 12 Oct 2018 01:53:22 +0000 (01:53 +0000)]
Bug 21556: Deleting same record twice leads to fatal software error
If you delete a record, confirm the deletion, and try to delete the
record and confirm it again befoe the first deletion completes, you'll
generate a fatal software error.
This patch unbinds the click handlers for the "Delete record" button
after the deletion is confirmed and just before the Javascript
processes the redirect to the next page in the process.
To test:
1) You will need a bibliographic record that is able to be deleted
2) Click "Edit", then "Delete record", then "OK"
3) While the browser is reloading, click "Edit", then "Delete record",
then "OK
4) Observe a fatal error such as "Internal server error" or 'Can't call
method "holds" on an undefined value at
/home/vagrant/kohaclone/C4/Biblio.pm line 406.'
5) Apply the patch
6) Run "restart_all" on kohadevbox (or otherwise restart Plack if
running Plack)
7) Navigate to another bibliographic record that is able to be deleted
8) Click "Edit", then "Delete record", then "OK"
9) While the browser is reloading, click "Edit", then "Delete record"
10) Observe that no fatal software error is generated
11) You are redirected to
http://localhost:8081/cgi-bin/koha/catalogue/search.pl (on kohadevbox)
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Tue, 30 Oct 2018 11:59:26 +0000 (11:59 +0000)]
Bug 21725: Use full statement in HAVING rather than constructed column
To test:
1 - prove -v t/db_dpendent/Acquisition/GetBasketsInfosByBookseller.t
2 - Apply patch
3 - prove -v t/db_dpendent/Acquisition/GetBasketsInfosByBookseller.t
4 - It passes
5 - Have some open/closed and some fully and not full received baskets
6 - View a vendor and confirm baskets are shwn as expected
7 - Check 'Show all baskets' shows all baskets
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Note sure this is the best thing but it fixes the issue
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Fri, 26 Oct 2018 10:55:54 +0000 (11:55 +0100)]
Bug 21682: Corrections for strict sql in stockrotationrotas
Test Plan:
1) Ensure you're database is prior to version 18.06.00.040
2) Ensure 'strict_sql_modes' is enabled
3) Run updatedatabase
4) See no errors during upgrade
5) Run a fresh install
6) Note no errors during database installation
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Tue, 23 Oct 2018 12:30:25 +0000 (12:30 +0000)]
Bug 21476: Fix HTML5 media from playing in the OPAC - incorrect filters
This patch makes a correction to a template filter to prevent
incorrectly-encoded HTML in media source links which were preventing
media from embedding correctly in the OPAC.
To test, apply the patch and enable the HTML5MediaEnabled and
HTML5MediaYouTube system preferences.
- Edit a record to include links to videos in 856$u. For example:
- https://www.youtube.com/watch?v=grTwH6Evdfc
- https://archive.org/download/POPEYEMeetsSindbadTheSailor1936/POPEYE%20meets%20Sindbad%20The%20Sailor%20%281936%29.ogv
View the record in the OPAC and confirm that the videos display in
the
"Play media" tab and that they play correctly.
Tested and works as described, also matches the intranet code.
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Wed, 31 Oct 2018 12:18:58 +0000 (12:18 +0000)]
Bug 21742: Fix YouTube variable propagation
The loop to find all media has an $isyoutube variable. This was declared
outside the loop and never reset. Once a YouTube video was encountered
all subsequent videos were considered as YouTube. This patch reduces the
scope of the variable and resets per loop.
To test:
1 - Enable HTML5Media and HTML5MediaYouTube
2 - Add 856$u to record for a youtube vido and a pdf (sample record
attached to bug)
3 - View the record, the Play media tab has two video boxes
4 - Play the second, it fails
5 - Apply patch
6 - View record, Play media should include only one video link
Signed-off-by: Devinim <kohadevinim@devinim.com.tr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Fri, 26 Oct 2018 18:19:36 +0000 (15:19 -0300)]
Bug 21681: Improve the account lines fetch
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Fri, 26 Oct 2018 18:25:09 +0000 (15:25 -0300)]
Bug 21681: Add tests for GetPatronInfo
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Josef Moravec [Fri, 26 Oct 2018 10:05:11 +0000 (10:05 +0000)]
Bug 21681: Remove C4::Accounts::getcharges
Test plan:
0) Do not apply the patch
1) Enable ILS-DI
2) Go to
<opac_url>/cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=51&show_fines=1
use patron with some paid and unpaid fines
3) Save the page for later usage
4) Apply the patch
5) Repeat 2 with same patron and compare the saved result with the new
one, they should be same
6) git grep getcharges should return no occurance
7) prove t/db_dependent/Accounts.t
Co-authored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Fri, 26 Oct 2018 18:08:51 +0000 (15:08 -0300)]
Bug 21694: Keep the context
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Fri, 26 Oct 2018 17:34:35 +0000 (18:34 +0100)]
Bug 21694: Add the Koha::Account->lines method
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Magnus Enger [Fri, 26 Oct 2018 20:47:16 +0000 (22:47 +0200)]
Bug 21698: Fix POD of cancel_unfilled_holds.pl
To test:
- Run "perldoc misc/cronjobs/holds/cancel_unfilled_holds.pl"
- Notice some problems:
-- No description in the NAME section
-- Descriptions of options in the SYNOPSIS section
-- A literal head1
-- Long options are listed with a single leading dash
-- Options --verbose and --confirm are not listed under OPTIONS)
- Take a look at the script itself to see that --verbose and
--confirm should be listed.
- Also note the typo on line 97: 'v|verbosev' => \$verbose,
- Apply the patch
- Look at the script and perldoc again and check that all problems
described above are now fixed.
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Josef Moravec [Mon, 5 Jun 2017 09:55:12 +0000 (11:55 +0200)]
Bug 18720: Use exception instead of die in GetBasketAsCsv
Test plan:
prove t/db_dependent/Acquisition/GetBasketAsCSV.t
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Clearing up the inconsistency mentioned in comment #35. There is one
place where we use the term 'media' for a template variable, everywhere
we refer to material types as 'types'.
NOTE: This is a breaking change for existing backends that still use
'media'. Of the PTFS Europe backends, only the Koha backend uses it,
this will be modified as necessary. Generally backends will supply this
variable themselves, so the breaking-ness of this change should be
minimal.
No test plan as it's backend dependent.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Thu, 14 Jun 2018 13:26:02 +0000 (14:26 +0100)]
Bug 20941: Add Illrequest->getType method
This patch adds a method to the Illrequest object enabling it to return
its type, which is stored as an Illrequestattribute object
To observe broken state:
- Do not apply patch
- Ensure you have at least one Interlibrary loan created
- In OPAC view, go to "your interlibrary loan requests"
- => TEST: Observe that the "Request type" column is not populated
- Click on "View" for one of the requests
- => TEST: Observer that the "Request type" row is not populated
- In Staff view, go to "ILL requests"
- Click on "Manage request" on a request
- => TEST: Observer that the "Request type" row is not populated
To Test:
- Apply patch
- In OPAC view, go to "your interlibrary loan requests"
- => TEST: Observe that the "Request type" column IS populated
- Click on "View" for one of the requests
- => TEST: Observer that the "Request type" row IS populated
- In Staff view, go to "ILL requests"
- Click on "Manage request" on a request
- => TEST: Observer that the "Request type" row IS populated
Signed-off-by: Niamh.Walker-Headon@it-tallaght.ie Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Mon, 13 Aug 2018 13:39:42 +0000 (13:39 +0000)]
Bug 10442: Remove references to non-standard "error" class
The CSS for <div class="error"> is obsolete and should not be used. This
patch removes the definition from the main CSS file and corrects
instances of its use in the templates to the standard <div class="dialog
alert">.
To test:
- In Acquisitions -> Late orders, locate an order from a vendor which
doesn't have an email address. Selecting that order and clicking
"Claim" should trigger an error dialog, "This vendor has no email." It
should be styled correctly.
- With AcqCreateItem set to "when placing an order," add to an existing
order using the "From a new (empty) record" option. Add two items with
identical barcodes and submit the form. A error should show at
the top of the page.
- With AcqCreateItem set to "when receiving an order," receive an order
and add two items with identical barcodes. Submitting the form should
trigger an error message at the top of the page.
With the remaining cases I don't know how to trigger the errors in
question, so a visual check of the changes may be required:
- Administration -> Funds -> "You are not authorized to modify this
fund"
- Administration -> Search engine configuration
(/admin/searchengine/elasticsearch/mappgings.pl) -> Various
modification errors.
- With the AutoEmailOpacUser preference set to "send," adding a patron
without an email address can trigger an error, "This member has no
email."
- With plugins enabled, and installed, there are error messages
displayed under various circumstances.
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Mon, 29 Oct 2018 22:23:53 +0000 (19:23 -0300)]
Bug 21080: Fix patron's attributes display when PA_CLASS is used
When a patron attribute class (AV PA_CLASS) is created, the patron's
edit view is broken:
https://screenshots.firefox.com/62uNhoUtH6rPXm9l/pro.kohadev.org
To recreate:
1. Create 1+ authorised values PA_CLASS
2. Create patron's attributes using it
3. Edit a patron
it depends on the order of the fieldset and the ol elements
This is certainly not the best fix but the display does not look broken!
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>