At the OPAC, if the bootstrap theme is used, the modal
dialog does not allow to use the CAS authentication.
This patch proposes, in case CAS is enabled, to
redirect to the opac-user.pl page (like prog theme).
This is because the popup content should stay small
(thinking about mobile surf), and that CAS url is
actually only computed in opac-user (see C4/Auth.pm)
and it would not be performant to compute it in all
pages.
Test plan:
- set syspref opacthemes to bootstrap
- enable the casAuthentication syspref
- fill the casServerUrl syspref with something like:
https://localhost:8443/cas
- go on the opac home page
- click on "Log in to your account" link (top right)
=> You go to cgi-bin/koha/opac-user.pl page where you
see the cas link
- disable the casAuthentication syspref
- go on the opac home page
- click on "Log in to your account" link (top right)
=> You see a popup for login and password
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Normal login still works with/without CAS.
Passes all tests and QA script.
Kyle M Hall [Mon, 16 Jun 2014 11:30:03 +0000 (07:30 -0400)]
Bug 11292 [QA Followup] - Use noEnterSubmit instead of new keypress handler
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 6f4baf2c59ff00b64a0beb891605c2dd4a7452a6) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Thu, 22 May 2014 12:35:16 +0000 (08:35 -0400)]
Bug 11292 - barcode scanner clicking 'save'
When cataloging a bib record if you scan an ISBN barcode in the barcode
scanner clicks the 'save' button before the cataloging is done. This did
not happen in 3.10, but is happening again in 3.12.
Test Plan:
1) Open the marc editor
2) Focus on a field, hit the enter key
3) Note the record tries to save
4) Focus on an indicator, hit the enter key
5) Note the record tries to save
6) Apply this patch
7) Repeat steps 2 and 4, note the record no longer
tries to save upon carriage return
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Patch tested with a sandbox.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit a52a0a8811f6ad03c422c62280bc184a9e16996d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 14 Jan 2014 12:33:58 +0000 (13:33 +0100)]
Bug 11552: allow searching on original order number after a transfer
If an order is transferred from one basket to another, it should be
possible to retrieve it with the original order number (AKA order
line). This patch makes it so.
Test plan:
- transfer an order
- note the original order number and the new one
- receive the order and, on the parcel page, try to find your order with
the original order number and the new one.
Signed-off-by: sonia bouis <sonia.bouis@univ-lyon3.fr> Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
RM note: this works only for the most recent transfer, so if an order
gets transferred multiple times, earlier order numbers won't retrieve
it.
Kyle M Hall [Fri, 14 Dec 2012 16:56:36 +0000 (11:56 -0500)]
Bug 9288 - Add a script to test SIP from the command line
This is a very basic start to a sip server testing script.
I imagine we will want to make it interactive in end,
essentially replicating what a SIP based self-checkout machine does.
Signed-off-by: Adrien Saurat <adrien.saurat@biblibre.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
This patch adds :w and :p versions to the index for »Lexile number«
(it has only :n so far) and adds indexes for 653 (Index term
uncontrolled), 655 (Index term Genre/Form), 041 (language-audio) and
041 (language-subtitle). It also adds the »curriculum«-index to
Search.pm.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 84bdb555491af52331ece7420e797e838c814229) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 14 Nov 2013 13:00:46 +0000 (14:00 +0100)]
Bug 11248: fix encoding issue on emailing a list (INTRANET)
Test plan:
- send a list via email with the english version.
- translate templates and retry with another language.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Sending an intranet list from translated templates requires
a new list template for the intranet. I have added the needed
changes in a follow-up.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9181636874a03cf43e7c26a89364279bfe2aa2ee) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Wed, 5 Mar 2014 14:08:13 +0000 (15:08 +0100)]
Bug 8258: Use patron's library's notice for DUEDGST and PREDUEDGST
If a notice is defined for the library of the patron, it should be
used.
Without this patch, the notice used is the one defined for all
libraries.
Test plan:
1/ Set the advanced notice for a patron using digest.
2/ Check one item out to this patron (backdate the return date according
the days in advance value).
3/ launch advance_notices.pl -c
4/ Verify the notice used is the default one.
5/ Define a notice for the library of the patron for PREDUEDGST
6/ launch advance_notices.pl -c
7/ Verify the notice used is the one previously defined.
8/ Check one item out to this patron (date due = today)
9/ launch advance_notices.pl -c
10/ Verify the notice used is the default one.
11/ Define a notice for the library of the patron for DUEDGST
12/ launch advance_notices.pl -c
13/ Verify the notice used is the one previously defined.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Test case: User from Library A, checked out books
- in library A from A and B
- in library B from B
Verified, that the 'all libraries' notice is still used,
when no specific notice is defined.
Verified, that the patron's home library noticed is used,
when defined.
Note: Before and after the patch we print the branch information
from the patron's home library, so also using the template from
this branch, seems logical. All items over all branches are
processed into one single reminder email, before and after the patch.
Jonathan Druart [Wed, 13 Nov 2013 13:57:55 +0000 (14:57 +0100)]
Bug 11243: make vendor list distinguish between active and canceled items
On the vendor result list, the "Item count" columns contain the sum of
all items ordered for a basket. But if an order is canceled, the item
count is not really meaningful.
This patch just adds, in parenthesis, the number of items canceled.
Test plan:
- create a basket and 3 orders with different number of items
- cancel 1 order
- verify on the supplier list that the number of items is correct and
the number of canceled items is correct too.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Note: In case the biblio was deleted when the order was cancelled,
the number of biblios will be off.
Fridolyn SOMERS [Fri, 15 Nov 2013 09:43:21 +0000 (10:43 +0100)]
Bug 11254: make reservoir search normalize ISBNs
When importing records, the ISBN is normalized and stored
into database (see C4::ImportBatch::_add_biblio_fields). But when
searching with ISBN into reservoir, it is not normalized
(see C4::Breeding::BreedingSearch). So search does not match.
This patch adds the normalisation to reservoir search. Also, it
replaces call private method _isbn_cleanup by GetNormalizedISBN,
the correct public method. Also allows the reservoir search
on ISBN with hyphens.
This is intended to fix only reservoir searches.
Revised Test plan
-----------------
1) Back up DB
2) Save copy of attached example somewhere findable
2) Home -> Tools -> Stage MARC records for import
3) Click Browse and select the example MARC file
4) Click Upload file
5) Tweak as desired then click Stage for import
6) Click Manage staged records
7) Click Import this batch into the catalog
8) Home -> Cataloging
9) In the Cataloging search text box type 978-0-691-14289-0 and
click Submit
-- ISBN13 with hypens not found in reservoir
10) In the Cataloging search text box type 9780691142890 and
click Submit
-- ISBN13 without hypens not found in reservoir
11) In the Cataloging search text box type 0-691-14289-0 and
click Submit
-- ISBN10 with hypens not found in reservoir
12) In the Cataloging search text box type 0691142890 and
click Submit
-- ISBN10 without hypens found in reservoir
13) Apply patch
14) Repeat steps 9-12, this time it is always found! :)
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit cac06afeb1f03200cfc7ab48162c184be8d1526b) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 11912: (refactoring followup) make GetMarcISBN implement its advertised API
The current implementation of GetMarcISBN contradicts the documented API.
It currently returns an array of hashes with only one key (marcisbn)
which doesn't add any value to it.
I chose to fix GetMarcISBN to honour the API instead of changing thex
docs, because it seems a really silly change.
To test:
- Run:
prove t/db_dependent/Biblio.t
=> SUCCESS
- catalogue/detail.pl should correctly show ISBNs.
- opac/opac-detail.pl should correctly show ISBNs in both prog and bootstrap.
- opac-opac-sendshelf.pl should correctly show ISBNs in the email.
Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 774483772b2a7ff8ebdb8a9aeac82881e7c858cf) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 11912: fix problem where GetMarcISBN wrongly prepends a space to ISBNs
This patch makes the logic inside GetMarcISBN simpler and
fixes the issue.
To test:
- Run the regression tests:
prove -v t/db_dependent/Biblio.t
=> FAIL
- Apply the patch
- Run:
prove -v t/db_dependent/Biblio.t
=> SUCCESS
- Verify that opac-detail.pl and catalogue/detail.pl look as usual regarding ISBN
- Sign off
Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit c4900dc448aa029749ab27f98b59d1be6eb8bb14) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 9 Jan 2014 16:53:04 +0000 (17:53 +0100)]
Bug 11489: (OPAC prog theme) show facets only if there is a result to display
If all results are hidden, the facets are displayed.
With this patch, the facets are hidden too.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Michot <nmichot@voila.fr> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script. Tested:
- Record with 1 lost item, result list = 1
- Verified without both patches 404 error page is shown
- Verified with 1st patch, no results page is shown
- Verified with 2nd patch, the still showing facets are gone
- Record with 1 lost item, result list > 1
- Record is hidden from result list, but
- result count is wrong
- result numbering is wrong
> This is an old problem, just noting
- Record with 1 lost and 1 available item, result list = 1
- Detail page is shown, only lost item is hidden
- Record with 1 lost and 1 available item, result list > 1
- Only available item is shown in result list
Also checked that the lost item shows up with hidelostitems off.
Kyle M Hall [Tue, 7 Jan 2014 17:19:37 +0000 (10:19 -0700)]
Bug 11489: in OPAC search, display "no results" when the only search result is suppressed
If hidelostitems is enabled, and the result of an opac search is a single
lost item, then the OPAC will display a 404 error, rather than a
"no results" screen.
Test Plan:
1) Catalog a record/item such that it is the only result for some search
e.g. Give it the title 'zxcvb'
2) Enable hidelostitems
3) Mark this item as lost
4) Perform an OPAC search that should result in a redirect to this record
5) Notice you a redirected to a 404 error
6) Apply this patch
7) Repeat step 4
8) Note you new get a "No results found!" page instead
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Michot <nmichot@voila.fr> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2277a42c565e18475c49fde031268b8038575e1a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Tue, 24 Dec 2013 08:58:38 +0000 (09:58 +0100)]
Bug 10138: (follow-up) FIX sql errors
There were 2 INSERT in error.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I have gone ahead and fixed the typo pointed out by Mathieu:
Endommadgé-> Endommagé
Sample files install without problems, tests look good.
Bug 10138: Add some authorized values in French installer; small fixes in frameworks
This patch adds some categories of values in French installer :
- SUGGEST
- OPAC_SUG
- REPORT_GROUP
- LOST
- DAMAGED
SUGGEST and OPAC_SUG are used by Suggestions module.
REPORT_GROUP is used by Reports module.
It also adds a new status for "ETAT" (en commande)
It creates a 995$2 subfield in french frameworks when it did not exist.
It links existing 995$2 subfield with LOST category.
It cleans up the list of authorised values installed with "Lecture
publique" framework :
- some codes are moved in general 1-Obligatoire/authorised_values.sql
(SUGGEST, REPORT_GROUP)
- some are suppressed, because they are also defined in
1-Obligatoire/authorised_values.sql (langue, COUNTRY, statut)
- the code for inserting the ones left is changed (I suppress the `id`
column)
To test :
1. Take a fresh new Koha
2. Install Koha choosing French installer and UNIMARC Lecture publique
3. Check the authorised values are imported
4. Check the cataloguing frameworks are usable :
especially 995 $2 field, which must be mapped with LOST values :
Perdu, Long retard, Perdu et remboursé, Introuvable
you can also check 101$a (language codes), 102$a (country codes)
5. In OPAC, make a suggestion. See if you can select a cause for your
suggestion ("Bestseller" or "'L'exemplaire en rayon est endommagé")
6. In staff interface, manage some suggestions. See if you can select a
cause for rejection or acceptation ("Bestseller", "Budget
insuffisant" etc)
7. In reports, see if you can sort reports according to values of
REPORT_GROUP ("Circulation", "Catalogue", "Adhérents" etc)
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on second patch.
Bug 12098: (follow-up) put can_show_subscription() into use
This patch puts C4::Serials::can_show_subscription() into use.
Note that there is user-visible change: if a subscription has a
blank library, all users with serials permissions will be able
to view and/or edit it. It remains to be determined whether
we *want* such subscriptions to exist, or if they should only
be tied to specific libraries.
Jonathan Druart [Wed, 16 Apr 2014 14:58:36 +0000 (16:58 +0200)]
Bug 12098: Refactor can_*_subscription in C4::Serials
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested on top of patches for 12048 and 12080.
Subscription search
- superlibrarian, IndyBranches on/off - always sees all subscriptions
- superserials, IndyBranches on/off - always sees all subscriptions
- no superserials, IndyBranches on - only sees own subscriptions
Note: Subscriptions without branches will only show, when all subscriptions
are visible. In a future enh it might be good to enforce setting a
branch, when IndyBranches is used.
- no superserials, IndyBranches off - always sees all subscriptions
Subscription editing
- superlibrarian, IndyBranches on/off - can edit all subscriptions
- superserials, IndyBranches on/off - can edit all subscriptions
- no superserials, IndyBranches on - can only edit own subscriptons and
subscriptions without branch
NOTE: it would make sense to also allow Edit > Edit as new (duplicate)
here, so one can copy the subscription from another branch to modify
it for the own branch.
Passes tests in t, xt and QA script, also newly provided unit tests.
Bug 12080: restore effect of superserials permission
The superserials permission is meant to allow an operator
to see all subscriptions regardless of branch when IndependentBranches
is on without having to have full superlibrarian permissions. This
patch restores this behavior.
TEST PLAN
---------
1) Apply the patch for bug 12048 (as needed -- it may be pushed)
2) Ensure you have two users: superlibrarian, non-superlibrarian
with all access to the staff client except superserials.
3) Ensure you have serials belonging to a different branch than
the non-superlibrarian.
3) Log into staff client as superlibrarian
4) Click 'Serials'
5) Click the 'Submit' button in the search area.
-- note the number of results.
6) Log into staff client as non-superlibrarian
7) Click 'Serials'
8) Click the 'Submit' button in the search area.
-- note the number should be less, note the number.
9) Give the non-superlibrarian superserials access.
10) Home -> Serials
11) Click the 'Submit' button in the search area.
-- the number will still be the same at the one in step #8.
12) Apply the patch
13) Refresh the page
-- the number should now match the one in step #5.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f0e574be4a834b28b0e19f2964f5de989f0e6665) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 12048: restore ability of superlibrarian to see other libraries' subscriptions
This patch fixes a regression in master and 3.14. When a user has
superlibrian permissions, a search on serials subscriptions should
display other libraries' subscriptions even when IndependentBranches
syspref is enabled.
To reproduce/test the bug/patch:
1. Enable IndependentBranches (i.e. 'Prevent' staff...)
2. Login as a user not having superlibrarian permission
3. Search for a serial subscription on:
/cgi-bin/koha/serials/serials-search.pl
4. Search a title which has at least 2 subscriptions: one in the user
branch, and one in another branch
5. On the result page, just 1 subscription is displayed: the one
attached to the userbranch
=> this is normal
6. Login as a user having superlibrarian permission
7. Repeat step 3-5.
8. You get the same result as 5. You should have seen all subscriptions.
That's what you get after applying this patch.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: I tested a variation. My superlibrarian was a branch that
was not the same as the non-superlibrarian. The serial was
the same branch as the non-superlibrarian. Without the
patch, the superlibrarian saw nothing, with the patch it
saw the serial as expected.
Also, remember the superserials permission can affect the
results. I successfully changed the branch of the
subscription, and then it ceased to show up with
superserials not granted to the non-superlibrarian.
I corrected the system preference name in the text here.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Superlibrarian permission now allows to see all subscriptions
independent from the branch.
Passes all tests and QA script.
But the superserials permission appears broken to me before
and after this patch. If I have superserials - the search
doesn't show all subscriptions. If I don't have superserials
I can still edit any subscription accessing the subscription
detail page through the serial collection page or accessing
the detail page directly by manipulating the URL.
Mark Tompsett [Tue, 21 Jan 2014 05:41:00 +0000 (00:41 -0500)]
Bug 11587: get rid of warnings generated by IsSuperLibrarian with anonymous sessions
This corrects line 1250 of C4/Context.pm to be:
return ($userenv->{flags}//0) % 2;
And thus avoids an uninitialized value used in the modulus.
TEST PLAN
---------
1) Apply the first patch (to update t/Context.t)
2) prove -v t/Context.t
-- This should fail tests 7 and 8
3) Apply this patch (to fix C4/Context.pm)
4) prove -v t/Context.t
-- All tests should succeed
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit bf3b1aac7b7bc422bea26bb2c045be69d93ef0bf) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Simply viewing OPAC detail triggers a modulus warning entry.
This first patch adds two test cases to t/Context.t to test for
this situation.
TEST PLAN
---------
1) Apply this patch (to upgrade t/Context.t)
2) prove -v t/Context.t
-- Tests 7 and 8 will fail
3) Apply main patch (to amend C4/Context.pm)
4) prove -v t/Context.t
-- All tests will succeed
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 8ee0bc049a183e795fc37608a4b3790d4aef2267) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
t/Context.t
Galen Charlton [Mon, 30 Dec 2013 16:05:51 +0000 (16:05 +0000)]
Bug 7002: fix some invalid superlibrarian permission checks
This patch fixes a problem where if a staff user has superlibrarian
permissions, but also has module-specific permissions, they are
prevent from editing item records that they should be allowed to.
To test:
[1] Turn on IndependentBranches.
[2] Register a superlibrarian staff user at branch A.
[3] Give that new account at least one other module-level
permission. This cannot be done through the user interface,
however, but can be done via SQL:
UPDATE borrowers SET flags = 3 WHERE userid = 'XXX';
[4] Log in as that new superlibrarian.
[5] Bring up the item details (catalogue/moredetail.pl) page for
an item at branch B. Note that there is no 'Edit Item' link.
[6] Similarly, try editing that item (cataloging/additem.pl). Note
that the edit form forbids you from touching the item.
[7] Finally, try editing that item using the Tools | Batch item
modification utility. Note that it doesn't allow you to do so.
[8] Apply the patch.
[9] Repeat steps 5 through 7. This time, the item actions should
be allowed.
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>
Works as described, passes QA script and test suite.
Galen Charlton [Mon, 30 Dec 2013 18:50:04 +0000 (18:50 +0000)]
Bug 10277: (follow-up) if no userenv is set, act like a superlibrarian
This patch fixes an error caught by t/db_dependent/Acquisition.t, and
adjusts C4::Context::IsSuperLibrarian() to return true if no
userenv is set. This is done on the basis that if no userenv is set,
calls to C4::Context routines are being made from a command-line script,
and if you have access to the command line of a running Koha instance,
you implicitly already have better than superlibrarian access.
Jonathan Druart [Wed, 18 Dec 2013 15:12:00 +0000 (16:12 +0100)]
Bug 10277: Add UT for C4::Context::IsSuperLibrarian
Note that I modify the return value. Before this patch, it returned an
empty string or 1. Now it returns 0 or 1.
Test plan:
- same as the original patch
- verify that unit tests pass:
prove t/Context.t
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, including new tests.
Checked the code and tested superlibrarian behaviour in some places:
moremember.pl:
With IndyBranches only superlibrarian can delete borrowers from
other branches. Accessing the borrower with a direct link.
OK
C4/Members.pm
With IndyBranches only superlibrarian can search for borrowres
from other branches.
OK
tools/holidays.pl
With IndyBranches only superlibrarian can edit holidays for other
branches.
Kyle M Hall [Wed, 15 May 2013 15:04:07 +0000 (11:04 -0400)]
Bug 10277 - Add C4::Context->IsSuperLibrarian()
The method of checking the logged in user for superlibrarian privileges
is obtuse ( $userenv && $userenv->{flags} % 2 != 1 ) to say the least.
The codebase is littered with these lines, with no explanation given. It
would be much better if we had one subroutine that returned a boolean
value to tell us if the logged in user is a superlibrarian or not.
Test Plan:
1) Apply this patch
2) Verify superlibrarian behavior remains unchanged
Signed-off-by: Joel Sasse <jsasse@plumcreeklibrary.net> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on second patch.
Jonathan Druart [Wed, 5 Mar 2014 12:07:53 +0000 (13:07 +0100)]
Bug 11699: fixed saving notes entered when receiving orders
Revised test plan:
1/ Create an order with 2 items
2/ Receive 1 item and enter a note for the order
3/ Verify the note is not saved
The note should be visible on the Mod Order Details screen,
but it isn't there.
4/ Apply patch
5/ Receive the second item and enter a note for the order
6/ Verify the note is correctly saved
The note is visible on the Mod Order Details screen.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works as described. The note now saves correctly and also remains when
you undo a receipt.
Note: it would be nice to show the note on the receive page as well. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ab1a74897efb82b99ed3931dff719bb64b930bc4) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Conflicts:
t/db_dependent/Acquisition.t
This relevance sets title as phrase in priority and then any index.
This patch adds title as words list before search on any index, so
that records with all searched terms in title, even not well ordered,
are more relevant.
Test plan :
- Enable QueryWeightFields syspref
- Perform a search, with sort by relevance, with two words ofen
contained in title, but never one near the other.
For example: 'History France'
=> Records with both words in title are first. For example:
"Histoire de France" and "La France : 100 ans d'histoire"
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Relevance ranking and field weighting are hard to test,
as many MARC fields are indexed into the used indexes.
If we had an index that only indexed 245$a/200$a the
effect might be more visible.
I found no regressions by this patch, change reads
logical.
Bug 11508: fix untranslatable pull-down in auth_subfields_structure.pl
This patch replaces occurrences of CGI::scrolling_list with
untranslatable labels. It also fixes capitalization.
To test
1. Go to Administration > Authority types,
click 'MARC structure' of any auth type,
click 'subfields' for any Tag >= 010,
clic 'Edit subfields'
Check pulldowns 'Managed in tab' and 'Select to display or not'
2. Apply the patch
3. Reload and verify functionality of both pulldowns
4. Check that strings are not present on staff PO file
egrep "^msgid \"(Show all|Hide all|ignore)" misc/translator/po/fi-FI-i-staff-t-prog-v-3006000.po
5. Update language file
(cd misc/translator/; perl translate update fi-FI)
6. Check that strings are now present, repeat 4.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: drop-downs work identically. Show all, Hide all, and
ignore were added to the po files too.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Works as described and improves the page to manage authority
subfields.
Jonathan Druart [Tue, 29 Oct 2013 14:03:41 +0000 (15:03 +0100)]
Bug 9216: make columns.def file translatable
The SQL column headers is stored into the columns.def file.
This file is not managed by the translation script.
This patch makes possible the headers translation.
Note: The translation xml tags were added to avoid all lines being put
on a single line.
Test plan:
1/ update your po file
cd misc/translate;
perl translate -f columns update LANG # Replace by another language here
2/ translate header columns (search "columns.def" in your po file).
3/ install the translated columns.def
perl translate -f columns install LANG # Replace by another language here
4/ go on the report module > create a new report > next > next
5/ change the language
on the 3rd step, you should see the column header translated.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described, no koha-qa errors
[on es-ES about a third of the strings translated!! :-) ]
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described and fixes a long standing translation
problem.
Passes all tests and QA script.
Fridolyn SOMERS [Fri, 22 Nov 2013 10:00:21 +0000 (11:00 +0100)]
Bug 9578: avoid a search crash when attempting to sort results of invalid query
When searching with a sort (means not by relevance) and there is an error
in Zebra connexion (server is down or query is wrong), you get the message :
Error : Can't call method "sort" on an undefined value at /home/kohaadmin/src/C4/Search.pm line 405.
This patch corrects by not performing sort if there are no no results.
Steps to reproduce the error without patch:
In OPAC go to Advanced Search
Choose "Title" in first "Search for:" end enter "ccl=( and )"
Display "More options"
Set "Sort by" to "Title (A-Z)"
Click "Search" at bootom of page
Result:
Error:
Can't call method "sort" on an undefined value at /usr/share/kohaclone/C4/Search.pm line 430.
After applying the patch, try that search again. This time,
it should report not results found with out the error message.
Alternative Test plan :
- Set OPACdefaultSortField on something else than relevance
- Perform a simple search with a wrong CCL query. For example : ccl=( and )
=> You get the messge : No results found ...
Patch behaves as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Adds another check to prevent a bad Zebra error message.
Works as described, passes all tests and QA script.
This patch adds a regression test for the condition noted
in bug 9578, where attempting a sort of a Zebra search that
fails because of an invalid query crashes.
Jacek Ablewicz [Mon, 10 Feb 2014 09:09:21 +0000 (10:09 +0100)]
Bug 11680: (follow-up) fix unexpected tax rate changes on edit
Follow-up to fix similar issue on vendor edit.
If the tax rates in Acquisitions -> gist system preference
are entered with trailing zeroes, given vendor tax rate value
may not be correctly handled on vendor edit.
Test plan for this follow-up:
1) insert some tax rates with trailing zeroes in gist
system preference (e.g: '0|0.080|0.12|0.20|0.23')
2) add some vendors, choosing 8.0% 12.0% 20.0% 23.0%
as gst rate
3) try to modify them
4) note that vendors with 12.0% and 23.0% tax rates are
preserving previously choosen rates on edit, while
the ones with 8.0% and 20.0% do not (they are defaulting
to the first defined tax rate)
5) apply the patch
6) repeat 2) and 3)
7) all tax rates configured in system prefrence shall now
behave properly while editing vendors
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f3cb186de5d60395d5d681dc5e83971d0717592a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jacek Ablewicz [Wed, 5 Feb 2014 10:16:14 +0000 (11:16 +0100)]
Bug 11680: fix case where tax rate changes unexpectedly on editing an order
If the tax rates in Acquisitions -> gist system preference are entered
with trailing zeroes, given order tax rate value may not be correctly
handled on order edit.
To test:
1) insert some tax rates with trailing zeroes in gist
system preference (e.g: '0|0.080|0.12|0.20|0.23')
2) place some new orders, choosing 8.0% 12.0% 20.0% 23.0%
as gst rate
3) try to modify them
4) note that orders with 12.0% and 23.0% tax rates are
preserving previously choosen rates on edit, while
the ones with 8.0% and 20.0% do not (they are defaulting
to the first defined tax rate)
5) apply the patch
6) repeat 2) and 3)
7) all tax rates configured in system prefrence shall now
behave properly while editing orders
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
All tests pass
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Confirmed the problem and that this patch fixes it.
Problem also exists for editing the default tax rate of a vendor.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 471215dc46e5a65360a3bde53666f62f809f0861) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Thu, 4 Apr 2013 10:09:37 +0000 (12:09 +0200)]
Bug 10090: display item type description instead of code on acq ordered and spent pages
On ordered.pl and spent.pl, the itemtype codes are displayed, instead of
descriptions.
Links for the ordernumber should be changed. In ordered.pl, we are
redirected to the receive page. In spent.pl, the links are deleted.
Signed-off-by: Broust <jean-manuel.broust@gmail.com>
Revisited patch: The link to orderreceive was broken, so I undo the
changes.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works alright, itemtype descriptions are shown.
The removed link was potentially 'dangerous' as you shouldn't
get to the receive page for an order, without providing an invoicenumber
first.
Passes all tests and QA script.
Jacek Ablewicz [Mon, 10 Mar 2014 09:53:52 +0000 (10:53 +0100)]
Bug 11914: fix two issues when creating an order from a suggestion
When order is being created from purchase suggestion:
- Budget/fund stored in suggestion record (if any) is not retained
on order page, system always defaults to 'Select a fund' even if some
fund was already chosen for a suggestion on the earlier stage.
- If there was a price given to, and stored within suggestion record,
initial prices calculations on order page are not working properly
('Replacement cost', 'Budgeted cost' and 'Total' show as 0.00 or blank).
As a workaround - to force correct price recalculation - user needs
to manually alter and then re-alter some price-related fields (e.g.,
quantity or vendor price).
This patch fixes both issues.
Test plan:
1) create a suggestion: choose some buget, enter something in 'Price'
and 'Quantity' fields,
2) try to make an order from this suggestion, to confirm/replicate
aforementioned problems,
3) apply patch,
4) make an order from previously created suggestion again, observe
that both issues are now resolved.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests and QA script.
Jonathan Druart [Mon, 28 Oct 2013 14:10:26 +0000 (15:10 +0100)]
Bug 11148: remove two superflous routines from Koha::DateUtils
There are 2 useless routines in the Koha::DateUtils
module:output_pref_due and format_sqlduedatetime. We can call
output_pref and format_datetime with dateonly = 0.
format_sqlduedatetime is only used in one place: opac-reserve.pl
Test plan:
1/ Verify on the opac-reserve.pl page that the date is correctly
displayed for for onloan items (you should use the "specific copy"
feature).
2/ Launch prove t/DateUtils.t UT file and verify all UT pass.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Due date on opac-reserve shown correctly. Unit tests pass.
Did a grep on both function names.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
No references to subs found. Passes koha-qa.pl, t and xt
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b9492e73f59439e218e7f657bdfcf67026834311) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Colin Campbell [Thu, 2 Jan 2014 14:42:16 +0000 (14:42 +0000)]
Bug 11468: Remove given/when from Koha::Dateutils
given and when give warnings due to their experimental
status as of perl 5.18. Replace the construct with
an if/elsif to avoid the keywords
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, especially t/DateUtils.t.
Kyle M Hall [Wed, 18 Dec 2013 13:37:40 +0000 (08:37 -0500)]
Bug 11416: fix case where serials item editor was incorrectly hiding fields
In serials/serials-edit.pl, if an item field is hidden from the OPAC,
it will not display in the editor, even if the field is marked as
visible in the staff intranet and editor. However, the field is still
displayed correctly in the items editor ( additem.pl ).:
Test Plan:
1) Select an item-level field ( e.g. non-public note )
2) Create a serial using the default framework ( or one of your choice )
3) For that framework, mark the chosen field as visible from the
intranet and editor, but not the opac.
4) Receive an item for this serial, note your field does not display
5) Use the biblio item editor to add an item ( additem.pl ), not the
field displayes
6) Apply this patch
7) Repeat step 4, not the field displayes
Signed-off-by: Kim Schwant <kim.schwant@courts.in.gov> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
PrepareItemrecordDisplay is only used for editor (-4 < hidden < 4)
Blou [Wed, 12 Feb 2014 17:03:08 +0000 (12:03 -0500)]
Bug 11752: display the correct frequency for serial subscriptions in OPAC details
This fixes bootstrap and prog by modifying the description displayed
in the OPAC's detail of serials.
RM NOTE: this patch does not cover the case where custom serial
frequencies have been defined.
TESTING to reproduce
- create/find a serial with a 1/week periodicity (4 in the database)
- Find it in the opac-detail.pl, click "more details" at the bottom
- validate the string. Before the patch, it will say:
"The current subscription began on 2013-12-06 and is issued every 3
weeks for 26 issues"
The "every 3 weeks" is clearly wrong.
In fact any periodicity chosen would display a wrong description, not
matching the staff interface.
After the patch, the display is corrected.
As a bonus, the "every 2 years" now has a description, where it had
none before.
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>
(cherry picked from commit 7f1e949ea0e8d05b641ddbcb4582a3e1bc913ecd) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Julian Maurice [Fri, 28 Mar 2014 13:38:25 +0000 (14:38 +0100)]
Bug 12003: Do not calculate next pubdate for irregular subscriptions
Show 'Unknown' when planneddate and publisheddate cannot be calculated
Also fixes SQL query in misc/cronjobs/serialsUpdate.pl that was still
using "periodicity != 32" to exclude irregular subscriptions from
results
Test plan:
1) Create a subscription in the serials module. Make sure to choose:
Frequency = Irregular
2) Test the prediction pattern, first publication date is set to
"First issue publication date" field, others will show as
'unknown'
3) Save the subscription
4) Check the created issue - it will show a published date and a
planned date (same as "First issue publication date" field)
5) Receive the issue and check the next generated issue, planned
date and published date should show as 'Unknown'
6) Generate a next issue, planned date and published date should
also show as 'Unknown'
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described following test plan.
No koha-qa errors
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Also tested:
- multi receiving generates mulitple issues without dates - 'unknown'
- staff detail page shows the dates empty, which is fine
- OPAC detail page shows the dates empty, which is fine
- serial collection page shows 'unknown' and those issues appear
on the 'manage' tab, as they did in the past
- Editing the issue from the serial collection page leaves the
date fields empty.
- Receving the issue, setting the status to 'Arrived' the Expected on
date is set to 'today' automatically. Date published has to be
entered manually (maybe something we could improve later
- subscription detail > issues tab shows Uknown.
- t/db_dependent/Serials/GetNextDate.t pass.
Jonathan Druart [Wed, 3 Jul 2013 08:52:21 +0000 (10:52 +0200)]
Bug 10533: move JavaScript functions for basket groups to a separate file
This patch moves JavaScript functions used for managing basket groups
to a file. This has the effect of putting the last (active) use of
the YUI JavaScript library by the staff interface in one file:
koha-tmpl/intranet-tmpl/prog/en/js/basketgroup.js
Test plan:
- Try all actions for basketgroup ( drag/drop, add, delete, close, print,
reopen, edit, export as csv).
- Check that there is no regression on others acquisition pages:
* acqui/neworderempty.tt
* acqui/uncertainprice.tt
* acqui/addorderiso2709.tt
* acqui/basketheader.tt
* admin/aqbudgets.tt
* admin/aqcontract.tt
* admin/aqbudgetperiods.tt
* admin/aqplan.tt
* suggestion/suggestion.tt
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests and QA script.
Frédérick [Tue, 18 Mar 2014 20:11:44 +0000 (16:11 -0400)]
Bug 11955: Remove spaces in empty indicators when linking an authority to a biblio record.
This patch removes spaces in indicators which are imported when we link an
authority to a biblio record. The spaces made the indicators harder to edit
after the linking, because we had to delete the superfluous space character
before a new value could be entered.
To test:
1. Open some authority on editor, save with empty indicators.
They are saved as ind1=" " ind2=" " on auth_header tables, with spaces
2. Edit some record, link some tag with previous auth,
indicators now have a space on it (or ind1 at last)
3. Apply the patch
4. repeat 2, space is gone
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit afc9549a6f58ddf36cf6d9a5399239385c377c90) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Fri, 15 Nov 2013 16:29:23 +0000 (08:29 -0800)]
Bug 11258: fix another case where holds queue made transfer requests that contradict the library holds policy
This patch fixes a problem where the holds queue generator
was making requests where the pickup library is the
same as the item's library but not the patron's branch,
even if there is a "Default holds policy by item type" rule that states
this item can only fill holds for patrons of the same library as the
item.
Test Plan:
1) Create a test record with 2 items with different itemtypes
2) Set the Default holds policy by item type for the first
item to "From any library"
3) Set the Default holds policy by item type for the second
item to "From home library"
4) Place a record level hold for a patron from another library,
but for pickup at the same library as the item is from
5) Rebuild the holds queue
6) View the holds queue, note the item is listed, though this
patron cannot place a hold on this item
7) Apply this patch
8) Repeat step 5, note the hold is no longer in the queue
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
automated tests pass, functional tests pass. Bug replicated, eradicated by patch.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
I finally managed to reproduce this, patch works as described.
Passes tests and QA script, provided tests fail without patch, but
succeed with the patch.
Owen Leonard [Wed, 9 Apr 2014 16:15:56 +0000 (12:15 -0400)]
Bug 12058: make OverDrive search results page show cart, lists, and login links
The template for OverDrive search results in the Bootstrap OPAC doesn't
show the cart, lists, or login links because the template's checks of
related system preferences relies on [% USE Koha %], which is not
present. This patch adds it.
To test, enable the bootstrap theme and OverDrive integration
(OverDriveClientKey, etc.). Perform a search in the OPAC and click to
view results from your OverDrive library. Confirm that cart, lists, and
login links appear in the header.
Signed-off-by: Jesse Weaver <pianohacker@gmail.com>
Bug confirmed, and this patch fixes it.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit b1e09cb0fa900964200f224cad771d95062bc48d) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Kyle M Hall [Mon, 6 Jan 2014 18:46:02 +0000 (13:46 -0500)]
Bug 11484: Add option to cleanup_database.pl to purge Z39.50 search records from reservoir
It would be good to be able to specifically target import records from
Z39.50 for cleanup.
Test Plan:
1) Apply this patch
2) Import one or more batch record sets into Koha
3) Perform some Z39.50 searches
4) Run this command: misc/cronjobs/cleanup_database.pl -v --z3950
5) Verify that only Z39.50 records were deleted
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f796d1002a39cd714433a219b35eefbce31b02d8) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 12081: make tmpl_process3.pl delete ts temp files
This patch enable deletion of temp files used by
tmpl_process3.pl.
Just removed coments on existing code
To test:
1. Do a count of files on /tmp ( ls /tmp | wc -l )
2. Update preferred language
3. Count again, new files on /tmp
4. Apply the patch
5. Update again, check, no new files
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: I watched what temp files were actually in /tmp to make
sure other processes didn't magically increase/decrease
the number.
$ perl translate update {lang code}
generated 10 temporary files for me (2x5 po files). After
removing those ten files, and applying the patch, no
other files were generated.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
These lines has been commented by commit a399dcefad193fc21ef2dc1fe31d07686ab2da46 without any apparent good
reason.
Jonathan Druart [Wed, 9 Apr 2014 08:24:24 +0000 (10:24 +0200)]
Bug 12052: New syspref to display message on the OPAC patron summary page
Test plan:
Fill the OPACMySummaryNote with HTML code or just text.
The content should be displayed at the OPAC on the summary page for
patrons.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.
Rephrased the pref text a little bit, using 'logged in' instead of
'connected', also added " so the description appears correctly in the
pref editor.
Mason James [Mon, 16 Sep 2013 03:12:16 +0000 (15:12 +1200)]
Bug 10825: don't display enum/chron twice for items received via the serials module
TEST PLAN
---------
1) In the staff interface, display a bib that has one or more items
that were received in the serials module. The following query
can identify them:
-- in MySQL:
SELECT items.biblionumber,items.enumchron,serial.serialseq
FROM items,serial,serialitems
WHERE items.itemnumber=serialitems.itemnumber
AND serialitems.serialid=serial.serialid;
2) Note that in the holdings tab, the serial enumeration/chronology
is displayed twice.
3) Apply the patch
4) Refresh the screen
4) Now, the enum/chron should be displayed only once per item.
Signed-off-by: Mason James <mtj@kohaaloha.com> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.
Template change only.
Mark Tompsett [Thu, 6 Mar 2014 06:29:39 +0000 (01:29 -0500)]
Bug 11797: fix odd number of elements in hash warning (MARC21)
This was discovered when someone triggered an authority search
on an authority record that was missing what is assumed the
default subfield for a given field.
It, however, also can be triggered in an OPAC authority search
by looking at the record that lacks the default subfield for a
given field.
TEST PLAN
---------
1) Create an authority record with 180$x and NOT 180$v.
See C4::AuthoritiesMarc::BuildSummary in the 1.. foreach loop
for known tags and default values. The default subfields are
the first letter of the $subfields_to_report string.
2) Trigger the bug:
Method 1: /cgi-bin/koha/opac-authoritiesdetail.pl?authid=#
Where # is the authority id of your tweaked record.
The error occurs in Normal view.
Method 2: Home -> Cataloging -> + New record
-> Click the 'Tag Editor' on 100$a
Editing of $a to $b and back may be required.
3) Notice there is an error log entry.
4) Apply the patch
5) Attempt to trigger the bug again
6) That specific error log entry is not generated.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Could generate the warning with a missing 151$a with both methods.
No warning anymore after applying this patch.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 129bc3281180d892659d3ad1ef253fbc7ec6f316) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds unit tests for C4::AuthoritiesMarc::BuildSummary
for both UNIMARC and MARC21 and a regression test for the "Odd
number of elements in anonymous hash" warning.
To test:
[1] Run prove -v t/db_dependent/AuthoritiesMarc.t. It should
report one failure.
[2] Apply the main patch.
[3] Run t/db_dependent/AuthoritiesMarc.t again; it should pass.
Bug 5052: make it possible to pick a language if all choices are sublanguage
This was tricky to catch. In current implementation, Bug 6755
introduced in C4/Templates.pm as condition to send the array of
hashrefs of languages that (@$languages_loop<2), but with one
language group that condition is false, there is only one
element in that array.
This patch changes that condition to have more than one language
selected, grouped or not.
Also send $bidi value always, that was only sent if there is
more than one group language.
To test:
1. Translate to en-GB and en-NZ, or simply do mkdirs
on intranet-tmpl/prog and opac-tmpl/bootstrap
2. Go to Administration > System preferences > I18N
enable those languages on staff/opac
3. Check that language chooser is nowhere to be found
4. Apply the patch
5. Reload staff/opac, now you can see language chooser
NOTE: I made little changes on staff, but can't replicate
bootstrap colors for selected/unselected language. Someone
need to touch css files to make it happen. But that is
current behavior.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Good catch!
Owen Leonard [Fri, 11 Apr 2014 16:40:20 +0000 (12:40 -0400)]
Bug 12075: fix keyboard shortcuts broken by jQueryUI upgrade
The recent jQueryUI upgrade broke keyboard shortcuts in the staff client
because of changes to the jQueryUI API. This patch fixes the problem.
To test, apply the patch and clear your browser cache if necessary.
- View any page in the staff which includes header search tabs for check
out, check in, or catalog search (staff client home page or
circulation page for instance).
- Test the keyboard shortcuts: Alt-q for catalog search, Alt-u for check
out, Alt-r for check in.
- Each keyboard shortcut should select the correct tab.
Followed test plan, patch behaves as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Confirmed that the shortcuts were broken before the patch
and now work again after applying it.
Bug 12073: don't show link URLs when printing Bootstrap OPAC detail page
On OPAC Bootstrap detail page, by clicking Print link on the right the
page is printed. But the printed page contains HTML <a> anchors URL
attribute. It's useless, and unreadable. It isn't the case with prog
theme.
This patch hides all <a> href attributes when printing any OPAC page.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described and improves the printed detail page's readability.
Currently there is no less file for the print.css.
Owen Leonard [Thu, 10 Apr 2014 19:50:40 +0000 (15:50 -0400)]
Bug 12069: redirect to staff login if you access members/mod_debarment.pl when logged out
members/mod_debarment.pl's call to checkauth should pass 'intranet' so
that if the user happens to be logged out they will be redirected to the
staff client login form, rather than the OPAC.
To test, apply the patch and log in to the staff client:
- Add a restriction to a patron's account.
- View the restrictions tab on the patron's account. You should see the
restriction and a "Remove" link for that restriction.
- In another tab, log out of the staff client.
- In the first tab, click the "Remove" link. You should be redirected to
the staff client login page.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Good catch! Works as described, passes all tests and QA script.
Bug 12076: better detect an untranslatable template construct
Per bug 6458, template constructs of the form
<li [% IF (foo) %]selected="selected"[% END %]...
are forbidden as they can cause problems with translated templates.
However, the tt_valid.t test currently doesn't catch the variation
where '-' is used to suppress extra whitespace:
<li [%- IF (foo) -%]selected="selected"[%- END -%]...
This patch corrects the issue.
To test:
[1] Temporarily add the following line to a template file:
<li [%- IF a -%]a="a"[%- END -%] />
[2] Run prove -v xt/tt_valid.t. Note that no error is reported.
[3] Apply the patch, and rerun the tt_valid.t test. This time,
an error should be reported.
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well, detects the forbidden pattern
No koha-qa errors.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests and QA script.
Jonathan Druart [Wed, 19 Mar 2014 15:38:20 +0000 (16:38 +0100)]
Bug 11960: replace unnecessary call of GetMemberDetails by CanBookBeRenewed
C4::Circulation::CanBookBeRenewed called C4::Members::GetMemberDetails to
retrieve categorycode and branchcode.
- categorycode is used to retrieve the issuing rule
- the borrower information is passed to
C4::Circulation::_GetCircControlBranch. Which only uses the branchcode
parameter.
GetMemberDetails does a lot of calls/queries (patronflags,
account, etc.) that are not needed by CanBookBeRenewed.
This patch replaces it with a call to C4::Members::GetMember.
Note: I presented this small optimisation during a quick introduction to
NYTProf (hackfest 14 in Marseille).
Test plan:
- launch member unit tests
- check the code
Checking the code resulted in the following:
CanBookBeRenewed builds a hash reference from the borrowernumber
(2482). Note it is only used in this function and not passed in.
_GetCircControlBranch (2485) requires that hashreference to
have a branchcode key. As stated above.
The following line (2486) requires it have a categorycode key.
As such, C4::Members::GetMemberDetails is confirmed to be
overkill, and C4::Members::GetMember is sufficient.
Testing Done
------------
0) Back up DB
1) Make sure MPL is in the list of libraries.
2) Apply the patch.
3) run the koha qa test tool
4) prove -v t/db_dependent/Circulation.t
Patch applies cleanly. QA Test tool was all OK. All tests ran successfully.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9132f9befb36f32fc35a511c3829c224b42893bf) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 11441: enhance remove_unused_authorities.pl ability to select records
remove_unused_authorities.pl previously required that --aut be supplied
to specify one or more authority types to check for unlinked authority
records. If --aut was omitted, it would default to search for
records of authority type NC, which is not present in many (or any?)
Koha databases.
Now, if --aut is omitted, unlinked authority records of any type
are removed.
To test it:
Parse only PERSO_NAME authorities:
misc/migration_tools/remove_unused_authorities.pl -aut PERSO_NAME
Parse all authorities:
misc/migration_tools/remove_unused_authorities.pl
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 0f6652d62bd9053c87de5b94eb6a35f68a3af4bf) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Jonathan Druart [Mon, 24 Mar 2014 14:25:05 +0000 (15:25 +0100)]
Bug 11995: restore ability of serialsUpdate.pl to calculate next serial issue dates
Bug 7688 changed the prototype for GetNextDate, but the serialsUpdate.pl
cronjob script had not been updated. This patch fixes the problem.
Test plan:
Before applying the patch:
1/ Check that the following SQL query returns something:
SELECT serial.*
FROM serial
LEFT JOIN subscription ON (subscription.subscriptionid = serial.subscriptionid)
WHERE serial.status = 1
AND DATE_ADD(planneddate, INTERVAL CAST(graceperiod AS SIGNED) DAY) < NOW()
AND subscription.closed = 0;
2/ Run misc/cronjobs/serialsUpdate.pl -v
It should die with an error message like this:
Can't use string ("2011-03-05") as a HASH ref while "strict refs" in use
3/ Apply the patch
4/ Run misc/cronjobs/serialsUpdate.pl -v
It should exit normally and print messages like this:
Serial issue with id=XX updated
5/ Run the Koha QA test tools.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit f71283bad5517757ee6b670c0edb5257d0a1bedc) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Katrin Fischer [Thu, 27 Feb 2014 09:16:21 +0000 (10:16 +0100)]
Bug 7267: Add account number to German PDF template
To test:
- Switch system preference OrderPdfFormat to pdfformat::layout2pagesde
- Create one or more baskets with some orders each.
- Add all baskets to one basket group
- Print the basket group
- Check the account number from your vendor shows up with the other
vendor details
Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit ae030272a4f30104adefe9d6164eb99a0f4d8f73) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Katrin Fischer [Thu, 27 Feb 2014 09:13:33 +0000 (10:13 +0100)]
Bug 7267: Add account number to English PDF templates
To test:
- Switch system preference OrderPdfFormat to pdfformat::layout2pages
- Create one or more baskets with some orders each.
- Add all baskets to one basket group
- Print the basket group
- Check the account number from your vendor shows up with the other
vendor details
- Repeat with pdfformat::layout3pages
Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 62151ced35329f94e4508b4973521464d48307c9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Katrin Fischer [Thu, 27 Feb 2014 09:17:44 +0000 (10:17 +0100)]
Bug 7267: Add account number to French PDF template
To test:
- Switch system preference OrderPdfFormat to pdfformat::layout3pagesfr
- Create one or more baskets with some orders each.
- Add all baskets to one basket group
- Print the basket group
- Check the account number from your vendor shows up with the other
vendor details
Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit a4841aae08cf60b4fcf628eee991738e2232cc80) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>