If the ISBN of a UNIMARC record begins with 979 then the 'Stage MARC for
import' hangs. If I use the same UNIMARC record and change 979 to 978 in the
ISBN, 'Stage MARC for import' works perfectly.
The patch deals with the fact that converting an ISBN-13 to ISBN-10 with
Business::ISBN as_isbn10() method fails if the ISBN doesn't begin with 978.
TEST PLAN:
(1) Download, and decompress the ZIP file attached to BZ.
(2) On a UNIMARC Koha instance, go in Tools > Stage MARC for import.
(3) Choose the MARC file containing the record with an ISBN begining with 979.
Click on Upload file, then Stage to import.
(4) The Job progress bar stay at 0%.
(5) Apply the patch. Repeat steps 2-3. The upload works.
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Tested in a UNIMARC installation, confirmed that the patch fixes the
problem.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Fix a typo. Not test plan required, just a look at default UNIMARC framework.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
If an item is edited and a field is not mapped to Koha, it is to 0 or
NULL (depending on the default value defined).
This patch adds a check on the mapping before editing the item. It there
is no mapping, the DB value is not erased.
Test plan:
1/ Edit an item and fill a value for a field
2/ Unmap this field
3/ Edit the item
4/ Verify that the value is not erased (using the MySQL CLI)
Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Make the caching more correct. Also removes a warn that got left behind.
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Authorised values are now cached using the proper Koha::Cache mechanism,
rather than a simple internal cache. Memoize has been removed because it
didn't really work like we needed it to.
Test plan:
* running a persistent environment:
* load the edit item screen
* refresh several times to ensure any process-based caches are filled
* add a new LOC authorised value as fast as possible (prepare it on
another tab.)
* refresh the edit item page
* note that the new LOC value may or may not be showing in the
"shelving location"
* if more than 5 seconds have passed since saving it, it must now show
up.
* refresh a few times to ensure that it's showing on all processes.
Note:
* This patch depends on the caching changes of 9967.
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch removes only instance in this file.
Also updates getframework POD on C4/Koha.pm,
adds new GetFrameworksLoop() func on same file from
suggested code, but with ordered result.
To test:
1. Apply the patch
2. Enable viewLabeledMARC syspref
3. On staff, search for a record, goto detail view
4. Clic on Labeled MARC
5. Framework pulldown was replaced, check changing
framework.
A bug was fixed, because selecting any fw and then Default
tries to load values from 'Default' fw code, which does not
exists.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch adjusts the test so that if an "ISBN" is not
defined (because the source string did not specify a valid
ISBN), it doesn't result in a warning once the warnings
stricture is enabled in C4::Koha.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch fixes a problem where search errors like this in the logs when
running a stage import with the AggressiveMatchOnISBN syspref turned on:
search failed (isbn,phr=978-0-7517-9745-9 or isbn,phr=0-7517-9745-6 or
isbn,phr=978-0-7517-9745-9 or isbn,phr=0751797456 or
isbn,phr=9780751797459 or isbn,phr=978-0-7517-9759-6 or
isbn,phr=0-7517-9759-6 or isbn,phr=978-0-7517-9759-6 or
isbn,phr=0751797596 or isbn,phr=9780751797596 or isbn,phr= or
isbn,phr= or isbn,phr= or isbn,phr= or isbn,phr=) CCL parsing
error (10014) Search word expected ZOOM at
/usr/share/koha/lib/C4/Matcher.pm line 688.
This is most easily seen when running the script from command line
/misc/stage_file.pl.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Some types of invalid ISBNs, when run through C4::Koha::NormalizeISBN
can produce ISBN objects that contain invalid ISBNs. This can be
reproduced with an ISBN that has an invalid prefix, group code or
publisher code. An example ISBN would be "0788893777 (2 DVD 45th ed)".
When attempting to look up a record with such an ISBN, you will get an
error along the lines of: Can't call method "as_string" on an undefined
value
Instead of checking for the BAD_ISBN state, we should be checking for
the GOOD_ISBN state via the method is_valid.
Test Plan:
1) Edit a record, add the following ISBN to your record:
0788893777 (2 DVD 45th ed)
2) When Koha redirects to the record, you should see the error message
described
3) Apply this patch
4) Reload the page, you should now see your record
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>
Test Plan:
1) Catalog a record with the ISBN "0394502884 (Random House)"
2) Export the record, edit it so the ISBN is now
"0394502884 (UnRandomHouse)"
3) Using the record import tool, import this record with matching
on ISBN.
4) You should not find a match
5) Apply this patch
6) Run updatedatabase.pl
7) Enable the new system preference AggressiveMatchOnISBN
8) Repeat step 3
9) The tool should now find a match
Signed-off-by: Tom McMurdo <thomas.mcmurdo@state.vp.us>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch ensures that the list of desired formats for a purchase
suggestion includes the list of item types so long as the
AdvancedSearchTypes system preference includes 'itemtypes'.
--------------
-- Synopsis --
--------------
When system preference AdvancedSearchTypes has other values than 'itemtypes',
for ex 'itemtypes|loc', itemtypes selection in opac-suggestions.pl
is not populated with available itemtypes.
This patch fixes the issue by broadening the strict comparison of
($advanced_search_types eg 'itemtypes') #fails 'itemtypes|loc'
to
($advanced_search_types =~ 'itemtypes') #succeeds 'itemtypes|loc'
Unit tests included
---------------
-- Test plan --
---------------
REPLICATING THE ISSUE
1. Set system preference AdvancedSearchTypes to itemtypes|loc
2. Go to opac-suggestions.pl and observe Item type <select> dropdown list
2.1. List should have only the default value
AFTER APPLYING THIS PATCH
1. Set system preference AdvancedSearchTypes to itemtypes|loc
2. Go to opac-suggestions.pl and observe Item type <select> dropdown list
2.1. List should have itemtypes available for selection
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Tests worked as expected. Placed a suggestion and saw the whole
list of item types, chose one, saved, checked staff and it loaded
as expected. Changed item type in staff and it applied in both
views.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests including new regression tests.
Restores old functionality.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
GetAuthvalueDropbox is in C4::Budgets, this does not make sense.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
The current "Library" facet is somewhat ambiguous for Koha installations
with multiple libraries. It refers to the holdingbranch, but does not
explicitly state this. It would be beneficial to allow the administrator
to choose to show facets for the holding library, home library, or both.
In addition, the facets should be more explicitly labeled. This patch
adds this flexibility.
Test plan:
1) Apply this patch
2) Check that the facets label "Libraries" now reads "Holding libraries"
3) Update the system preference DisplayLibraryFacets to "home library"
4) Check that the facet now reads "Home libraries"
5) Update the preference again to "both home and holding library"
6) Check that both the facets for home and holding library are now
displayed.
Signed-off-by: Jen DeMuth <jdemuth@roseville.ca.us>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Changes apply to both prog and bootstrap OPAC and staff client.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Location facet in UNIMARC is void. In the code, it is build
on 995$c, while location is store in 995$e (see record.abs).
This patch replace 995$c with 995$e in Koha.pm
To test :
1. Use a UNIMARC Koha instance with ONE branch, and SEVERAL
locations
2. Make a search in opac and staff interface : no location
facet on the left side of the screen
3. apply the patch
4. Make the same search : location facets will be displayed
NOTE: I, Mark Tompsett, rebased this. I confirmed that 995$c
should be 995$e (wiki, Holdings_data_fields_(9xx) page)
Also note that the code relocated based on bug 10078,
causing the patch to not apply.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
NOTE: The location facet did not appear in master, but after
applying the patch, it did appear.
Because of the code being moved, it is no longer affected
by the branch count or singleBranchMode.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes wrong subfield code for UNIMARC.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
It is not necessary to process the case where the number of quotes
is just one, as int(rand(1)) will always produce 0, which is a valid
offset.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
If there is a gap in the id sequence for the quotes table, it
is possible that no new quote will be selected. This will happen
particularly when a lot of the older quotes with low ids have been
deleted.
This patch improves the selection of a new quote.
To test:
- Load sample quotes
- Delete the first half of the quotes.
Note: With 34 quotes, delete the quotes with ids from 1-17
- Activate the QuoteOfTheDay system preference
- Check if a quote is displayed in OPAC
- Reload the page a few times, no quote should be displayed
Note: make sure you don't have a quote with the current
date in your quotes table before running those tests
- Run 'perl t/db_dependent/Koha.t'
Note: requires sample quotes!
- Apply patch
- Reload the OPAC start page
- Verify a quote was now picked
- Run 'perl t/db/dependent/Koha.t' again - all tests should still pass
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Patch modified to use "LIMIT 1 OFFSET ?" rather than "LIMIT ?, 1"; the
latter construction does not work in PostgreSQL.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 8015: Fix complains from qa tools
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Bug 8015: Get rid of the eval in ModifyRecordWithTemplate
This patch removes the use of eval in the
C4::MarcModificationTemplates::ModifyRecordWithTemplate routine.
Now this routine call the wanted modification routine with the list of
parameters.
This call is done only if the condition is respected.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Bug 8015: Get rid of eval for evaluating =~ m//
Koha::SimpleMarc::field_equals uses eval in order to check if a string
matches a pattern.
Now this eval is removed and the "regex" variable does not contain the
regex separated character (/ or |).
Regression: Before this patch, the user was able to user a modifier. Now
it is not possible.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Bug 8015: Get rid of the eval for substitution
Before this patch, the regex substitution was contain into only one
variable (e.g. my $regex = "/foo/bar/i").
Now each member of the regex is stored into a field in the
marc_modification_template_actions sql table.
In order to avoid a complex code, only modifiers i and g are take into
account.
Note: If you already add the mmta table, you have to drop it.
This patch also adds a foreign key from mmta to mmt tables.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Bug 8015: FIX ui issue
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Bug 8015: The template name is a required field
Test plan:
Try to add a template with an empty string as name.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 8015: Fix template capitalization amd other template issues
Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Bug 8015: Fix error where field object is returned instead of field value for fields without subfields
Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Bug 8015: Fix bad ordering on function parameters
Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Bug 8015: Escape escape characters for strings
Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Bug 8015: Fix bad parameter list for direct external call to update_field
Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Bug 8015: Fix problem with moving existing subfield value to nonexistent field/subfield
Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Bug 8015: FIX QA issues
This patch fixes some stuffs failing qa tests: POD, indentation (tabs),
perlcritic
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
The MARC Modification Templates system gives Koha users
the power to make alterations to MARC records automatically
while staging MARC records for import.
This tool is useful for altering MARC records from
various venders work with your MARC framework.
The system essentially allows one to create a basic script
using actions to Copy, Move, Add, Update and Delete fields.
Each action can also have an optional condition to check
the value or existance of another field.
The Copy & Move actions also support Regular Expressions,
which can be used to automatically modify field values during the
copy/move. An example would be to strip out the '$' character
in field 020$c.
Furthermore, the value for an update can include variables
that change each time the template is used. Currently,
the system supports two variables, __BRANCHCODE__ which
is replaced with the branchcode of the library currently
using the template, and __CURRENTDATE__ which is replaced
with the current date in ISO format ( YYYY-MM-DD ).
At its simplist, it can perform functions such as:
Copy field 092$a to 952$c
At its most complex it can run actions like:
Copy field 020$c to 020$c using RegEx s/\$// if 020$c equals RegEx m/^\$/
Signed-off-by: Leila <koha.aixmarseille@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Currently, the location facet only shows if you have singlebranch
mode enabled. In other words, you can either see the library branch
or the shelving location.
This patch simply changes the location facet so that it will always
show the shelving location (if one is available), regardless of the
singlebranch system preference.
Test Plan:
BEFORE APPLYING:
0) Disable singlebranch mode if it is on
1) Do an OPAC or Staff Client search for a record that has items with
shelving locations.
2) Note that you can see the library branch facet under Libraries
but no shelving locations.
3) Enable singlebranch mode
4) Repeat your search
5) Note that you can no longer see the library branch facet under
Libraries. However, you can see the shelving location under Location
N.B. If you don't have more than one branch or the search results
are all from one branch, you might not get a library branch facet.
If this is the case, create additional branches and/or change the
branch for items in your search results so that you have multiple
branches to prompt the appearance of a library branch facet.
AFTER APPLYING
1) Do an OPAC or Staff Client search for a record that has items with
shelving locations.
2) Note that you see a facet under Location on the left sidebar,
regardless of there being a singlebranch mode or the number of branches
there are being represented in the search results.
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: Galen Charlton <gmc@esilibrary.com>
Remove uncalled sub GetCcodes
Also remove comment in opac-search.pl which is
remaining reference to it and serves no
useful purpose
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>
The OPAC description for an authorized value is not required to be
populated. In particular, if it is NULL, the staff description is
displayed instead.
This patch makes sure that the sort order (in OPAC mode) uses either
the staff description or the OPAC description as needed for each
value.
To test:
[1] Make sure that AdvancedSearchTypes includes "ccode"
[1] Arrange your CCODE values so the sort order for staff labels
is different from the sort order for OPAC descriptions. Also,
ensure that one of the OPAC descriptions is NULL. For example,
authorised_value | lib | lib_opac
--------------------------------------
ZZZ | A_STAFF | Z_PUBLIC
DDD | D_STAFF | NULL
AAA | Z_STAFF | A_PUBLIC
[2] Prior to the patch, any CCODE values where the OPAC description
is NULL will sort first in the OPAC advanced search page, even
if the displayed label shouldn't come first.
[3] Apply the patch.
[4] Verify that the collection list on the OPAC advanced search page
is now correct.
[5] Verify that the sort order on the staff advanced search page
has not changed.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely, tested in staff and OPAC.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Collection codes and shelving locations are displayed in the OPAC and
staff client via GetAuthorisedValues which currently sorts results by
"lib, lib_opac." Consequently if lib (the description for the staff
client) doesn't match lib_opac (the description for the OPAC) sorting
will appear to be nonsensical in the OPAC. GetAuthorisedValues can be
passed an $opac parameter, so this should be used to switch how reuslts
are sorted. This patch implements such a switch.
To test, modify your collection code or shelving location authorized
values so that lib and lib_opac do not match. Set your
AdvancedSearchTypes system preference to display the modified authorized
values and view the advanced search page in the OPAC and staff client.
Sorting should be correct in each case according to the correct value
(lib in the staff client, lib_opac in the OPAC).
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Tested in staff and opac and it works perfectly!
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
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.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
When the Quote of the Day tool selects a new new quote, it updates the
timestamp and does not take the timezone into account. Thus the time is
set to +4 hours (e.g. 2013-06-11 13:33:48 when the time is 2013-06-11
09:33:48). It then repeats the same quote every day.
To replicate:
Set Administration >> System preferences >> OPAC preferences >> Features
>> QuoteOfTheDay to Enable
In Home >> Tools >> Quote Editor, add several quotes.
In the opac, refresh the home page. You should get a quote of the day at
the top.
mysql> select * from quotes;
Note the timestamp of the quote selected by the tool. It will not match
the date on the machine (unless your server's timezone is set to UTC).
If you change the date to the previous date and refresh the opac, the
tool wlill select another quote, which will not change unless forced.
Test Plan:
1) Remove all your quotes and import a fresh set
2) Enable the quote of the day and view the opac
3) Look at your quotes table and note the timestamp is incorrect
4) Repeat steps 1 and 2
5) Look at your quotes table and note the timestamp is now correct
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Adds a course reserves system for academic libraries.
The course reserves system allows libraries to create courses
and put items on reserves for those courses.
Each item with at least one reserve can have some of its attributes
modified while it is on reserve for at least one active course.
These attributes include item type, collection code, shelving location,
and holding library. If there are no active courses with this item
on reserve, it's attributes will revert to the original attributes
it had before going on reserve.
Test Plan:
1) Create new authorised value categories DEPARTMENT and TERM
2) Create a new course, add instructors to that course.
3) Reserve items for that course, verify item attributes have changed.
4) Disable course, verify item attributes have reverted.
5) Enable course again, verify item attributes again.
6) Delete course, verify item attributes again.
7) Create two new courses, add the same item(s) to both courses.
8) Disable one course, verify item attributes have not reverted.
9) Disable both courses, verify item attributes have reverted.
10) Enable one course, verify item attributes are again set to the
new values.
11) Edit reserve item attributes, verify.
12) Disable all courses, edit reserve item attributes, verify
the item itself still has its original attributes, verify
the reserve item attributes have been updated.
13) Verify the ability to remove instructors from a course.
14) Verify new permissions, top level coursereserves, with
subpermissions add_reserves and delete_reserves.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Corinne Bulac <corinne.hayet@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
http://bugs.koha-community.org/show_bug.cgi?id=8125
A user might create a SQL report that relies on non-existent authorised value categories.
Because of a typo, or just because they copy&pasted the report from the Wiki.
Use cases are:
- The user creates a report from SQL
a) Uses bad authorised values
b) Clicks 'Save Report'
c) Koha lists the problematic authorised values
d) The user decides to
e-1) Save it anyway, it gets saved
e-2) Edit the report, it gets back to where it chose 'Save Report'
- The user edits an already saved report (Update SQL)
a) Uses bad authorised values
b) Clicks 'Update SQL'
c) Koha lists the problematic authorised values
d) The user decides to
e-1) Save it anyway, it gets saved
e-2) Edit the report, it gets back to where it chose 'Update SQL'
- The user tries to run a saved report that contains bad authorised values, Koha advertises the problem and provides the user with a button 'Edit SQL' to fix things.
To test, just create a report from SQL using invalid authorised values like this (misspelled 'branch'):
SELECT *
FROM itemtypes
WHERE hola=<<Test branch1|branchee>> AND
hola2=<<Test branch2|brancha>>
Regards
To+
Notes:
- I added several comments on the code.
- Fixed an annoying warning of uninitialised variable also (refactored some tiny bits to do it).
- Added the following methods
- C4::Reports::Guided::GetReservedAuthorisedValues
- C4::Reports::Guided::GetParametersFromSQL
- C4::Reports::Guided::IsAuthorisedValueValid
- C4::Reports::Guided::ValidateSQLParameters
- C4::Koha::IsAuthorisedValueCategory
- Those methods could have been used to refactor this guided reports code as its *a bit messy*. I chose to do it in a new bug of course :-D.
- Fixed some trivial perlcritic -5 errors
- Removed some debugging stuff left by mistake
- Fixed some POD problems
- Optimal SQL-driven IsAuthorisedValueCategory method
- Thanks to Owen and Jared for their patience heh.
Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described. No koha-qa errors.
Test:
Tried with examples (from help and test plan) reports, correctly
identifies invalid authorized values, and no problem with
authorized ones.
NOTE: Online help for this does not states that partial values
need to be between '%' in a SQLish way. Perhaps this could be
addressed inserting % in values or adding a checkbox (partial|exact).
Or changing help.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
- Filter by groups using tabs
- Filter by subgroups using a dropdown list under each tab
- Allow to create new group and subgroups when building a new report or
editing an existing report (no need to go through admin AV interface)
+ Possibility to duplicate a report (new link in the table)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
In UNIMARC installations the authors have a double comma separating the subfield a and the subfield b.
Test plan:
- After applying the patch do a search and check the double comma in authors facets.
- Apply the patch
- Do a new search
- Check if authors facets as a double comma
Sponsored-by: KEEP SOLUTIONS
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This patch updates the seed data from the target list at
http://www.loc.gov/z3950/lcserver.html#addr.
Comment: new target works. updated deleting and reloading
sample targets.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
I agree with Galen that this may need to be incorproated as a follow-up
for current installations. Works fine for new installs
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Thanks to Marcel for spotting these issues.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Prior to this patch, C4::VirtualShelves::Page did not make sure that
the itemtype images that it chose when displaying itemtype images for
biblio-level itemtypes were for the correct interface, so
even on the OPAC the Intranet icons were requested. On standard
installations, intranet-tmpl is not available to the OPAC.
To test:
1) Set noItemTypeImages to "Show" and item-level_items to "biblio record"
2) Create a list and add an item with the default item type (942$c in
MARC21) set to something with an itemtype image associated with it.
3) View the list in the OPAC.
4) If you are an a standard install, the itemtype image will be a broken
link. If on a dev install, you can confirm with Firebug or the like
that the image is pulled from /intranet-tmpl.
5) Apply patch.
6) Run `prove t/db_dependent/Koha.t` to confirm that the behavior of the
routine used to retrieve the image URL is correct. (Note that you
must have an item type with the code 'BK')
7) Refresh the list, noting that the display is now correct/the image is
pulled from opac-tmpl.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
It works as expected. All tests in Koha.t passed.
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
In a librairies network, we would like to declare specific values just
for one (or more) library.
Here we implement the ability to associate categories, patron attributes
types and/or authorised_values with librairies (branches).
This patch adds 3 new association tables:
- categories_branches ( association table between categories and branches )
- authorised_values_branches ( association table between
authorised_values and branches )
- borrower_attribute_types_branches (association table between
borrower_attribute_types and branches )
Plan test:
- Create (or modify) categories, patron attributes and
authorised_values and link it with one (or more) library.
- Set one of these librairies
- Go to one of the multiple pages where this specific value must be displayed
and check that it does appear.
- Set a library not concerned.
- Check on the same pages this value is doest not appear.
A page list:
cataloguing/addbiblio.pl
cataloguing/additems.pl
members/members-home.pl
members/memberentry.pl
acqui/neworderempty.pl
tools/modborrowers.pl
and others :)
Please say me if filters don't work on some pages.
Signed-off-by: Delaye Stephane <stephane.delaye@biblibre.com>
Signed-off-by: Koha Team Lyon 3 <koha@univ-lyon3.fr>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Suppressions : I suppressed some indexes not existing in Unimarc : 603, 502,
504
Corrections :
- Places : 651 was Marc21 => I put the right value (607)
- Topics : 600a => 600ab (name/surname) ; 604a => 604at (author/title)
To test, take a record with 607, 600ab, 601ab, 604at, do a research matching
this record, and check if facets looks nicer that before...
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Works as described. 607 for Places is very useful! Other tweakings make sense.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
- Subroutine prototypes used at line 115, column 1. See page 194 of PBP. (Severity: 5)
- "return" statement with explicit "undef" at line 1112, column 4. See page 199 of PBP. (Severity: 5)
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This patch enables the shelving location facet as an
alternative to the branches fact in two situations:
A) SingleBranchMode is enabled
B) There is only one branch in the branches table
Test Plan:
1) Catalog multiple items with different shelving locations.
2) Test enable by enabling SingleBranchMode
3) Test enable by deleting all but one branch
Based on initial patch by Ian Walls.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Tested cases 2) and 3) successfully in OPAC and staff client
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
For the authorised values LOST and DAMAGED, if an OPAC description
is defined for the given value, display that description in the OPAC
rather than the generic description.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Since we are going to be storing third-party Javascript libraries in
koha-tmpl/opac-tmpl/lib and koha-tmpl/intranet-tmpl/lib, we want to make
sure that "lib" is not picked up as a theme in the system preferences
editor.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch removes the AmazonReviews and AmazonSimilarItems
features from the OPAC and staff client. With on Amazon
feature remaining, cover images, the *AmazonEnabled preference
is also removed in favor of checking the *AmazonCoverImages
preference. Two other system preferences, AWSAccessKeyID and
AWSPrivateKey are removed as they were required only by the
removed features.
Handling of book cover images from Amazon is unchanged.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Turned on amazon covers in opac and staff client and all
worked as expected. Then tested to make sure other cover image
services still worked and they do.
Signing off.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This is for MARC 21 only.
Made following changed:
- In getFacets in C4/Koha.pm added item type facet for 952y and 942c
- In getRecords in C4:Search.pm added code to get description of itemtype codes
- facets.inc in both staff and opac to show item types related label in the facets block
To test:
Add records such that a certain itype (say BK) is present in both 942c and 952y in two DIFFERENT records.
Run a search where both test records are present. Test to see if itype types are presented in the facets block (both OPAC and staff).
Click on the itype (say BK), both the test records should appear in the refined results. This shows that the feature works for both 942c and 952y.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Ian Walls <koha.sekjal@gmail.com>
QA Comment: fixed capitalization in template includes according to HTML4 coding
guideline ("Item types" instead of "ItemTypes")
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This feature will add the option of displaying a select quote
for the day on the OPAC homepage. It will include the addition
of a QOTD editor in the tools section of the staff interface
which will allow the addition, editing, and deletion of quotes.
A single system preference will enable/disable the display of
the QOTD on the OPAC homepage. A new granular permission will
also be added to conrol user access to the QOTD editor tool.
Possible extentions to this would be code to allow alternate
quote selection algorithms to be added to vary how the currently
displayed quote is selected from the table of quotes.
This patch is a squash of the following work:
--Adding quotes table to kohastructure.sql and updatedatabase.pl
Note: This patch is intended for a MySQL based installation only.
That means that it includes backticks because that is what is required
at this point in history to install Koha correctly on a MySQL based
installation.
Feel free to port this over to the Pg stuff in the data/Pg directory.
--Adding system preference to control display of QOTD on OPAC main page
--Adding sample quote data
These quotes are taken from various US presidents. I'm not sure these
are applicable to the rest of the world, so I'm leaving it to translators
and others to add sample quote data for other languages.
--Adding edit_quotes user permissions
--Squash with other db related patches in this series
--Adding quotes editor pages to tools
--Adding QOTD editor link to tools homepage
--Integration of DataTables into QOTD Editor
--Impleminting jEditable into the quote editor
--Adding delete and add option to editor
--Fixing OPAC display so the QOTD div does not show if no quote is returned
--Also removing useless code from tools/quotes.pl
--Adding spans around QOTD foo in opac-main.tt
--Also fixing quote selection logic to accomodate the possibility of
a single quote in the db a litte better.
--Changing timestamp column header to a more user-friendly 'Last Displayed'
--Fixing bug in quote selection logic. This bug caused a situation where
when the table had only a single quote with an id greater than 1 in it,
no quote would be selected.
--Fixing up sorting in the quote editor table. --jcamins
--Adding span element to quote separator --jcamins
--Overriding the default empty table message supplied by datatables-strings.inc
--Adds missing page heading
--Adds beginning of click-for-help elements.
--Refactors delete functionality to allow selecting of quotes to delete,
enabling multi-delete.
--Refactors saving added quote functionality so that striking <Enter>
saves the new quote.
--Refactors canceling aded quote functionality so that striking <Esc>
cancels the new quote.
--Removing debug console.log statements
--Implementng the YUI button widget/toolbar used on other pages.
--Adds a 5px radius to all YUI buttons to bring them into
conformity with the general trend toward rounded corners
--Fixes capitalization in quote editor
--Implements improvements suggested by jcamins and oleonard
--Adds DataTables Plugin dataTables.fnReloadAjax.js
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Add 700$b to UNIMARC author facets.
Other facets subfields could be added now. For example, other subjects
subfields.
Following patches are required to handle better MARC21 subfields and choose
other subfields to deal with UNIMARC format.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Tested under both MARC21 and UNIMARC. Does not cause any regressions with
MARC21, and offers the possibility for better faceting there in the future.
Works as advertised with UNIMARC.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
The functions getitemtypeimagedir and getitemtypeimagesrc
in Koha.pm were using the system preference 'template'
when they should be using 'opacthemes' instead.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>