Galen Charlton [Mon, 19 Aug 2013 18:22:00 +0000 (18:22 +0000)]
Bug 10766: unbreak reservoir search when UseQueryParser is OFF
To test:
[1] Turn UseQueryParser off.
[2] Ensure that your database has records in the reservoir. Performing
a Z39.50 search will do this.
[3] Perform a broad cataloging (i.e., cataloguing/addbooks.pl search).
Note that results are returned from the main catalog but that no
reservoir results are returned.
[4] Apply the patch.
[5] Perform the search again. This time, there should be both catalog
and reservoir results.
[7] Enable QueryParser. Perform the search again, and verify that the
catalog and reservoir results are the same.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch works nicely, passes all tests, and the QA script.
Fridolyn SOMERS [Fri, 16 Aug 2013 11:53:04 +0000 (13:53 +0200)]
Bug 10741: reformat test for displaying place hold link in OPAC search results
To test:
[1] Turn on the syspref for enabling OPAC holds.
[2] Create an item and bring it up on the OPAC search
results. Run through the following possibilities,
by changing the item, and verify that the place hold
link in OPAC search results appears only when the item is
- not lost AND
- not withdrawn AND
- not damaged (or is damged and AllowHoldsOnDamagedItems is ON) AND
- the item is not marked not-for-loan OR
the item has a negative notforloan value (e.g., it is on order)
Note that it is necessary to reindex the test bib after making
each change to the test item.
[3] Also verify that whether or not in the item is in transit does
NOT affect whether the place hold link appears.
[4] Verify that there is no regression on bug 8975 (i.e., if an
item is on order, that status should be displayed in staff client
search results).
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Fridolyn SOMERS [Fri, 16 Aug 2013 11:36:10 +0000 (13:36 +0200)]
Bug 10741: restore holdability of in-transit items on OPAC search results
In search results, one could not place a hold on an item in transit
and for loan (items.notforloan=0). This appears when AllowOnShelfHolds
is allowed.
This patch repairs a regression introduced by the patch for bug 8975.
Test plan :
- Set AllowOnShelfHolds to on
- Create a record with a normal item : not lost, not withdrawn, not
damaged, notforloan=0
- Index this record
- Perform a search on OPAC that returns this record (and others)
=> You see in actions "Place hold"
- Add this item in transit : /cgi-bin/koha/circ/branchtransfers.pl
- Re-perform the search on OPAC
=> You see in actions "Place hold" and item "in transit"
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Nicole C. Engard [Fri, 16 Aug 2013 02:08:41 +0000 (22:08 -0400)]
Bug 10743: Add styles to 'my privacy' page in OPAC
This patch does a couple things. Most importantly it adds
a new div around the privacy rules summary so that it can
be easily changed. It also moves the start of the form to
right above the form's select box so that it's not in the
new privacy rules div.
To test:
* Apply patch
* Enable the use of privacy via the sys prefs
* Log in to the OPAC
* Visit the 'my privacy' tab
* Make sure it looks okay
* Submit the form and make sure it works
* Repeat in the other theme
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Edit: Replaced a few tabs with spaces to keep the QA script happy. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, privacy options can still be edited.
Jonathan Druart [Wed, 21 Aug 2013 09:01:37 +0000 (11:01 +0200)]
Bug 10761: (follow-up) change return in C4::Reports::Guided::delete_report()
1/ delete_report should return undef is no parameter is given.
2/ delete_report returns the number of affected rows.
3/ delete_report should be tested with 1 and more parameters.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Wed, 21 Aug 2013 08:23:11 +0000 (10:23 +0200)]
Bug 3134: highlight all selected reports when confirming deletion of multiple reports
This patch adds the same behavior when deleting 1 or more reports.
When checkboxes are checked and the "delete selected" button is pressed,
checked lines are hightlighted in red.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Owen Leonard [Mon, 19 Aug 2013 14:16:21 +0000 (10:16 -0400)]
Bug 3134: [Follow-up] Ability to select multiple reports to delete at once
This follow-up moves the checkboxes into a separate column from the
report ID in order to prevent visual inconsistencies.
To test, repeat the test plan from the original patch:
You must have two or more saved reports to delete. Deletion
should work properly when:
- Selecting one report for deletion by checking the box.
- Selecting more than one report for deletion by checking boxes.
- Clicking the old "Delete" link
Clicking the delete button should prompt you to confirm. Clicking cancel
should cancel.
Clicking the delete button when no boxes are checked should trigger an
alert asking you to select reports for deletion.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This works really nicely, passes all tests and the QA script.
There is one little thing to note: If you delete a single report
using the option from the menu, the line you want to delete
is highlighted in red. It would be nice to do that also for
deleting multiple reports.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Owen Leonard [Wed, 3 Jul 2013 14:05:55 +0000 (10:05 -0400)]
Bug 3134: add ability to selelct multiple reports to delete at once
This patch adds the option to select multiple saved reports for
deletion.
To test you must have two or more saved reports to delete. Deletion
should work properly when:
- Selecting one report for deletion by checking the box.
- Selecting more than one report for deletion by checking boxes.
- Clicking the old "Delete" link
Clicking the delete button should prompt you to confirm. Clicking cancel
should cancel.
Clicking the delete button when no boxes are checked should trigger an
alert asking you to select reports for deletion.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Functional tests pass, template tests pass.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Kyle M Hall [Tue, 23 Jul 2013 12:05:22 +0000 (08:05 -0400)]
Bug 10628: make sure AutomaticItemReturn doesn't prevent holds queue from filling local holds with local items
For some reason, C4::HoldsQueue::MapItemsToHoldRequests used the system
preference AutomaticItemReturn to decide if an attempt to fill local
holds with local items. No explanation of this behavior is provided.
This patch removes this behavior, and also adjusts the calculation
of the lead-cost library to always return the pickup library if it
is on the list of libraries that could fill the hold -- on the
basis that if the item is already at the pickup library, its
transport cost is inherently zero.
Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and adds unit tests.
Tested with some examples and those worked correctly.
Owen Leonard [Mon, 19 Aug 2013 14:55:52 +0000 (10:55 -0400)]
Bug 8670 - Update POD of C4::Branch::GetBranches() to use TT syntax
This patch updates the example template syntax in the POD for
C4::Branch::GetBranches() to use Template Toolkit syntax.
To test, view the POD for C4::Branch::GetBranches() and confirm that it
looks correct.
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Checked the POD with "perldoc C4/Branch.pm" before and after applying
the patch. The example now uses TT syntax, and looks sensible.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Owen Leonard [Mon, 19 Aug 2013 15:16:51 +0000 (11:16 -0400)]
Bug 10763 - [SIGNED-OFF] Update POD of C4::Creators::Lib::html_table() to use TT syntax
This patch updates the example template syntax in the POD for
C4::Creators::Lib::html_table() to use Template Toolkit syntax.
To test, view the POD for C4::Creators::Lib::html_table() and confirm
that it looks correct.
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Checked the POD with "perldoc C4/Creators/Lib.pm" before and after applying
the patch. The example now uses TT syntax, and looks sensible.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Owen Leonard [Mon, 19 Aug 2013 15:37:55 +0000 (11:37 -0400)]
Bug 10764 - Update POD of C4::Items::GetItemStatus() to use TT syntax
This patch updates the example template syntax in the POD for
C4::Items::GetItemStatus() to use Template Toolkit syntax.
To test, view the POD for C4::Items::GetItemStatus() and confirm that it
looks correct.
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
This patch works as advertised (verified with "perldoc C4::Items"),
for GetItemStatus, but it does not fix a a similar example for
GetItemLocation in the same file, which still has the old template
syntax. So a followup or separate bug for that is called for.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
It seems the default option is not in used in templates.
Owen Leonard [Mon, 19 Aug 2013 16:06:31 +0000 (12:06 -0400)]
Bug 10765 - [SIGNED-OFF] Update POD of C4::Koha::GetSupportList() to use TT syntax
This patch updates the example template syntax in the POD for
C4::Koha::GetSupportList() to use Template Toolkit syntax.
To test, view the POD for C4::Koha::GetSupportList() and confirm that
it looks correct.
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
This patch works as advertised (verified with "perldoc C4::Koha"),
for GetSupportList, but it does not fix a a similar example for
GetItemTypes, getauthtypes and getframework in the same file,
which still has the old template syntax. So a followup or separate
bug(s) for those are called for.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
It seems the default option is not in used in templates.
Owen Leonard [Tue, 13 Aug 2013 16:27:28 +0000 (12:27 -0400)]
Bug 10081: add library name to IndependentBranches error message
With IndependentBranches turned on, if you try to check out an item
which belongs to another library you will get an error message which is
missing the library name. This patch corrects the problem by passing the
necessary variable to the template and outputting the library name using
the KohaBranchName TT plugin.
To test, turn on IndependentBranches and try to check out an item
belonging to another library (note that you must test with a staff user
who is not a superlibrarian). The error message you see should include
the name of the library to which the item belongs:
"This item belongs to Nelsonville and cannot be checked out from this
location."
Checkouts of items belonging to the library should be unaffected.
Owen Leonard [Thu, 8 Aug 2013 19:37:35 +0000 (15:37 -0400)]
Bug 10701: fix display of transit status on the bibliographic detail page
The patch for Bug 10083 incorrectly changed some template variable names
so that in-transit details could not be shown on the biblio detail page.
This patch corrects the error.
To test, perform any action that will trigger an transfer between
libraries (for instance, check in an item from Library A at Library B).
View the detail page for that title and look for the transfer details in
the status column of the holdings table. It should show correct
information:
"In transit from Athens to Nelsonville since 08/08/2013"
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described, no errors.
Before patch incorrect information: "In transit from to since"
after patch correct information.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works perfectly and passes all tests.
Galen Charlton [Mon, 19 Aug 2013 14:55:12 +0000 (14:55 +0000)]
bug 9916: (follow-up) restore default sort order on OPAC tags list
(As a side-note, I actually prefer descending date as the default
sort order, but better to do that explicitly rather than have the
patch series for bug 9916 change visible default sorts.)
To test:
[1] Log into the OPAC, then go to the list of OPAC tags.
[2] Verify that the default sort order is ascending date
added.
Galen Charlton [Mon, 19 Aug 2013 14:52:06 +0000 (14:52 +0000)]
bug 9916: (follow-up) restore default sort order for self-check loan list
To test:
[1] Log into web-based selfcheck.
[2] Enter the barcode of a patron that has at least two loans.
[3] Verify that the loan list sorts them in order of descending
due date by default, with a secondary sort order of ascending
title.
Galen Charlton [Mon, 19 Aug 2013 14:39:24 +0000 (14:39 +0000)]
Bug 9916: (follow-up) restore default sort order for OPAC "most popular" page
Set the primary default sort order to descending number of checkouts,
matching the situation prior to the introduction of DataTables. This
patch also sets the default secondary sort to ascending title.
To test:
[1] Ensure that OpacTopissue is ON.
[2] Go to the OPAC "most popular" page.
[3] Verify that the items are sorted in order of descending
checkout count. If two items have the same number of
checkouts, verify that they are sorted in ascending
title order.
Owen Leonard [Fri, 22 Mar 2013 20:11:09 +0000 (16:11 -0400)]
Bug 9916 - Use DataTables in the OPAC
The OPAC still uses the old tablesorter plugin which isn't being
actively maintained. We use DataTables in the staff client and should in
the OPAC too. The plugin was added a while ago but never implemented on
any pages. This patch upgrades the plugin to the latest version and
places it in opac-tmpl/lib for cross-theme access. The patch implements
DataTables on all pages which previously used the tablesorter plugin.
The old tablesorter plugin is removed.
The customized DataTable configuration script, datatables.js, has been
trimmed-down from the staff client version in order to limit it to only
that functionality required in the OPAC.
Sorting based on date is done based on the data's enclosing <span> title
attribute as it is in the staff client:
<span title=" [% iso date %]">[% date | $KohaDates %]</span>
Slight modifications to Serials.pm and opac-search-history.pl have been
made to accommodate this change.
To test, view each page in the OPAC which uses JS-based table sorting:
- The bibliographic detail page
- The cart
- The search history page
- The suggestions page
- The tags page (logged in as a user who has entered tags)
- The "most popular" page (opac-topissues.pl)
- The logged in user summary page (opac-user.pl)
- The subscription "full history" page (opac-serial-issues.pl?selectview=full)
- The self-checkout main page (with existing checkouts)
Table sorting should work correctly on all pages in both the prog and
ccsr themes. Sorting should work for dates whatever your dateformat
system preference setting. Tables listing titles should exclude articles
("a," "an," and "the" in English) when sorting.
Also test the serial collection page in the staff client, which is
affected by the change to Serials.pm. Confirm that dates are displayed
and sorted correctly.
Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised!
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works really nicely on all pages.
Jonathan Field [Fri, 9 Aug 2013 10:38:31 +0000 (11:38 +0100)]
Bug 10704: make OPAC highlighting work across previous/next travel
To test
Enable 'OpacHighlightedWords'
1) Run a search with multiple results
2) Click on a title of one of the results to get the full record
display. Hit highlighting SHOULD work on this page.
3) Use either the "Next" or "Previous" buttons on this page
(opac-detail) to move to the next or previous record.
4) Moving forward or back, the highlighting should still be working on
the page.
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>
Galen Charlton [Wed, 14 Aug 2013 14:53:25 +0000 (14:53 +0000)]
bug 10728: fix additional log noise generated by subscription-renew.pl
To test:
[1] Use the renew link to bring up the subscription renewal form.
[2] Verify that a warning message containing the text
'Problem = a value of 1 has been passed to param without key'
was not added to the Apache error log.
Colin Campbell [Wed, 14 Aug 2013 14:26:34 +0000 (15:26 +0100)]
Bug 10728: fix log noise generated by subscription-renew.pl
Error log is showing warnings because mode is undefined
and we are doing string comparisons on it.
Set it to a default value (we were already assigning it a variable
which we were not using) and use the the result in the comparison
To test, after applying the patch:
[1] Use the renew link from the subscription detail page to renew
a subscription.
[2] Verifying that doing this did not add a warning containing
'subscription-renew.pl: Use of uninitialized value $mode in string eq '
to the Apache error log.
Bug 10573: French translation for printing a basketgroup
If you want to print a basketgroup with pdf format, it will be in
English. The pdf is done with layout2pages.pm or layout3pages.pm,
which call layout2pages.pdf or layout3pages.pdf.
This patch adds layout3pagesfr.pm in src/acqui/pdfformat/ which
calls layout3pagesfr.pdf.
And adds in basketgroup.pl the check for layout3pagesfr
To use it you have to change the systempreferences to pdfformat::layout3pagesfr
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described, koha-qa reports some tab errors.
Corrected in a followup.
Please, always add a test plan, it's easier to test.
Test:
1) apply the patch
2) change syspref OrderPdfFormat to pdfformat::layout3pagesfr
3) select a vendor
4) create a basket group (empty works)
5) close basket group
6) print basket group
7) PDF is in french
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This works nicely, although it would be better if we could
find a more general solution to make the templates editable
and translatable.
Jonathan Druart [Mon, 12 Aug 2013 14:10:03 +0000 (16:10 +0200)]
Bug 10610: sort sysprefs.sql by syspref names
By sorting the sql syspref file, the frequency of merge conflicts
when dealing with it should be reduced.
Test plan:
- create a new DB with a new table named systempreferences (with the
same structure as the one you know).
- insert the current sysprefs.sql file into this table.
- note the number of rows in the systempreferences table.
- Create a dump of the system preferences, e.g.,
mysql> \T sysprefs-1
mysql> SELECT * FROM systempreferences ORDER BY variable;
mysql> exit
- apply this patch.
- delete all rows of the systempreferences table.
- insert the new sysprefs.sql file.
- verify the number of rows is the same as the previous.
- Create a new dump of the system preferences, e.g.,
mysql> \T sysprefs-2
mysql> SELECT * FROM systempreferences ORDER BY variable;
mysql> exit
- Verify that the two dumps (sysprefs-1 and sysprefs-2) are
identical.
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>
Bug 10736: show duplicate invoice warning on second invoice
If you have AcqWarnOnDuplicateInvoice set to warn it only warns if you have 2
or more invoices with the same number. It should warn if you're trying to
create a duplicate.
To test:
1) Turn on AcqWarnOnDuplicateInvoice.
2) Try to create an invoice that duplicates an invoice number you are already
using exactly once.
3) Note that you get a warning after applying this patch.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
all tests pass
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Thu, 11 Apr 2013 10:00:45 +0000 (12:00 +0200)]
Bug 10028: fix how ModReceiveOrder() calls NewOrder()
In C4::Acquisition::ModReceiveOrder, a call to NewOrder is badly used.
NewOrder returns ($basketno, $ordernumber) but in ModReceiveOrder the
ordernumber is got with
my $ordernumber = NewOrder( $args );
It works because:
sub t{
return ("a", "b");
}
my $a = t();
say $a;
Will display 'b'.
But it is not really clear.
Test plan:
Check that there is no regression for partial receives.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10686: Remove fields from searches for highlighting
If you do a fielded search like au:smith, "Smith" will not get
highlighted on the results page because the Javascript is looking for
the exact string "au:smith."
To test:
1) Turn on OpacHighlightedWords.
2) Do a simple keyword search.
3) Confirm that the word is highlighted on the results and details page.
4) Do a fielded search by entering au:smith (or whatever).
5) Confirm that the word is highlighted on the results and details page.
6) Sign off.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised.
Bug 10642: fix inappropriate uses of $sth->finish() in C4::RotatingCollections.pm
From the man page
finish()
Indicate that no more data will be fetched from this statement handle
before it is either executed again or destroyed.
You almost certainly do not need to call this method.
Adding calls to "finish" after loop that fetches all rows is a common
mistake, don't do it, it can mask genuine problems like uncaught fetch errors.
To test:
Verify that prove -v t/db_dependent/RotatingCollections.t passes
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, passes UT provided by bug 10653
Marc Veron [Sun, 7 Oct 2012 17:54:44 +0000 (19:54 +0200)]
Bug 8887: only display desired result when doing exact syspref search
This patch fixes an issue where entering the complete name of a system
preference when doing a syspref search in the staff interface resulted
in the display of *all* preferences belonging to the desired one's
module.
Since providing a more specific search string should result in getting
back more specific results, the previous behavior was not intuitive.
Test scenario:
a) In sysprefs, do a search with partial match (e.g. intranetcolor)
-> Result shows one entry: intranetcolorstylesheet
b) Do an exact search. e.g. intranetcolorstylesheet
-> Result shows all Staff Client preferences
Apply patch, test again. Now b) behaves like a).
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised.
Owen Leonard [Tue, 13 Aug 2013 14:05:58 +0000 (10:05 -0400)]
Bug 9238 - make fund pull down say 'select fund', not 'select budget'
When adding a new order to a basket the fund selection field is labeled
"Fund:" but the default option is "Select a budget." This patch changes
this string to "Select a fund" and also corrects the associated
JavaScript error message text displayed when one doesn't choose a fund.
To test, add an order to basket. The "New order" form should show
"Select a fund" as the default option for "Fund" in the "Accounting
details" section. If you submit the form without selecting a fund the
error message should read "You must select a fund."
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
tests pass
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
String updates only, passes koha-qa.pl
Bug 10653: add unit tests for C4::RotatingCollections.pm
The tests are wrap in a database transaction.
Test plan:
prove t/db_dependent/RotatingCollections.t
t/db_dependent/RotatingCollections.t .. ok
All tests successful.
Files=1, Tests=41, 20 wallclock secs ( 0.02 usr 0.01 sys + 0.41 cusr 0.02 csys = 0.46 CPU)
Result: PASS
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Galen Charlton [Fri, 16 Aug 2013 15:36:10 +0000 (15:36 +0000)]
bug 5825: (follow-up) consult item-level_itypes
This patch teaches GetHoldsQueueItems to consult
the item-level_itypes system preference and return
the item-level or bib-level item type accordingly.
To test:
- Arrange so that an item that shows up on the holds queue
report has one item type while its bib has a different one.
- Run the report with item-level_itypes ON. Verify that
the item-level item type is displayed.
- Change item-level_itypes to OFF. Run the report again and
verify that the bib-level item type is displayed.
Owen Leonard [Thu, 8 Aug 2013 20:06:14 +0000 (16:06 -0400)]
Bug 5825 - Add Item Type column to Holds Queue report
The hold queue report shows collection code but not item type. This
patch adds it. Also added is use of the KohaAuthorisedValues template
plugin to display the collection code description instead of code.
To test, apply the patch and view the holds queue. There should be a new
item type column showing an item type description for each row. The
collection column should now show the collection description instead of
code.
Signed-off-by: Melia Meggs <melia@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Jonathan Druart [Mon, 17 Jun 2013 12:56:22 +0000 (14:56 +0200)]
Bug 10481: FIX No enrollment fee when changing patron category.
When a patron changes to a category with enrollment fee, they
are not generated.
Test plan:
- Choose a category without fee (e.g. Kid)
- Add an enrollment fee for another category (e.g. Young adult)
- Choose a kid and change his category to "Young adult".
- Note the warning message "Fees & Charges: Patron has Outstanding fees
& charges of XX" on the check out page.
This patch also moves all instances of adding the enrollment fee
to a new routine in C4::Members, AddEnrolmentFeeIfNeeded(), so
additional tests include:
- Register a new patron and give it a category that has
an enrollment fee. Verify that the fee is charged.
- Renew the patron. Verify that the additional fee is charged.
- Register a new patron with a child patron category.
- Use the 'update child to adult' menu option to change the
patron's category to one that is fee-bearing. Verify that the
enrollment fee was charged.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Tue, 13 Aug 2013 10:25:35 +0000 (12:25 +0200)]
Bug 10716: fix JavaScript error on basket groups page
To test:
Go on acqui/basketgroup.tt and verify a js error occurred
(ReferenceError: CONFIG_EXCLUDE_ARTICLES_FROM_SORT is not defined).
Apply the patch and verify the error does not appear anymore.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Kyle M Hall [Fri, 16 Aug 2013 11:21:10 +0000 (07:21 -0400)]
Bug 10664 [QA Followup] - fix error in overdue_notices.pl if there is no active currency
Fixes the following koha-qa.pl error:
FAIL misc/cronjobs/overdue_notices.pl
OK pod
OK forbidden patterns
OK valid
FAIL critic
# Variables::ProhibitConditionalDeclarations:
Sophie Meynieux [Wed, 31 Jul 2013 06:04:25 +0000 (08:04 +0200)]
Bug 10664: fix error in overdue_notices.pl if there is no active currency
If there is no active currency, when running overdue_notices.pl
you get a sofware error "Can't use an undefined value as a HASH
reference" on GetCurrency() function call.
With this patch, if there is no active currency, fines are formated
by default 0.00 and notices are correctly generated.
Test plan :
- have at least one borrower with overdue that should trigger a notice
- verify that there is no active currency (Adminitration > Currency &
Exchange rates)
- run misc/cronjobs/overdue_notices.pl -v -n (to get the notice directly
on output)
=> without the patch you get the software error
=> with the patch, notices are correctly generated
If an active currency is defined, the script overdue_notices.pl runs
the same with or without patch
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 [Fri, 19 Jul 2013 15:23:52 +0000 (11:23 -0400)]
Bug 10615 - Move saved reports action items into dropdown menu
This patch moves saved reports "action" links (view, edit, run, etc)
into a dropdown menu triggered by clicking an "Actions" button.
To test you must have saved reports. View the saved reports page and
click the "Actions" button in the last column of the table. This should
trigger a menu. All options in the menu should work correctly.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
works and looks awesome
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Yes, exactly what I had in mind. Great improvement.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch changes the MARC21 007 plugin editor so that it uses
1 character instead of 4 characters for position 01.
TEST PLAN:
1) Create new record/edit an existing record
2) Using the tag editor for the 007 field, choose "Videorecording"
3) Click OK
4) Change the second character in the 007 from "c" to "d"
5) Open the tag editor again
6) Note that position 01 will still say "c - Videocartridge" rather
than "d - Videodisc".
7) Exit tag editor
8) Apply patch
9) Reload the page (Shift + Refresh is always useful)
10) Open the tag editor again
11) Note that position 01 will now say "d - Videodisc"
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10663: restore ability of active hold requests to block renewal
Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This reverts changes made to CanBookBeRenewed by
patches from bug 9367.
GetReserveStatus is not suitable to recognize if an item
can fild a hold on return and CheckReserves is restored.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
This patch includes a squash of a follow-up authored by
Katrin Fischer <Katrin.Fischer.83@web.de>:
CheckReserves returns '' when no reserve is found,
so $resfound will always be defined and we need to
check if it's true.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Initial work on unit tests for CanBookBeRenewed. More scenarios are needed.
Also made Circulation.t use autocommit=0.
Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Kyle M Hall [Thu, 24 Jan 2013 19:20:38 +0000 (14:20 -0500)]
Bug 9487: Allow item fields to be used in the HOLDPLACED notice
Test Plan:
1) Enable the syspref emailLibrarianWhenHoldIsPlaced
2) Modify the HOLDPLACED notice, add some item level fields
3) Place an item level hold
4) Check the email you receive ( or just look at it from the db )
You should see the item level fields are new populated
5) Place a title level hold
6) Check the email you receive - item fields are not populated,
but notice still looks ok.
This is an amended patch which includes the changes to CCSR which I
forgot to commit before. The patch does not add a unique ID for
opacheader to CCSR, since opacheader is positioned wrong.
This is most useful for previewing changes you make in the OPAC
preferences using the following javascript in your IntranetUserJS:
Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Note: The provided JavaScript didn't work for me and resulted in an
error in Firebug. Ater talking to Jared it seems like there is more needed
than the bit of Javascript so make this work, but it might be a good
starting point, so I am leaving it in the commit message.
Srikanth Dhondi [Mon, 29 Oct 2012 22:17:52 +0000 (11:17 +1300)]
Bug 8712: add 'and' label for inputs in OPAC "fewer options" advanced search page
The "and" label not only improves the accessibility but also gives the
user an idea that the operation between multiple search fields is a
boolean "AND" by default.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Actually only adds a label and an id to the select.
Note that the boxes do not exactly align anymore now (with fewer options).
Fridolyn SOMERS [Mon, 17 Jun 2013 15:01:33 +0000 (17:01 +0200)]
Bug 10483: fix item uniqueness check on order form
When syspref "UniqueItemFields" is defined, the item uniqueness is
tested in acquisition by an AJAX call to check_uniqueness.pl. This
patch fixes an issue where check_uniqueness.pl wasn't looking
at the correct CGI parameters.
Test plan :
- Select an existing item with barcode
- Add "barcode" to "UniqueItemFields" syspref (use space as separator
for multiple values)
- Set "AcqCreateItem" syspref to "Create an item when placing an order"
- Go to an acquisition basket
- Create a new order from empty
- Enter existing barcode in item form and save
=> You get an alert that barcode already exists and order is not saved
- Enter a non-existing barcode in item form and save
=> Order and item are created
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>
Janusz Kaczmarek [Mon, 22 Apr 2013 17:28:08 +0000 (20:28 +0300)]
Bug 5262: make authority plugin copy indicators to bib record
With this patch Koha should correctly copy indicators
(and create $2 subfield in MARC 21 if need) from the chosen authority
record to the edited bibliographic record (according to discussion in
bugzilla). UNIMARC and MARC 21 flavors are covered.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: work as described, testing in comments 9 and 12.
No errors.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests. Tested functionality repeating
some of the tests noted by Bernardo - checking mostly 1xx, 490,
and 7xx.
Galen Charlton [Tue, 13 Aug 2013 16:15:30 +0000 (16:15 +0000)]
Bug 7785: (follow-up) standardize POD
This makes the POD for the columns() function consistent
with the rest of C4/Members.pm. It also removes a note
that can be relegated to the bug report and the Git
history.
Also, since C4::Members::columns() is not actually a
class method, this patch changes the invocation to
not call it that way.
Mark Tompsett [Sun, 30 Jun 2013 00:46:51 +0000 (20:46 -0400)]
Bug 7785: remove MySQL-specific syntax from C4::Members::columns()
The initial thought was to remove this function. However,
tools/import_borrowers.pl uses it. So rather than remove
it to solve the problem, it was reworked to a more generic
solution which runs faster.
By accessing $sth->{NAME} directly, the driver becomes
responsible for filling it correctly. This happens when a SELECT
is done on the borrowers table. It does not even have to have
data in the result set!
The columns method could be more generic and used elsewhere too.
Comparison between the old method and the STH method showed a
significant time difference. The old method took 35 seconds
for 40k iterations versus 19 seconds for the same amount of
iterations with the STH method regardless of the size of the
borrowers table.
Bug 8507: koha-create now supports using DOM indexing for bibs
This patch makes the koha-create script install the file zebra-biblios-dom.cfg
with the proper string substitutions inside on the new instance koha-conf.xml file.
It also adds two option switches that control the indexing mode for the instance:
--biblio-idx {dom|grs1}
--auth-idx {dom|grs1}
DOM indexing is set as the default for both authorities and bibliographic records.
Following drojf (thanks!) advice I arranged stuff like explained here:
To test:
- Apply the patch
- Build your own packages and install them on a test server
a) Create a new instance without using the new switches like:
$ koha-create --create-db domtest
- Check there's a file /etc/koha/sites/domtest/zebra-biblios-dom.cfg
- Check that /etc/koha/sites/domtest/koha-conf.xml points to:
* zebra-biblios-dom.cfg (biblioserver section)
* zebra-biblios-dom.cfg (publicserver section)
* zebra-authorities-dom.cfg (authorityserver section)
- Success means the new default is DOM
b) Play with the 4 possible combination of option switches
$ koha-create --create-db --auth-idx grs1 --biblio-idx grs1 domtest
$ koha-create --create-db --auth-idx grs1 --biblio-idx dom domtest
$ koha-create --create-db --auth-idx dom --biblio-idx grs1 domtest
$ koha-create --create-db --auth-idx dom --biblio-idx dom domtest
- Check the koha-conf.xml file reflects the chosen options.
c) Run
$ koha-create --help
- It should advertise this addition accordingly.
d) Run
$ man koha-create
- Man page for koha-create should provide good information on the new switches behaviour
Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Owen Leonard [Mon, 12 Aug 2013 12:36:09 +0000 (08:36 -0400)]
Bug 10614 - have add order form at top and bottom
If a basket has a lot of items it may be inconvenient to scroll to the
bottom of the patch to reach the "add to basket" form. This patch adds
as "Add to basket" button to the toolbar which uses JavaScript to copy
the form into a modal dialog for quick access.
To test, apply the patch and view an open basket. You should be able to
click the "Add to basket" button to trigger a modal dialog with the full
"Add to basket" list of options. All options in the list should function
normally.
If you view a closed basket the new button should not appear.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
All tests pass and I love it :)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Colin Campbell [Mon, 12 Aug 2013 15:15:37 +0000 (16:15 +0100)]
Bug 10712: Save missing config variables to install log
The variables for AUTH_INDEX_MODE and ZEBRA_TOKENIZER were not
being saved to the koha_install_log file. As a result when using the
--prev-install-log option in Makefile.PL the user was still prompted
to select them.
This patch adds the appropriate variables to the list saved in
the install log.
To test:
On a (non-package) system installed/upgraded without the patch running
'perl Makefile.PL --prev-install-log /path/to/koha-install-log' will
still prompt you to choose authorities indexing mode and select
between chr and icu, after upgrading with this patch applied the same
command should get the responses from the install log and not require
user intervention.
The values can be seen written into misc/koha-install-log
Fridolyn SOMERS [Tue, 28 May 2013 13:43:05 +0000 (15:43 +0200)]
Bug 10362: ensure that all messages and alerts are shown upon checkin
If an item is returned and has mutiple error or warnings (e.g.,
it both needs to be transferred and the patron was debarred
in the course of the return), because of a bug in the template,
not all of the messages would be displayed.
This patch changes the template to show both messages and alerts.
Test plan :
- Perform an checkout that will a checkin :
* need a transfert (return in a different branch)
* set user debarred (depends on issuing rules)
- Perform check-in
=> You get tranfert message and debarment alert
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>
Fridolyn SOMERS [Wed, 15 May 2013 09:52:57 +0000 (11:52 +0200)]
Bug 10247: show warning if hold blocked due to maxreserves syspre
On intranet, when placing a hold requst:
If borrower has reached the request limit, a warning should appear :
Cannot place hold
* Too Many Holds: TEST has too many holds.
This works when quota defined in circulation rules is reached but not
when limit specified in syspref maxreserves is reached, in case this
limit is lower than the one defined is circulation rules.
This is because template param maxreserves is set twice, this patch
corrects this bug.
Also moves warnings and messages conditional variable from Perl to
template because it cause the same bug as for maxreserves.
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>
Kyle M Hall [Wed, 26 Jun 2013 20:40:09 +0000 (16:40 -0400)]
Bug 10511: fix message preference form glitch concerning phone notifications
An error in the onclick for phone notices causes the "Do not notify"
checkbox to be checked when the phone checkbox is checked. Also,
checking "Do not notify" does not uncheck the phone checkbox.
Test plan:
1) Enable TalkingTechItivaPhoneNotification
2) Browse to the new patron screen ( memberentry.pl )
3) In the patron messaging preferences check the Phone checkbox
4) Not the "do not notify" checkbox is then checked
5) Uncheck the "do not notify" checkbox, and check the Email checkbox as well
6) Now check the "do not notify" checkbox, note the Phone checkbox remains checked
7) Apply this patch
8) Repeat steps 3-6, noting the odd behavior is no longer present
Julian Maurice [Tue, 9 Jul 2013 09:48:23 +0000 (11:48 +0200)]
Bug 2394: Use syspref canreservefromotherbranches in CanItemBeReserved
If IndependentBranches is ON, patrons are not allowed to place
hold requests on items whose owning library is different from
the patron's home library, *unless* the canreservefromotherbranches
system preference is also ON.
The patch implements the intended behavior; without it, IndependentBranches
and canreservefromotherbranches were not consulted during the
item holdability check.
To test:
[1] Have IndependentBranches ON and canreservefromotherbranches
OFF. Make sure that the circulation rules are set up to
permit patrons to place hold requests in general.
[2] In the OPAC, log in as a patron from library A, and try placing
a hold on an item from library B. The patron will be able to
place the request.
[3] Cancel the request.
[4] Apply the patch.
[5] Try placing the same hold request. This time, the request should
be forbidden.
[6] Turn on canreservefromotherbranches.
[7] Try placing the hold request. This time, it should go through.
[8] Cancel the request.
[9] Turn off IndependentBranches.
[10] Try placing the hold request and verify that it is permitted.
[10]
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>
Galen Charlton [Fri, 9 Aug 2013 17:40:54 +0000 (17:40 +0000)]
bug 2394: regression test for canreservefromotherbranches
If IndependentBranches is ON and canreservefromotherbranches is OFF,
a patron is not permittedo to request an item whose homebranch (i.e.,
owner of the item) is different from the patron's own library.
However, if canreservefromotherbranches is turned ON, the patron can
create such hold requests.
Note that canreservefromotherbranches has no effect if
IndependentBranches is OFF.
To test, run prove -v t/db_dependent/Holds.t. Without the bugfix
patch for bug 2394, the last two tests should fail.
Jonathan Druart [Tue, 21 May 2013 15:14:24 +0000 (17:14 +0200)]
Bug 10298: Adapt existing code
set_solr and set_zebra is not really useful. It is preferable to use
mock_preference directly.
To test:
1/ Launch Solr
2/ prove -r t/searchengine/
It should produce:
% prove -r t/searchengine/
t/searchengine/000_conn/conn.t ........... ok
t/searchengine/001_search/search_base.t .. ok
t/searchengine/002_index/index_base.t .... IndexRecord called with biblio 2
Indexing biblio 2
t/searchengine/002_index/index_base.t .... ok
t/searchengine/003_query/buildquery.t .... ok
t/searchengine/004_config/load_config.t .. ok
All tests successful.
Files=5, Tests=21, 4 wallclock secs ( 0.03 usr 0.01 sys + 2.74 cusr
0.20 csys = 2.98 CPU)
Result: PASS
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Had to get Solr going again to test this, man .. they could make that
easier
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Jonathan Druart [Tue, 21 May 2013 15:13:35 +0000 (17:13 +0200)]
Bug 10298: Mock C4::Context->preference
t::lib::Mocks::Context tried to deal with preferences but did not manage
to.
This patch removes this module and add 2 routines in t::lib::Mocks in
order to mock C4::context->preference and C4::Context->config.
To test:
===START t/test.pl===
use Modern::Perl;
use t::lib::Mocks;
use C4::Context;
say "initial value for version: " . C4::Context->preference('Version');
say "initial value for language: " . C4::Context->preference('language');
t::lib::Mocks::mock_preference('Version', "new version for testing");
say "version is mocked with: " . C4::Context->preference('Version');
say "language is not yet mocked: " . C4::Context->preference('language');
t::lib::Mocks::mock_preference('language', 'new langage for testing');
t::lib::Mocks::mock_preference('Version', 'another version for testing');
say "version is mocked with another value: " . C4::Context->preference('Version');
say "language is finally mocked: " . C4::Context->preference('language');
===END===
Try to execute this file and check that the output is consistent.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10643: fix inappropriate uses of $sth->finish() in C4::ClassSource.pm
This patch gets rid of finish() and replace prepare_cached by prepare.
From the man page
finish()
Indicate that no more data will be fetched from this statement handle
before it is either executed again or destroyed.
You almost certainly do not need to call this method.
Adding calls to "finish" after loop that fetches all rows is a common
mistake, don't do it, it can mask genuine problems like uncaught fetch errors.
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 [Mon, 5 Aug 2013 13:42:36 +0000 (09:42 -0400)]
Bug 10404: tweak style of staff client previous/next links
This patch slightly modifies the styles of the previous/next links in a
way that I think is simpler and clearer.
To test, apply the patch and clear your browser cache if necessary.
Perform a search in the staff client, click any result, and look at the
prevous/next links.
Signed-off-by: Magnus Enger <magnus@enger.priv.no> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10404: add previous/next browsing to staff client
Although previous/next browsing was added for searches in the OPAC
in 2011, the staff client has been without any sort of search browsing.
Until now. This patch is an all-singing, all-dancing, all-compatible
implementation of search browsing that will work across multiple
browser tabs and on any browser since IE7 (though the staff client
layout is broken on IE7).
To test:
1) Perform a search that will bring up multiple results.
2) View one of the results.
3) Use the Previous and Next links to browse along the search results.
4) Use the "Return to results" button to check that you end up at the
correct page of results, even if you page through more than 20
records.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Owen Leonard [Fri, 2 Aug 2013 18:25:37 +0000 (14:25 -0400)]
Bug 7257: Add a link to remove an individual title from a list in the OPAC
It should be possible when viewing the contents of a list to click a
link to remove an individual title from the list without having to check
a checkbox and click another button.
This patch adds a link to each list item to "Remove from this list."
The functionality is JavaScript-dependent, automatically checking the
appropriate checkbox and submitting the form to delete.
To test, view a list for which you have delete permission. There should
be a "Remove from this list" link next to each item on the list. Test
delete functionality by:
- Clicking the link and then clicking cancel.
- Clicking the link and confirming.
- Checking more than one checkbox and then clicking a single remove
link (only the one corresponding record should be removed).
- Checking one or more checkboxes and clicking the "Remove from list"
link at the top of the page.
If JavaScript is disabled the links should not appear.
There are now two delete confirmation messages: One if you're removing
only one item, another if you're removing more than one. This is true
whether you use the links or the checkboxes.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Galen Charlton [Tue, 6 Aug 2013 14:46:31 +0000 (14:46 +0000)]
Bug 5652: (follow-up) include subtitle in hyperlink
This follow-up patch makes the subtitle part of the same
hyperlink as the title, maintaining consistency with other
pages in the staff interface such as list contents.
To test:
[1] Make sure that the Keyword to MARC mapping includes
mappings to 'subtitle'.
[2] Find a biblio that has both title and subtitle. Check
it out to one patron and place it on hold for another.
[3] In the checkout and patron details pages, verify that
the entry for this bib in the list of checked out titles
or hold requests includes both title and subtitle in
the same hyperlink.
Additionally it suppresses the appearence of the superfluous word "by"
in cases where the biblio has no author.
Test scenario:
--------------
1)
Make sure that you have one or more fields mapped to subtitle in:
Home . Administration . Keyword to MARC mapping
(e.g. 245 b)
2)
Test the checkout page with patrons having
- current checkouts (today)
- previous checkouts
- relatives (e.g. kids) with current /previous checkouts
- holds on items
- holds on biblios
...with items having:
- title, subtitle, author
- title, no subtitle, author
- title, subtitle, no author
- title, no subtitle, no author
3)
Do the same on patron's detail page
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
All tests pass
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10666: avoid random failures of Daily quotes tests
In t/db_dependent/Koha.t, the test "Got a quote based on today's
date" is failing :
$prove t/db_dependent/Koha.t :
t/db_dependent/Koha.t .. 1/6
# Failed test 'Got a quote based on today's date.'
# at t/db_dependent/Koha.t line 126.
# Compared $data->{"source"}
# got : 'Herbert Hoover'
# expect : 'Abraham Lincoln'
# Be sure to run this test on a clean install of sample data.
# Looks like you failed 1 test of 4.
Looks like the wrong quote is returned by GetDailyQuote().
I'm using a databased created with the English sample SQL datas.
I think I found the cause :
The test "Got a random quote." calls GetDailyQuote('random'=>1) which
changes the quote timestamp to now. When then testing GetDailyQuote(),
this quote (which may not be the one created by test) is the most
recent quote.
This patch moves the "Got a random quote." test after "Got a quote
based on today's date" to solve the problem.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Owen Leonard [Fri, 19 Jul 2013 16:39:18 +0000 (12:39 -0400)]
Bug 10609: Use library name rather than code in serials-collection.pl
The serials collection page displays branchcode instead of library name.
This patch uses the Branches template plugin to display the library name
instead.
Also corrected: Added missing datatables config include to prevent a
JavaScript error.
To test, view the serials collection page for a subsciption with
existing issues. Library names should be displayed instead of
branchcodes. There should be no JavaScript errors reported by the
browser.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works well and uses the new TT plugin for displaying the branch name.
To test:
prove t/db_dependent/ClassSource.t
t/db_dependent/ClassSource.t .. 1/24 prepare_cached(SELECT * FROM `class_sort_rules` WHERE `class_sort_rule` = ?) statement handle DBI::st=HASH(0x92dbedc) still Active at C4/ClassSource.pm line 249
prepare_cached(SELECT * FROM `class_sources` WHERE cn_source = ?) statement handle DBI::st=HASH(0x926876c) still Active at C4/ClassSource.pm line 137
attempting to use non-existent class sorting routine routine1
prepare_cached(SELECT * FROM `class_sort_rules` WHERE `class_sort_rule` = ?) statement handle DBI::st=HASH(0x92dbedc) still Active at C4/ClassSource.pm line 249
prepare_cached(SELECT * FROM `class_sources` WHERE cn_source = ?) statement handle DBI::st=HASH(0x926876c) still Active at C4/ClassSource.pm line 137
t/db_dependent/ClassSource.t .. ok
All tests successful.
Files=1, Tests=24, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.12 cusr 0.01 csys = 0.15 CPU)
Result: PASS
Bug 10543 - add mandatory subfield check to addorderiso2709.pl
When adding orders from staged file, you can create one order per
record using item form in the bottom of addorderiso2709.pl. The
form was missing checks of mandatory item fields; this patch
adds those checks.
Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All 3 patches pass tests and QA script.
Some additional notes on the test plan from the first patch:
It took me a while to figure out a combination of subfields
that would trigger the bug. I am not sure about the condition
that transforms the input field into a textbox as it does
not seem to happen for every field.
What worked in the end was (MARC21):
- $g cost, normal purchase price = mandatory
- $h serial enumeration/chronolgy = optional, filled with
text over 100 characters
Checked for:
- Adding items in cataloguing
Was able to reproduce the problem, mandatory check works
as expected.
- Adding items from staged file in acq
Was not able to trigger the problem, because we don't edit
the item here, but mandatory check works as expected.
- Addings items for serial subscriptions
Was not able to trigger the problem, because we don't edit
the items here, but mandatory check works better as before
as missing mandatory fields are now highlighted and weren't
before.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 10543: fix false warnings from checks of mandatory item fields
Under certain circumstances, when editing an item, you get a popup
warning
"1 mandatory fields empty (highlighted)".
Even though all mandatory fields are filled in.
This occurs when there is a field with a huge content (more than 100
characters) that gets displayed in a textarea instead of input.
This patch corrects the Javascript form check by using siblings().
Also adds a more precise filter to find mandatory inputs because
looking in full page may bring unwanted results.
Test plan :
- In a framework, make sure you have in item field :
An optional subfield (without authorised value),
then a mandatory subfield, then an optional subfield
next to mandatory subfield
For example : $i (optional), $r (mandatory) and $s (optional)
- Open a biblio record and create a new item
- Enter more than 100 characters in $i, fill $r and $s
- Click "Add item"
- Edit this item
=> You get a textarea for $i
- Empty $s and Save
=> Without patch, you get a warning and form is not saved and you see that $s is yellow while it should be $r
=> With patch, form is saved
- Re-edit this item
- Empty $r and save
=> You get a warning and form is not saved
Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Notes on last patch.