Bug 9755 QA follow-up: move MARC-specific functionality to utility class
This follow-up moves all the MARC-specific functionality of Koha::Record
(now renamed to Koha::MetadataRecord) to a Koha::Util::MARC utility class.
To test, run relevant unit tests:
> prove t/Koha_MetadataRecord.t t/Koha_Util_MARC.t t/db_dependent/Koha_Authority.t
and optionally try to merge a record.
This patch refactors the merge record interface and code a little bit
in preparation for making it possible to merge authority records.
To test:
1) Apply patch.
2) Try merging two records:
a) Create a list.
b) Add two records you would like to (or be willing to) merge
to said list.
c) View said list.
d) Check the checkboxes next to the two records you added.
e) Click "Merge selected records."
f) Choose a merge reference.
g) Choose fields from each record that you want to keep.
h) Click "Merge."
3) Confirm that your merged record has the fields and subfields you
wanted.
4) Run the unit tests for the two files that were changed:
prove t/Koha_Record.t t/db_dependent/Koha_Authority.t
5) Sign off.
Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Tue, 9 Jul 2013 10:02:00 +0000 (12:02 +0200)]
Bug 10557: remove unused branch parameter from GetBooksellersWithLateOrders
C4::Booksellers::GetBooksellersWithLateOrders has an unused parameter.
The $branch variable is never used in the routine.
Test plan:
Check that no behavior changes on the late orders page.
Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I couldn't find any use of the branch parameter apart from
the one corrected by this patch. Also tested late orders,
couldn't find any problems.
Owen Leonard [Fri, 28 Jun 2013 19:10:14 +0000 (15:10 -0400)]
Bug 10516 - Improve titles, breadcrumbs, and confirmation messages for Z39.50 server adds and updates
The template for adding/editing Z39.50 servers shows the same title,
breadcrumbs, etc. for add and edit operations. This patch creates
separate text for each case.
To test, try both adding and editing a Z39.50 server. The page title,
breadcrumb, and heading should correctly reflect the operation you
perform.
Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely and all strings are translatable.
Owen Leonard [Fri, 19 Jul 2013 16:21:42 +0000 (12:21 -0400)]
Bug 10586: fix CSS styling when printing cart from Firefox
When printing the Cart from Firefox the styling is off even though it
looks correct in preview. I think this may be because the preview is
including stylesheets designated for screen.
This patch removes special handling of JS and CSS assets for the Cart's
print view, letting the page handle print styling like other pages in
the OPAC.
To test, put items in your Cart in the OPAC. Open your Cart and click
the "print" link. Your printout should be correctly styled and match the
preview.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Tested both fail condition and condition with patch - display is much improved. Thanks, Owen!
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Works as advertised
Janusz Kaczmarek [Thu, 11 Jul 2013 17:07:09 +0000 (19:07 +0200)]
Bug 10578: fix results sorting in staff interface
To test (in librarian's interface):
1. Have some biblio records to get a list when searching.
2. Make an advanced search with 'as phrase' modifier (title -- ti,phr:
or author -- au,phr: , etc.)
3. Having the result list try to change the sort order.
4. You should get no results with a message like: "No results match your
search for 'au%2Cphr: " etc.
5. Apply the patch
6. Repeat steps 2. & 3.
7. You should get the list sorted according to your choice.
Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, passes all tests and QA script.
Owen Leonard [Thu, 11 Jul 2013 14:53:06 +0000 (10:53 -0400)]
Bug 10576: make strings in additem.js accessible to translation
There are a couple of untranslatable strings in additem.js. This patch
moves the strings out of the script and into the include file which has
been created for this purpose.
To test, apply the patch and test the process for adding an item to an
existing or new basket (with AcqCreateItem set to "when placing an
order."
The add item form should be correctly labeled "Add item." After adding
an item, click to edit it again. The form should now be labeled "Update
item."
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely and passes all tests.
Made sure strings can be translated testing with German templates.
Owen Leonard [Mon, 8 Jul 2013 15:22:38 +0000 (11:22 -0400)]
Bug 10552: make several sysprefs available to the OPAC login page
Several system preference variables are unavailable to the OPAC login
template because they are not explicitly enabled for that page. Instead
of adding them to Auth.pm using the old method this patch uses the new
system preference check syntax using the Koha TT plugin.
The following preferences are now checked using this syntax in
masthead.inc:
In order for the call in masthead.inc to the new plugin to work on all
OPAC pages "[% USE Koha %]" must be added to any template which
includes it (most of them).
Also in this patch: A change to Auth.pm to enable correct display of the
LibraryName in the title of the OPAC login page.
To test, turn on the above system preferences and confirm that the
relevant links appear under the OPAC's main search bar on all pages
including the login page.
Confirm that the text specified in the LibraryName system preference is
shown as the title of the login page.
Confirm that course reserves and comments are displayed correctly on the
biblio detail page.
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
I checked both prog and ccsr - all seems well and the links are appearing and disappearing in accordance with the appropriate sysprefs.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.
Nicole C. Engard [Fri, 10 May 2013 13:54:53 +0000 (09:54 -0400)]
Bug 10197: Add classes to patron info list
This patch adds classes to the patron info found on the
top left of the circulation and patron related pages to
allow for easy styling of the information displayed.
To test:
* Apply patch
* View a patron detail page and view the source on the list to the
left to see the styles
* View a checkout screen and view the source on the list to the
left with patron info to see the styles
* You could also try to style things by customizing your CSS
Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template only changes.
Bug 10604: increase width of two columns in the courses table
The department and term columns in the courses table started
as varchar(20), but since they refer to authorized values, need
to be varchar(80) to match authorised_values.authorised_value. This
patch increases the width of those columns.
To test:
[1] Create two DEPARTMENT authorised values, one whose code
is shorter than 20 characters and one whose code is longer
than 20 characters.
[2] Create two courses; give one course the short department and
the other the long department.
[3] Go to the courses list. Observe that the department column is
displays the department name only for the short course.
[4] Apply the patch.
[5] Edit the course with the long department and assign that long
department to it again.
[6] Go back to the courses list. Observe that both of the courses
now display their assigned department.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Verified changes are consistent for new installations
and updated installations.
Passes all tests.
Bug 8911: make sure history.txt gets installed where history.txt can see it
This patch makes Makefile.PL put the history.txt file in the right places
depending on the chosen setup layout, adds a reference to that place in
koha-conf.xml (and debian template version), and finally tweaks about.pl to
use it.
To test, apply the patch and verify that perl Makefile.PL runs fine, and
installing in
- dev
- single
- standard
layouts works as expected. Then go to the about.pl page and see if Koha's
history shows there.
Then, build your packages and test on your newly created instances.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Move the favicon files for OPAC and staff so that they are not
blocked by the Apache configuration change introduced by the
patch for bug 9812.
Note that this patch makes the favicon customizable by theme,
not both theme and language.
To test, after applying the patch.
[1] Open pages in the OPAC and staff client. Verify that the favicon
is displayed in the usual place in your web browser. Specific pages
to test include
- circulation receipts and slips
- help
- lists view
- web-based self-checkout
[2] Verify that the Apache logs do not contain entries like this:
client denied by server configuration: {...}/prog/en/includes/favicon.ico
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Verified that the favicon displays correctly. Also
tried changing favicons for staff and OPAC using the
system preferences for those. This still works, where
the system preferences are correctly supported in the
templates.
Move the XML and XSD data files so that access to them
(particularly the XML files) is not blocked by the Apache
configuration change introduced by the patch for bug 9812.
To test, after applying the patch.
[1] Open a MARC21 bibliographic record in the cataloging editor.
[2] Click on the plugin link for the 008 field. Verify that
that the form for all of the fixed field positions is displayed,
and verify that you can change the type of material.
[3] Repeat step 2 for the 006 field.
[4] Verify that there are no entries in the Apache error log that contain
client denied by server configuration: {...}/cataloguing/value_builder/marc21_field_008.xml
or
client denied by server configuration: {...}/cataloguing/value_builder/marc21_field_006.xml
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Also verified translation of those plugins still works correctly.
Owen Leonard [Mon, 10 Sep 2012 12:34:33 +0000 (08:34 -0400)]
Bug 7598: make strings in acquisitions JavaScript translatable
English strings in acq.js cannot be processed by the translation script.
This patch moves the strings to the templates to be set as JS variables
for use by the script.
To test:
- On the uncertain prices page, enter an invalid price and click save.
You should see a JavaScript alert pointing this out.
- When adding a fund to an existing budget, enter an amount which
exceeds the amount in the parent budget. You should see a JavaScript
alert pointing this out. There is a similar function which has been
corrected, checkBudgetParent(), but I don't know how to trigger it for
testing.
The closebasketgroup function has been updated but as far as I can tell
it's not actually in use.
David Cook [Thu, 27 Jun 2013 06:02:08 +0000 (16:02 +1000)]
Bug 9801: display facet labels in search results only when there are facet values
Currently, the headings for facets (such as location) are showing even
if there are no actual values/links for that facet type.
This patch simply checks if the facet array contains any facets before
printing the heading and HTML for each facet value/link.
Test Plan:
Before applying:
0) If you want to check the location facet (which is easiest),
enable singlebranch mode in the globals system preferences.
1) Do a search for records/items that you have no shelving location
specified (or simply remove the shelving location for a small range
of records that you can find in a search query).
2) Note that "Location" appears amongst the facets even though there
are no values/links present. (If you look at the HTML source, you'll
see some empty HTML tags have been printed out.)
Apply patch.
3) Flush your cache and refresh your page.
4) You should no longer see a "Location" facet (or those empty HTML
tags) on the facet sidebar.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Template changes only.
Checked according to test plan, made sure location facet
still shows up when values exist, otherwise it's hidden.
It might make sense to add ids to the facets so libraries
can decide to hide some of them easily. Or alternatively
add a system preference to make that possible.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Owen Leonard [Mon, 10 Jun 2013 16:14:15 +0000 (12:14 -0400)]
Bug 2774 - Path to theme is hard-coded in many places
This patch corrects more places in Koha where the path to the "prog"
theme is hard-coded in templates, CSS, and scripts.
Staff client home page:
Paths to the Koha logo background image and the module image sprite have
been corrected. Inactive and hover states of the module links
(circulation, patrons, etc) should look correct.
addbiblio.pl:
An <img> tag is replaced with a text link and an
additional CSS class. CSS uses an image-replacement technique to display
the image as before.
To test, open a blank or existing bibliographic record for editing.
Confirm that the "tag editor" icon displays correctly in two cases: 1)
tags linked to plugin editors and 2) tags linked to authorities. Both
should look correct and work correctly.
System preferences:
The system preferences editor appends a "loading" image to system
preference submit buttons when they are clicked. This patch changes
ajax.js to insert a <span> styled with a background-image instead.
To test, open system preferences and modify any preference. Submit the
change and confirm that the "loading" image appears correctly.
Background jobs:
Any place in Koha where a background job is used displays a progress
bar. This patch corrects the path in CSS to the progress bar image. To
test, perform an action which triggers the display of a progress bar.
For instance, batch modification of items. Confirm that the progress bar
image displays correctly.
blue.css:
I don't know if this is still used by anyone, but a couple of image
paths in this CSS file have been corrected.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests, QA script and test plan.
David Cook [Thu, 13 Jun 2013 06:46:46 +0000 (16:46 +1000)]
Bug 10457: fix SQL error when using 'export select items data' in serials claims page
Currently, if you use the "check all" checkbox next to the "Vendor"
table header, and try to "Export selected items data", you'll
see the following SQL error in the Apache error log:
DBD::mysql::st execute failed: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for
the right syntax to use near 'on ORDER BY title' at line 12 at
/.../lib/C4/Serials.pm line 1828.
This is because the Javascript that produces the re-direct URL is
including the value of the checkall checkbox, which is "on",
as a "serialid".
We need to only take checkboxes with a name of "serialid" when
crafting the re-direct link.
This patch adds the [name=serialid] attribute selector to the Jquery
that creates the URL to lateissues-excel.pl from claims.pl.
Test Plan:
Before applying the patch:
1) Go to Serials > Claims (found on the left navigation bar of Serials)
2) Choose a vendor that has serials to claim (or create some late
serials for a vendor so that they will show up)
3) Click on the checkbox to the left of the "Vendor" table heading.
4) Click "Export selected items data" at the bottom of the page
5) Check the Apache error log. Notice that you'll get a SQL error
like the one in the message above.
Apply the patch.
Repeat Steps 1-4.
Note that you should now have a CSV file downloading rather than
getting a SQL error.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Owen Leonard [Mon, 8 Jul 2013 18:37:03 +0000 (14:37 -0400)]
Bug 10553: make public lists available on OPAC login page
If you are not logged in to the OPAC, looking at the login page, and you
click the Lists button to see public lists it says there are none. This
patch corrects Auth.pm so that it loads the list of public lists in this
situation.
To test you must have at least one public list. Make sure you are logged
out of the OPAC and visit the login page (/cgi-bin/koha/opac-user.pl).
Clicking the "Lists" button should show you a list of public shelves.
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
works as described, and list button is not shown when opacpublic is disabled.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
bug 10559: remove spurious "statement handle still active" warnings
Generating (e.g.) overdue notices can result in spurious warnings in
the cronjob logs:
$ ./misc/cronjobs/overdue_notices.pl -t -library CPL
prepare_cached(SELECT * FROM issues WHERE itemnumber = ?) statement handle DBI::st=HASH(0x54a7828) still Active at C4/Letters.pm line 589
This patch removes the warning by making sure that the relevant statement
handle is finished after fetching its first row of results.
To test:
[1] Set up an overdue loan such that running overdue_notices.pl will
trigger the generation of a notice.
[2] Run overdue_notices.pl -t and note the warning message.
[3] Apply the patch.
[4] Run overdue_notices.pl -t again and note that the warning message
is no longer displayed.
[5] Check the message_queue table and verify that the overdue
notices generated in steps 2 and 4 have the same text.
Kyle M Hall [Tue, 16 Jul 2013 16:50:25 +0000 (12:50 -0400)]
Bug 10597: fix Search to hold button on record details page
The holds button in cat-toolbar is broken for "search to hold". It is a
split button rather than a dropdown button. Clicking the caret works
fine, but clicked the button sends you to the marc editor!
Test Plan:
1) View a patron's details page
2) Click 'search to hold'
3) Search for something
4) On the results page, click a result line's title link (
catalogue/detail.pl )
5) Note the "Place hold" button is a split button, click the left half
of the button, note it redirects you to the editor.
6) Apply this patch
7) Repeat steps 1-5
Bug 10595: don't display OpacTopissue page when system preference is turned off
When the syspref is turned off, the link is hidden but the page is still
accessible. This patch checks the syspref and redirects to 404 if it is disabled.
Test plan:
Before applying the patch
Enable OpacTopissue
Observe there is a link to opac-topissues.pl next to Advanced search etc.
Follow that link, observe that opac-topissues.pl is loading
Disable OpacTopissue
Observe the link is gone
Manually open /koha/opac-topissues.pl and check that it is loading even though the feature is disabled
Apply patch
(OpacTopissue still diabled)
Manually open /koha/opac-topissues.pl and observe that you are being redirected to the 404 page.
Enable OpacTopissue
Follow the link or manuall open opac-topissues.pl and check that it is working
Robin Sheat [Wed, 5 Jun 2013 05:50:29 +0000 (17:50 +1200)]
Bug 10411: add cache control headers for static resources (Debian package)
This adds caching directives to the static resources so that the browser
doesn't ask about them all the time.
By default, Debian apache doesn't have the required module (mod_expires)
enabled, and so this patch will have no effect. In order to enable this
function, run:
a2enmod expires
and restart apache.
Test Plan:
* Using firebug or equivalent, load a page.
* Note that none of the images, css, or js files have a Cache-Control or
Expires header set.
* Add this patch, redeploy the package with it (or overwrite the
apache-share.conf file) enable the 'expires' module, restart apache.
* Force-reload the page
* Note that the images, css, js now have Cache-Control and Expires set
for 12 hours into the future.
bug 10549: make the ILS-DI services advertise that they return UTF-8
This patch changes a few occurences of ISO-8859-1 to UTF-8
within the XML generation of the ILS-DI module.
To test:
- Activate ILS-DI system preference
- Go to [youropac]/cgi-bin/koha/ilsdi.pl
- Check all examples in the documentation for the correct
encoding
- Check GetAvailability gives you the correct encoding and
check the source for the correct encoding
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10515: (follow-up) fix use of GetBranchCategories
Adjusting to reflect the removal of the branchcode parameter
to GetBranchCategories; also filter on the 'searchdomain'
library group type, as appears to have been intended.
Jonathan Druart [Fri, 28 Jun 2013 14:07:13 +0000 (16:07 +0200)]
Bug 10515: make behavior of library category fetchers consistent with other fetchers
The prototype is not consistent, GetBranchCategory should return only 1 result
and GetBranchCategories should not have a categorycode argument.
This patch fixes that.
Test plan:
1/ Try to add/remove/modify a library.
2/ Add some groups
3/ Add these groups to a library
Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
David Cook [Fri, 5 Jul 2013 02:00:36 +0000 (12:00 +1000)]
Bug 10541: enable cross-browser AJAX in additem.js
Currently, the additem.js is using "indexOf" to search
for a value in an array. While this works in Chrome, Firefox,
and IE > 9, it fails miserably in IE 8 and 7 (which don't have
the indexOf method). This means that users aren't able to add
items using the acquisitions module!
Instead of using "indexOf", we should be using the jQuery function
$.inArray. It was added in jQuery v1.2 (3.8.0 uses v1.3.2 so even
our oldest supported release can use this method). It's perfectly
cross-browser compatible...works in Chrome, Firefox, and every
version of IE that I've tried (i.e. 7, 8, 9).
Test Plan:
Before applying patch:
0) Switch to Internet Explorer 7, or 8, or 9, or 10.
If you're using IE 9 or 10, you'll need to change the Document Mode to
IE7 standards or IE8 standards.
You can do this by opening Internet Explorer 9 or 10, pressing F12 (or
clicking on the gear in the top right corner and choosing
F12 Developer Tools), and then clicking on "Document Mode" on the
top toolbar. There, you can change to IE7 or IE8 standards.
N.B. This is not always a perfect emulation in every case, but this
time it does show you the bug.
1) Set the system preference AcqCreateItem to "receiving an order"
2) Go to Acquisitions
3) Either:
a) Receive a shipment for a basket with items
b) Create a new basket, create an order, close the basket, and
then do 3a)
4) In the "Item" fieldset, fill out some fields such as barcode,
Date acquiried, Public note, etc.
5) Click "Add" at the bottom of the fieldset
6) Note that while the item may have been added, the "Item" fieldset
is not being shown again. You may also notice a Javascript error
appearing in a pop-up window or you might see a yellow warning flag
on the bottom status bar.
APPLY THE PATCH
7) Do a full refresh of the page (hold down shift and press the refresh
button on the browser next to the address bar), and try adding items
again.
8) Note that you receive no warnings and that items are added correctly
as they would be in Firefox or Chrome.
OPTIONALLY
9) To be sure that I haven't broken anything, go through the same steps
in IE9 (with IE9 standards) or Chrome or Firefox. Everything should be
working.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Tested in IE10 in IE7 mode and IE9 mode. Also tested in Firefox.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised.
C4:Circulation:GetUpcomingDueIssues is used in the advance_notices.pl
script. This patch corrects an error in its handling of the maxdays
parameter that resulted in it picking up *all* upcoming due loans and
recently overdue loans.
Test plan :
- Create an issue with a date due in the paste
- Create an issue with a date due in two days
- Launch advance notices with due date in max 2 days : perl misc/cronjobs/advance_notices.pl -c -n -v -m=2
=> You get a warn "found 0 issues"
- Launch advance notices with due date in max 3 days : perl misc/cronjobs/advance_notices.pl -c -n -v -m=3
=> You get a warn "found 1 issues"
Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
I did the following test :
- 1 book to check in 2 days
- 2 books to check in in the past
before applying the patch :
$perl ../misc/cronjobs/advance_notices.pl -c -n -v -m=2
getting upcoming due issues at ../misc/cronjobs/advance_notices.pl line 203.
found 1 issues at ../misc/cronjobs/advance_notices.pl line 205.
I changed the value of "-m" : 0, 1, 2, 3, 4
=> always 1 issue found (the book to check in in 2 days)
after applying the patch :
$perl ../misc/cronjobs/advance_notices.pl -c -n -v -m=2
found 0 issues
for m = 0, 1, 2 => 0 issues
$perl ../misc/cronjobs/advance_notices.pl -c -n -v -m=3
found 1 issues
for m = 3,4,5 => 1 issues (the book to check in in 2 days)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised.
Kyle M Hall [Mon, 11 Feb 2013 13:27:05 +0000 (08:27 -0500)]
Bug 9576: can now control whether max loans limit can be overriden
Adds a new system preference AllowTooManyOverride to control whether
a librarian can override the 'Too many checked out' message which is
currently always overridable.
Test Plan:
1) Apply patch
2) Run updatedatabase.pl
3) Attempt to check out 1 more item to a patron than the max issues
4) You should be allowed to override by default ( current behavior )
5) Set AllowTooManyOverride to "Don't allow"
6) Repeat step 3
7) You should be blocked from being able to issue the item
Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
The new system preference is activated by default, which mean there
will be no change in behaviour on update.
The system preference is correctly added to the database and .pref
files.
Katrin Fischer [Wed, 10 Jul 2013 20:43:41 +0000 (22:43 +0200)]
Bug 10563: Fix broken 'Edit' link on check expiration page
This fixes the broken 'Edit' (subscription) link on the
check expiration page in serials.
To test:
- Add a subscription
- Go to the check expiration page
- Search for your subscription, use an expiration date in the
far future
- Verify the edit link on the result list doesn't work right
before applying the patch, but works after
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 7019: fix sorting by return date in Circulation History
The "return date" column sort is not using the date sort algorithm because it is
confused by the combination of date data and text data ("Checked out").
This patch adds the use of datatable "title-string" sort type.
With that, the date in ISO format are used for sorting and because
letters are before numbers, "Checked out" rows are more recent than any date.
Test plan :
- set dateformat syspref to "dd/mm/yyyy"
- Go to members/readingrec.pl for a borrower having a old issues and
checked out issues
=> Check that sort of "Return date" is correct.
For example :
With patch :
20/01/2011
06/03/2011
20/03/2011
Checked Out
Without patch :
06/03/2011
20/01/2011
20/03/2011
Checked Out
- Test also with dateformat syspref "mm/dd/yyyy"
Katrin Fischer [Sun, 30 Jun 2013 14:55:55 +0000 (16:55 +0200)]
Bug 10409: Follow up - improving strings for easier translation
Fixing this line:
<legend>[% IF course_id %] Edit [% ELSE %] Create [% END %] course</legend>
As grammar works different in different languages, having single
strings like that in a predefined order makes having a nice translation
unnecessarily hard.
This will make it a little easier:
<legend>[% IF course_id %]Edit course[% ELSE %]Create course[% END %]</legend>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Owen Leonard [Wed, 5 Jun 2013 12:36:51 +0000 (08:36 -0400)]
Bug 10409 - Do not show course entry form if no departments are found
The course reserves entry form should not be shown if there are no
DEPARTMENT authorized values, since this prevents the form from being
submitted. This patch replaces the form with an error message when no
DEPARTMENT authorized values are found.
Also corrected:
- Corrected grid structure for more standard display
- Converted labels with no corresponding inputs to <span class="label">
- Closed unclosed tags
- Corrected incorrect capitalization
This patch contains whitespace changes, so please ignore whitespace when
examining changes.
To test, delete any DEPARTMENT authorized values, if present. Create a
new course in Course Reserves. You should see a warning that no
DEPARTMENT values were found.
If you are logged in with the correct permission, the warning should
contain a link to the correct authorized value page. If you do no, the
warning should refer the problem to an administrator.
After creating one or more DEPARTMENT values, the form should display
and submit correctly.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
After this patch has been applied, I get an error message and no form
if I don't have any DEPARTMENTs defined, which makes sense given that
the form can't be submitted without a DEPARTMENT.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
You now see a useful error message, when no departments have been
defined. Else you are taken to the correct form. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Sophie Meynieux [Fri, 26 Apr 2013 13:06:40 +0000 (15:06 +0200)]
Bug 10127 : Printoverdues.sh should tar only pdf files
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
From the bug report:
At the end of printoverdues.sh, an archive is generated
containing all files present in directory given as parameter.
As archives are generated in this given directory, they
contain previously generated tar files, creating oversized files.
Only .pdf files should be archived
All tests and QA script pass.
Worked ok in my tests, only packign PDF in the given directory.
Galen Charlton [Mon, 20 May 2013 15:38:46 +0000 (08:38 -0700)]
Bug 10170: expose more managed staged MARC strings to translation
This commit makes it possible to translated the 'staged'
and 'error' record statuses as well as the 'auto_match'
overlay status.
Also takes out a bit of HTML cruft in one string that is
not needed for translation.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass. New strings are parsed into the po files:
"%s Always add items %s Add items only if matching bib was found %s Add items only if no matching bib was found %s Ignore items %s %s %s %s "
"%s No match %s Match applied %s Match found %s %s %s " Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Adrien Saurat [Thu, 2 May 2013 14:56:54 +0000 (16:56 +0200)]
Bug 10170: strings in MARC import made translatable
Following bug 9215: non translatable strings are now
present in the template and translatable
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Not only does this make the strings translatable it makes the template
a lot easier to read Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Fri, 17 May 2013 13:27:45 +0000 (15:27 +0200)]
Bug 10275: UT: OrderFromSubscription.t needs to create its own data
Try before the patch:
prove t/db_dependent/Acquisition/OrderFromSubscription.t
And after, it should produce:
t/db_dependent/Acquisition/OrderFromSubscription.t .. ok
All tests successful.
Files=1, Tests=12, 2 wallclock secs ( 0.02 usr 0.00 sys + 0.46 cusr
0.02 csys = 0.50 CPU)
Result: PASS
And some warnings...
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests.
Assumes Dateformat is set to US dates as in the sample data. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10575 : GetOrdersByBiblionumber.t needs a database transaction
Before this patch, the queries in GetOrdersByBiblionumber.t were commited in the database and have to be removed at the end.
This patch wraps tests in a database transaction.
Test Plan :
prove t/db_dependent/Acquisition/GetOrdersByBiblionumber.t
t/db_dependent/Acquisition/GetOrdersByBiblionumber.t .. ok
All tests successful.
Files=1, Tests=3, 0 wallclock secs ( 0.02 usr 0.01 sys + 0.37 cusr 0.05 csys = 0.45 CPU)
Result: PASS
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tests pass. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Mathieu Saby [Fri, 3 May 2013 21:07:37 +0000 (23:07 +0200)]
Bug 10189: Translate values in UNIMARC 128b/c cataloguing plugins to English
Cataloguing plugins for UNIMARC 128b and 128c fields are only in Ffrench.
This patch translates them.
Source : http://blue.lins.fju.edu.tw/mao/marc/unicon.htm
Note : 128b and 128c are deprecated in last version of UNIMARC Manual (field 145 used instread).
But they are still used in French Sudoc network.
To test : in a UNIMARC english Koha, edit a record and use 128b and 128c
cataloguing plugins. Check everything is in english.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Thx for translating those!
Verified new strings get parsed into the po files.
Templates still contain lots of tabs, those can be fixed separately.
Galen Charlton [Mon, 17 Jun 2013 01:05:31 +0000 (18:05 -0700)]
Bug 10258: offer to create basket group only when staff user has correct permission
If the staff user does not have the group_manage acquisition permission,
do not offer to create a new basket group when closing an order basket.
This avoids a situation where if a staff member without that permission tries
to close a basket and chose the option to create a bakset group, they would
be redirected to the login page.
To test:
[1] Log in as a staff user that does not have
the acquisition/group_manage permission.
[2] Create a new order basket, attach at least one
order line to it, then close it.
[3] Verify that the confirmation page does not
offer to create a basket group with the
same name as the order basket.
[4] Log in as a staff user that has the
acquisition/group_manage permission.
[5] Create and close an order basket.
[6] Verify that this time, the confirmation page
*does* offer to create a basket group.
Galen Charlton [Thu, 13 Jun 2013 15:53:49 +0000 (08:53 -0700)]
Bug 10258: fix permissions check for setting basket group for order basket
Improve the code that displays and allows staff to
set the basket group from the basket details page
for a closed basket.
Prior to this patch, a staff member who did not
have the group_manage acquisition permission would
still see a control to change the group that the
basket belongs to; attempting to change the group
would present with with a login page.
This patch also does some tidying of how basket group
details are passed to the template.
To test:
[1] Create an order basket and close it. Do
not assign it to a basket group.
[2] View the basket details while logged in as
a staff user who has the order_manage acquisitions
permission but not the group_manage. The
displayed basket group should be "No group".
[3] Switch to a staff user who also has the
group_manage permission, then view the basket
details again. The basket group field should
now be a select input that allows you to change
the basket group.
[4] Change the basket group. Verify that the basket group
you selected is now displayed as the current group
for that order basket. The basket group delivery and
billing place fields should also now be displayed.
[5] Close the basket group set in the previous step, then
view the basket details again. This time, the basket
group name should be displayed with a suffix of " (closed)",
and no input to change the group should be displayed.
[6] Swith to a staff user who does not have the group_manage
permission, view the basket details, and verify that
the basket name is displayed with a suffix of " (closed)".
Jason Etheridge [Fri, 8 Mar 2013 15:41:06 +0000 (10:41 -0500)]
Bug 9770: fix sorting of Dewey call numbers that contain prefixes
C4::ClassSortRoutine::Dewey can pad the wrong part of a call number internally.
The subroutine get_class_sort_key tokenizes a call number string (splitting on
periods and whitespace) and counts the number of tokens that solely contain
digits. If there is only one such digit group, a comment in the code states
that it will pad said digit group. However, the bug is that the code assumes
said digit group is the first token, when this may not be the case.
In practice, this can cause poor sorting when used a call number is in the form
of PREFIX _space_ 3DIGITS.
To test:
[1] Create two item records whose class scheme is set to
'ddc' (Dewey) and whose call numbers contain prefixes, e.g.,
J DVD 700.1 ABC and J DVD 850 DEF.
[2] Use the inventory tool to produce a list of item items that include
the two created in step 1. Obsere that that items are sorted
in the incorrect order, with "J DVD 850 DEF" coming before
"J DVD 700.1 ABC". Alternatively, run the following SQL
to see the incorrect sort order:
SELECT cn_sort, itemcallnumber
FROM items
WHERE itemcallnumber LIKE 'J DVD%'
ORDER BY cn_sort;
[4] Apply this patch.
[5] Run misc/maintenance/touch_all_items.pl to force cn_sort to be
recalculated.
[6] Repeat step 2 and verify that the call numbers are now sorted
corrected.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jason Etheridge [Fri, 21 Jun 2013 19:31:32 +0000 (15:31 -0400)]
Bug 9770: test case for sorting of Dewey call numbers that contain prefixes
This adds a test for C4::ClassSortRoutine::Dewey to check that the
call number "JR DVD 800.1" sorts before "JR DVD 900"
To test:
[1] Apply just this patch.
[1] Run prove -v t/ClassSortRoutine_Dewey.t
[2] Test #7 should fail.
Signed-off-by: Jason Etheridge <jason@esilibrary.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes test plan and QA script. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10447: add 'ru' and 'uk' to Zebra indexing language list
This patch add the option to choose 'ru' and 'uk' during install for Zebra.
Should work for a tarball install, and make 'ru' and 'uk' available for using
with koha-create too.
Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Reran Makefile.pl and made sure the language options show up now.
Patch extends existing language code lists addings nb, ru and uk
where missing.
Robin Sheat [Mon, 15 Jul 2013 14:06:40 +0000 (02:06 +1200)]
Bug 10590 - parameterise the limit option
The limit option was previously substituted directly into the query. The
previous patch on bug 10590 filters it on input, but there's no reason
not to have it made to work properly in the query for added safety.
To test:
[1] Go to the top checkouts report (http://OPAC/cgi-bin/koha/opac-topissues.pl)
[2] Run the report several times, varying the filters on
number of results and item type.
[3] Verify the the list of top checkouts appears to be correct.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10590 - in opac-topissues limit param is not protected
In opac-topissues page, the limit URL argument is directly added to SQL query.
This patch adds protections : limit must only contain digits and must be lower than 100.
Test plan :
- Edit URL to : /cgi-bin/koha/opac-topissues.pl?limit=10&branch=&itemtype=&timeLimit=999&do_it=1
=> You get the results of 10 most cheched-out of all time
- Edit URL to : /cgi-bin/koha/opac-topissues.pl?limit=&branch=&itemtype=&timeLimit=999&do_it=1
=> You get the results of 10 most cheched-out of all time
- Edit URL to : /cgi-bin/koha/opac-topissues.pl?limit=9999&branch=&itemtype=&timeLimit=999&do_it=1
=> You get the results of 100 most cheched-out of all time
- Edit URL to : /cgi-bin/koha/opac-topissues.pl?limit=WHERE&branch=&itemtype=&timeLimit=999&do_it=1
=> You get the results of 10 most cheched-out of all time
Signed-off-by: Robin Sheat <robin@catalyst.net.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Owen Leonard [Thu, 11 Jul 2013 14:28:55 +0000 (10:28 -0400)]
Bug 10514: improve visibility of Add item link on new order form
This patch converts the "Add" and "Clear" links
to the standard "submit/cancel" format inside a fieldset. This gives
them a little more visual weight.
Based on the changes made by Liz Rea and Jonathan Druart.
To test:
- create a basket
- add a record to it
- scroll down - the link to add item and cancel should both be more
prominent now.
- Click "Add item" - it should add an item.
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
I still feel weird about the button, but as two people have said they'd rather have the button, I'm alright with it I guess.
Really what I want is people to notice it's there and click it at the appropriate time. I hope this will help that issue.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Leaves the translation problems, but that needs more work and is
out of the scope of this bug.
Tested Add and Update functionality works correctly.
Colin Campbell [Tue, 9 Jul 2013 10:18:49 +0000 (11:18 +0100)]
Bug 10507: improve warning about duplicate patron attribute value
If a warning about a duplicated patron attribute is returned,
the value was being passed back for display in the warning
message with the same name as the variable in errors
As the message is displayed in the context of errors
the error value 1 was being displayed not the value
duplicated as intended.
Pass the value to the template with a unique name.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I fixed another tiny typo while signing off: "is already in use" instead
of "is already is use."
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised.
Owen Leonard [Tue, 25 Jun 2013 16:46:04 +0000 (12:46 -0400)]
Bug 10475 - Item form in acquisition not hiding subfields properly
Subfields hidden in your ACQ framework leave a gap where they used to
be in the item entry form when adding an item to an order. This patch
makes the same change made by 7116 to services/itemrecorddisplay.tt to
correct the problem.
To test:
- Edit your ACQ framework and set some item subfields to hidden in the
editor.
- Set your AcqCreateItem system preference to "when placing an order."
- Add a title to an existing basket from an existing record.
The item entry form should display correctly with your hidden subfields
hidden. No whitespace should be left behind where the subfields were
hidden.
Also changed: Invalid "size" attributes on hidden form fields in
neworderempty.tt, stray </li>.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, passes all tests and QA script.
Thx Owen!
Colin Campbell [Thu, 4 Jul 2013 11:21:45 +0000 (12:21 +0100)]
Bug 10529: Remove hardcoded dollar from patron message
The message fields which are returned in the SIP
Screen message field in a Patron Information response
had the dollar symbol hardcoded.
It would be possible to get the symbol from currency
but omitting any symbol would be consistent with the UI
and avoid problems with devices using weird encodings
for local currency symbols (e.g. the many variations
of UK Pound sign)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This routine is not in used and does not make sense. It should not be
used later.
Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, not references to get_branch_code_from_name found.
Katrin Fischer [Mon, 1 Jul 2013 19:58:57 +0000 (21:58 +0200)]
Bug 10490: Overdue fines cap can't store decimal values
When overduefinescap was added to the issuingrules the datatype
given was decimal. This translates in MySQL to decimal(10,0).
This doesn't allow you to store decimal values and therefore
values like 4.5 are saved as 5 in the database.
To test:
On a current installation:
1) Try to enter 4.5 as Overdue fines cap. Verify that the value
is not correctly saved.
2) Apply patch and run database update.
3) Try adding/changing an issuing rule setting Overdue fines cap
to 4.5 again.
4) Verify the value is saved correctly.
Create a new Koha installation from scratch:
1) Verify that the issuingrules table has been created correctly
and that you can add/mofidy issuingrules correctly.
Because this bug can create data loss, the old database update
has also been changed to avoid this problem for people updating
at a later point in time. Checkout an older version of Koha
pre 3.09.00.027.
1) Run the database updates.
2) Verify again, that adding/modifying issuingrules works correctly.
Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Owen Leonard [Tue, 2 Jul 2013 13:59:21 +0000 (09:59 -0400)]
Bug 10422 - Remove references to unused and non-existent wizard.css
doc-head-close.inc contains a reference to "wizard.css" which doesn't
exist. The option to include it never evaluates as true, and that
section can be removed from the template.
To test, apply the patch and view any page in the staff client.
Everything should be styled as before. A search of the Koha source
should return no references to "wizard.css" or a "wizard" variable.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
No occurrence of "wizard" in pl/pm files.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl
Robin Sheat [Fri, 30 Nov 2012 02:48:50 +0000 (15:48 +1300)]
Bug 10560: make it possible for default interface language to not be English
If you enable another translation, and disable English, then if you dont
have a cookie set, or your browser is not set to that language, you will
get English. So you can not disable English in either the staff client
or the OPAC.
This patch fixes the language selection to do the right thing.
To test you must have at least one other language installed besides
English. Apply the patch and disable the en translation. Koha should
fall back to one of the enabled translations.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I added a patch description and test plan, missing from the
original patch.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I have tested with various combinations of activated languages
and have found no regression. If the cookie is set, the right
language is shown accordingly. Else the first language in the
list seems to be picked. It did never fall back to English
in my tests, when English was explicitly deactivated.
In parcels.pl, and other acquisition pages, the funds are not sorted
by name in combo-box. With a great number of funds, it is difficult
to find one.
This patch adds a default value to $orderby arg of C4::Budgets::GetBudgets.
Test plan :
- Create a new fund with a name beginning with 'z' and set you as owner.
- Create a new fund with a name beginning with 'a' and set you as owner.
- Go to a vendor and click "Receive shipments"
- Look at fund combobox
=> Funds are sorted by name
Signed-off-by: Silvia Simonetti <s.simonetti@cineca.it> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
When testing make sure your funds would sort the other way
around when sorting by code instead of description.
Fridolyn SOMERS [Wed, 5 Jun 2013 12:16:14 +0000 (14:16 +0200)]
Bug 6898: fix DB update that assigns the circulate/overdues_report permission
This patch fixes a bug that prevented the circulate/overdues_report
permission from being assigned to staff users during upgrade. This
patch will not affect databases that are already running 3.12.x
or later.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This will only fix the permissions for updates done
after the patch has been applied. But I agree with
Fridolyn, that we can not safely update permissions for
existing installations.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Chris Hall [Fri, 22 Mar 2013 02:33:50 +0000 (15:33 +1300)]
bug 10356: improve display of serial issue dates in staff bib details page
This patch adds the date published to the subscriptions tab in the staff
interface bib display and renames the former "Date" column to
"Date arrived".
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Owen Leonard [Fri, 28 Jun 2013 18:11:48 +0000 (14:11 -0400)]
Bug 10496 - CCSR theme OPAC tabs to not show correct active state
When jQueryUI was updated in the CCSR theme the corresponding CSS
changes were not copied over at the same time, causing style problems
with jQueryUI widgets. This patch makes the necessary changes.
To test, apply the patch, clear your browser cache, and view any page
which uses jQueryUI tabs (advanced search, bibliographic detail page).
Tabs should look correct and correctly show which tab is active.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
CSS changes only.
Confirmed problem in CCSR OPAC templates.
Tested advanced search and detail pages in CCSR and prog.
In order to fully test advanced search I added location and
collection to AdvancedSearchTypes.
Also tested the branch tooltip as I spotted some CSS added for that.
Owen Leonard [Fri, 26 Apr 2013 20:18:05 +0000 (16:18 -0400)]
Bug 5766 - Add configuration for excluding articles from DataTables sorting
Client-side table sorting should exclude articles like "a," "an," and
"the" when sorting by title. This patch adds a custom sorting plugin for
use by DataTables and a configuration line to the DataTables string
configuration file which can be translated for any language.
As an example, this patch modifies the patron checkout history template
to use the new sort on the title column.
To test, apply the patch and clear your browser cache to ensure the
revised JavaScript file is loaded. Sort the table by title. Titles
should be sorted regardless of the presences of "a," "an", or "the" at
the beginning of the title.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and is a good improvement.
I have added German articles to the list for testing purposes
and it worked nicely.
David Cook [Wed, 12 Jun 2013 01:24:09 +0000 (11:24 +1000)]
Bug 10448: can now change framework after duplicating bib record
Changing the framework in the MARC editor immediately after duplicating
a bib record no longer clears the fields.
This patch changes the Changefwk Javascript function so that it passes
the "op" value and the "biblionumberdata" (as the biblionumber) from
addbiblio.pl back to itself, when submitting the form in order to
change the framework.
The reason we need to do this is because the form in addbiblio.tt
is hard-coded to always submit an "op" value of "addbiblio". Currently,
we need to have it hard-coded to "addbiblio", because all the magic
happens in addbiblio.pl when there is an "op" of "addbiblio". If we
always passed the "actual" "op" value, such as "duplicate", nothing
would ever happen when we clicked "save". It seems to me that this
is a flaw in the design of addbiblio.pl.
If we pass the "op" and "biblionumber" when changing frameworks, we're
able to tell addbiblio.pl that we're still wanting to "duplicate" this
"X" biblionumber. However, by having the form still hard-coded to
"addbiblio", when we hit save, the form will do the magic, check if
it's a duplicate, and save the record (or prompt for action if it
is a duplicate).
--
I also noticed that if you make changes to a record, then change
the framework before saving, your changes get cleared (since the
original record from the database is loaded when the page reloads).
It seems to me that this is a bug. Changing the framework should
change the layout while preserving the content. I think most users
would assume that when changing the framework.
This patch also introduces another hidden input into addbiblio.tt and
the Changefwk Javascript called "changed_framework". Basically, if
the Changefwk Javascript is run, it tells addbiblio.pl that the
framework is changed, and it uses the posted data from the form
(which we have been modifying) instead of reloading the record from
the database.
--
Test Plan:
A) Before Applying Patch:
To Show That Changing the Framework Erases All Fields When
Duplicating a Record:
1) Go to any bib record
2) Go to Edit > Edit as new (duplicate). You should see filled
in fields.
3) Change the framework to any other framework than the one
that is currently specified.
4) Note that every single field is now blank
To Show That Changing the Record then Changing the Framework
Ignores Changes, When Editing a Record
5) Go to any bib record
6) Go to Edit.
7) Change the title of the record to "I've changed the title".
8) Change the framework to any other framework than the one that is currently specified.
9) Look at the title. You'll notice it is the original title, and NOT "I've changed the title".
B) Apply the Patch
Also, clear your memcache and shift+refresh your screen. You don't want to use cached templates/javascript.
C) After Applying the Patch
Repeat Steps 1-3 and 5-8.
You should now notice that changing the framework when duplicating the item does not clear all the fields.
You should also notice that any changes you make prior to changing the framework will still exist after changing it.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Katrin Fischer [Mon, 1 Jul 2013 21:44:39 +0000 (23:44 +0200)]
Bug 4907: make 'Organize by' filter in suggestions reflect selected option
When using the 'Organize by' option to change the display of the
suggestions, the option is applied, but the pull down always jumps
back to the first entry 'Status'.
This patch fixes that.
To test:
- Try out all settings and verify that after the page reloads the selected
option is applied to your suggestions and the pull down shows
the option you selected.
Note: Until bug 10519 is properly fixed the tabs will not show
the correct descriptions, but the URL will show you the selected
option as parameter: displayby=acceptedby
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Owen Leonard [Fri, 28 Jun 2013 18:46:44 +0000 (14:46 -0400)]
Bug 10522: fix Javascript error on acquisition pages: YAHOO is not defined
acq.js includes an immediately invoked function expression, which means
that it runs whether or not it is called. Because this function tries to
reference the YAHOO object, it triggers an error on pages which don't
include the main YAHOO assets. Only the basketgroups page uses this
function and YAHOO assets.
It's probably possible to make this a regular function, but I propose
simply wrapping it in a check for the YAHOO object so that it only
executes on pages where YAHOO exists--the basketgroups page.
To test, apply the patch, clear your browser cache, and test on both the
basketgroups page and at least one page which also includes acq.js
(addorderiso2709.pl, neworderempty.pl, aqbudgets.pl, suggestion.pl,
etc.) and confirm that the browser reports no JavaScript errors.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 5858: Followup for INSERT IGNOREs in marc21_framework_DEFAULT.sql
Changes 8 INSERTs into INSERT IGNOREs.
This allows current installs to benefit easier from the new tags/subfields.
Note that running with --force will not achieve the same! The multi-value
inserts will still be aborted, though execution continues.
Test plan:
Run the file or do a new install.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Ran the file on a current install manually.
Bug 5858: update default MARC21 framework to April 2013 revision
Applies to new installs, although with the follow-up
patch, users can run the installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
script through the mysql client to add new tag and
subfield entries.
To test:
1) Delete MARC21 default framework
2) Apply patch
3) Test that new default framework loads without problem
Signed-off-by: Mason James <mtj@kohaaloha.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Run this file with and without this patch.
This patch adds 24 tags (338 vs 314) and 323 subfields (3951 vs 3628).
Verified that last QA comments were incorporated.
Bug 10289: (follow-up) don't set cardnumber for test patron
Since the patron barcode is nullable, and since the tests using
the test patron don't care what the barcode is, don't set it. This
avoids the tests failing if the test database happens to already
have a patron record with the hard-coded barcode that used
to be supplied.
Jonathan Druart [Mon, 20 May 2013 14:37:10 +0000 (16:37 +0200)]
Bug 10289: UT: Reserves.t needs to create its own data
Try before the patch:
prove t/db_dependent/Reserves.t
And after, it should produce:
t/db_dependent/Reserves.t .. 1/4 #
# Creating biblio instance for testing.
# Creating item instance for testing.
# Deleting item testing instance.
# Deleting biblio testing instance.
# Deleting borrower.
t/db_dependent/Reserves.t .. ok
All tests successful.
Files=1, Tests=4, 1 wallclock secs ( 0.02 usr 0.01 sys + 0.39 cusr 0.02 csys = 0.44 CPU)
Result: PASS
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 9519: fix code for Italian language search limiter
'ind' rather than 'ita' was set as the ISO639-2 language
code for Italian in the fr-FR, it-IT, pl-PL, ru-RU, and uk-UA
installation SQL.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I checked nb-NO and de-DE - language code there had already
been corrected.
Owen Leonard [Wed, 3 Jul 2013 18:34:31 +0000 (14:34 -0400)]
Bug 10125: Babeltheque star image must use sprite
When I removed images from the OPAC in favor of sprites I didn't take
into account the display of star ratings from Babeltheque. This patch
copies the star ratings display from Koha's own ratings display,
though it is not dependent on JavaScript.
I'm sure testing would be easy for someone with access to the
Babeltheque service, but I do not. I temporarily modified the template
to set some variables for testing purposes:
[% SET SEARCH_RESULT.score_int = 3 %]
[% SET SEARCH_RESULT.score_avg = 3 %
[% SET SEARCH_RESULT.num_scores = 87 %]
This enabled the display of the ratings, allowing me to confirm that
stars display correctly. Ratings should work with and without
OpacStarRatings enabled.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
I also fudged the template to test, so QA would need to be done with
someone with Babeltheque access
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10366: Alert librarian if an invoice number is duplicated
Some vendors ship materials from the same invoice in multiple packages.
In those cases, it would be good to notify the librarian when they enter
a duplicate invoice number, so that they can continue receiving on the
previously-created invoice, rather than creating an invoice with a
duplicate number.
To test:
1) Apply patch and run database update.
2) Make sure that you have created at least one invoice on
acqui/parcels.pl and take note of the invoice number.
3) Try to create an invoice with the same invoice number.
4) Note that without changing your configuration this works exactly
the same as before.
5) Turn on the AcqWarnOnDuplicateInvoice system preference.
6) Try to create a new invoice with the same number as the one you
noted earlier.
7) Make sure you get a warning about a duplicate invoice.
8) Choose to receive on the existing invoice.
9) Confirm that you are receiving on said existing invoice.
10) Start the receiving process over, and this time choose "Create new
invoice anyway."
11) Confirm that you are now receiving on a new invoice.
Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
I have followed the test plan, but also checked some more things:
- Checking the duplicate check works when you have the entered
invoice number in your database multiple times already.
- Checking that no duplicate message is shown if you enter the
invoice number and it's already been used for an invoice from
another vendor.
Looks all good. I think the only thing we could argue about here
is if this could be activated by default for new installations.
There is currently no way to delete unused invoices (for example,
invoices created by mistake), and there really should be, since errors
and absent-mindedness can result in numerous empty invoices over the
course of years.
To test:
1) Apply patch.
2) Create three invoices in the Acquisitions module. For one of them,
receive at least one item. For the other two, do not receive any
items.
3) View one of the invoices that does not have any items on it.
4) Try to delete it. This should succeed.
5) View the invoice that has an item. There should not be any option
to delete it.
6) Do an invoice search that brings up the other invoice with no items
on it. Try to delete it from the results page. This should succeed.
7) Run the unit test:
> prove t/Acquisition/Invoice.t
8) Sign off.
Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass. I also did another test:
I cancelled all receipts from an existing invoice and then could
successfully delete it in the last step.
Jonathan Druart [Thu, 23 May 2013 14:42:38 +0000 (16:42 +0200)]
Bug 10317: improve display when order receiving page is given an invalid invoiceid
This patch fixes some things on the order receiving/parcel page.
1/ Removes dead code
2/ Displays an error message if invoiceid is unset or does not refer to an
invoice
3/ Fixes a bug in the note ("change note" and "add note" links)
Test plan:
1/ Try to call the invoice page with an existing invoiceid and check
that order results are consistent.
2/ Try without invoiceid or a bad invoiceid and check that an error
message is displayed.
3/ Add and change notes.
Signed-off-by: Cedric Vita <cedric.vita@dracenie.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely for all tests done.
- parcel.pl with invalid invoicenumber gives a nice error message
- parcel.pl with a valid invoicenumber looks normal
- changing and editing order notes works well
Fridolyn SOMERS [Fri, 31 May 2013 08:17:08 +0000 (10:17 +0200)]
Bug 10384: fall back to normal authentication if LDAP server is not available
This fixes a bug where, assuming LDAP authentication is enabled, if a user
tries to log in while the LDAP server is down, the following fatal error
is displayed:
Can't call method "bind" on an undefined value at C4/Auth_with_ldap.pm line 134, <DATA> line 558.
This patch catches this error to allow normal authentication when LDAP connexion fails.
Test plan :
- Configure LDAP connexion with a host not having LDAP. ie :
<useldapserver>1</useldapserver>
<ldapserver id="ldapserver">
<hostname>localhost</hostname>
<base>dc=test,dc=com</base>
<user>cn=Manager,dc=test,dc=com</user>
<pass>passwd</pass>
<replicate>0</replicate>
<update>0</update>
<auth_by_bind>0</auth_by_bind>
<mapping>
<firstname is="givenname" ></firstname>
<surname is="sn" ></surname>
<branchcode is="branch" >MAIN</branchcode>
<userid is="uid" ></userid>
<password is="userpassword" ></password>
<email is="mail" ></email>
<categorycode is="employeetype" >PT</categorycode>
</mapping>
</ldapserver>
- Try to connect with mysql user (defined in koha-conf.xml)
- Try to connect with a user defined in borrowers
You may try to connect with working LDAP connexion
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Kyle M Hall [Wed, 17 Apr 2013 13:33:55 +0000 (09:33 -0400)]
Bug 9533: batch item modification form now shows default field values only by request
This patch makes the pre-population of the fields for the batch
item editor with the default values from the default framework
optional and off by default.
Test Plan:
1) Apply patch
2) Add default values for cost and replacement cost to the
default framework.
3) Browse to Tools / Batch item modification
4) Choose a file, or entire some barcodes in the text area
5) Ensure that the 'Populate fields with default values from default
framework' is *not* checked
6) Click 'Continue'
7) Observe that the fields for cost and replacement cost are blank
8) Click the 'back' button on your browser
9) Check the checkbox to enable the default value
10) Click 'Continue'
11) Observe that the fields for cost and replacement cost now contain
the default values you assigned them in the default MARC framework
Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Switch works correctly, all tests and QA script pass.
Note: there is a bug with default values for all non text input
fields. Default values won't be applied for those fields as the
pull downs are not preselected correctly with the default values
defined in the framework.
Fridolyn SOMERS [Wed, 26 Jun 2013 15:52:40 +0000 (17:52 +0200)]
Bug 9113: fix handling of certain characters by item batch modification tool
If you're using the batch modification tool and entering a call number
like "E+ 123 ABC", the tool removes the + and puts a space in its place,
e.g., "E 123 ABC"
This is because the form is posted via Ajax by background-job-progressbar.js.
Values are URI-encoded using escape(), but this method does not escape some
characters: * @ - _ + . /
Also, "+" is considered as a space in a URI.
This patch replaces escape() by encodeURIComponent() which encodes every character.
Test plan :
Perform an items batch modification by setting '* @ - _ + . /' in a field
(notes for example) and see that all characters are saved correctly.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Marc Veron [Fri, 14 Jun 2013 14:37:23 +0000 (16:37 +0200)]
Bug 5894: Display all titles when confirming copy of items from cart to list
Adds missing code that splits biblios before calling template.
To test:
- Add some items to cart
- Open cart, select some or all items
- Add to list; with patch, following window shold show something
like "Add 3 items to a list:", followed by list of items
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised.
Katrin Fischer [Sun, 16 Jun 2013 07:09:33 +0000 (09:09 +0200)]
Bug 10474: Translate some English strings in German sample notices
This translates 2 strings missed doing the initial translation in
ISSUESLIP.
To test:
- Run the web installer in German.
Altnernatively:
- Truncate your letters table and run the SQL against the database.
Check that the notices were added correctly, especially ISSUESLIP.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
There were 5 redundant mappings left in the file. They are removed.
Its almost a QA followup as everything went fine anyway.
Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>