In current implementation (mostly commented out in this patch)
uses heuristic to guess which strings need decoding from utf-8
to binary representation and doesn't support utf-8 characters
in templates and has problems with utf-8 data from database.
With this changes, Koha perl code always uses utf-8 encoding
correctly. All incomming data from database is allready
correctly marked as utf-8, and decoding of utf8 is required
only from Zebra and XSLT transfers which don't set utf-8 flag
correctly.
For output, standard perl :encoding(utf8) handler is used
so it also removes various "wide character" warnings as side-effect.
Test scenario:
1. make sure that you have utf-8 characters in your biblio
records, patrons, categories etc.
2. try to search records on intranet and opac which contain
utf-8 characters
3. install language which has utf-8 characters, e.g. uk-UA
dpavlin@koha-dev:/srv/koha/misc/translator(bug_6554) $
PERL5LIB=/srv/koha/ perl translate install uk-UA
4. switch language to uk-UA and verify that templates
display correctly
5. test search and Z39.50 search and verify that caracters
are correct
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I followed the test plan, adding utf-8 characters to library names,
patron categories, titles, and authorized values. I tried the uk-UA
translation and everything looked good.
When performing Z39.50 searches for titles containing utf-8 characters I
got results which were still occasionally contaminated with dummy
characters [?] but I assume this is Z39.50's fault not the patch's.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Already signed, add mine.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
When using fast cataloguing to create a biblio and item on the fly, workflow looses datas when a duplicate is detected.
This comes from the use of a mix of circborrowernumber and borrowernumber in forms.
This patch corrects by using always circborrowernumber in fast cataloguing workflow.
Also adds html and uri escape for barecode where necessery.
Test plan :
With duplicate :
- Go to a borrower circulation page
- Enter a non existing barcode
- Enter a due date
- Click on "Check Out"
=> a message says the barcode was not found
- Click on "Fast cataloguing"
=> The biblio edition page appears with fast cataloguing framework
- Fill mandatory fields by using an existing ISBN
- Click on "Save"
=> a yes/no message says "Duplicate record suspected"
(Choosing yes will brake fast caloguing workflow, in this case librarian should create an item and checkout again)
- Click on "No"
=> The item edition page appears with barcode already filled
- Fill mandatory datas
- Click on "Add item"
=> Borrower circulation page appears again, check that item has been checked out with the specified due date
You may test without duplicate
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Tested following the plan and by fast cataloging a non-duplicate.
All works as expected.
Signed-off-by: koha.aixmarseille <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
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>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Passed-QA-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Pre-filling of items: remember what was in the previous item filled, to be able to create multiple items quickly.
By default, all subfields are prefilled when the PrefillItem syspref is on, unless you specify which fields
you want to prefill in the SubfieldsToUseWhenPrefill syspref.
With a value of "f u v", only the $f, $u and $v will be prefilled, for example.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Rebased and QAed.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Solves software error when editing items for record with invalid
analytic.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
$dbh needs our scoping when using "Add item" to prevent error
Can't call method "prepare" on an undefined value at /srv/koha/cataloguing/additem.pl line 88.
Test scenario:
1. start intranet with plack
2. select one Edit items on one record
3. fill in new item and click on "Add item"
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
If AcqCreateItem=ordering, when you receive an order, you now have a
list of all created items and checkboxes that permit you to choose which
items you want to receive.
A 'Edit' link open additem.pl page in a popup to allow you edit the
items before receiving them (popup is automatically closed after
modification, and items table is automatically updated)
If quantity is set manually in the text box, the appropriate number of
checkbox are checked from top to bottom and a warning shows up if
quantity is greater than order quantity
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Simple fix, a special case was added for the fast add framework
in the case that an item was being checked out that had not been
catalogued. In that case, the barcode was being passed as a parameter
through addbiblio.pl to additem.pl.
This barcode param was used to overwrite the existing value, so if
no barcode param was passed ( which is only the case with fast adds
from the circ screen ), the barcode field would appear empty in the
items editor.
This commit causes that special case code to check for an existing
barcode value first, and only use the cgi parameter 'branch' in the
case that there is no existing barcode value.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Editing barcode of fast added item now works. Passes t xt
Recommend this for 3.6 release.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
1/ It now works with neworderempty.pl
2/ The set_to_today function was moved from
additem.tt to dateaccessioned.pl (so it's
available to all pages using the plugin)
Signed-off-by: Julien Sicot <julien.sicot@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This patch makes it so that you can click 'edit items' and actually
edit items.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Works as advertised.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
The original patch for 5533 removed the Lost status from the edit items screen; new items were not affected,
and batch changes could still be made, so this was not a consistent change.
This patch removes the filter that hid the Lost status dropdown, but then changes the default MARC framework
to hide this field by default (value -5). New installations will not see this status in the editor, unless
they manually activate it. This will enforce the semantics of using the "mark lost" options by default, but
provide a workaround for libraries that understand and accept the consequences of manually editing this field.
To test:
1. on an existing install, edit an item. you should have the Lost status visible
2. on a new install, editing or creating an item should not show the Lost status at all
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Some paths to the FA item-add screen didn't have a branch defined--if the param is set,
use it, otherwise, use the user's logged in branch.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Modified for syntax by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Some paths to the FA item-add screen didn't have a branch defined--if the param is set,
use it, otherwise, use the user's logged in branch.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
With the addition of the code from Bug 5528 (easy analytic record workflows),
UNIMARC 461$0 and MARC21/NORMARC 773$0 have special meanings. When you import
a record that uses those subfields for different data, you will get an error
in /cataloguing/additem.pl. A check should be added to be sure that
EasyAnalyticalRecords is enabled before trying to handle the 461$0/773$0 as
bib numbers for analytics.
Thanks to Frère Sébastien Marie for spotting this issue.
Signed-off-by: Frère Sébastien Marie <semarie-koha@latrappe.fr>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Using the delete all items function should now redirect back to the
biblio view specified in the BiblioDefaultView system preference.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Call LostItem() whenever item is lost.
LostItem() new arg - mark returned.
Disabled Lost Status on catalogue item edit.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
For follow up we need to explain how to hide the 952$1 (lost) from
the framework by putting it in the 'ignore' tab.
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Display links to parent biblios, show linked items in holdings, allow holds on
linked items. This uses MARC to maintain relationships.
Sponsored by the Mississippi Department of Archives and History and RapidRadio
Solution. Originally developed by Savitra Sirohi and Amit Gupta at OSSLabs, with
UNIMARC support added by Zeno Tajoli. Commits squashed and merge conflicts
resolved by Chris Cormack from Catalyst. Respect for NORMARC and some small
framework portability fixes made by Jared Camins-Esakov of C & P Bibliography
Services.
IMPORTANT NOTE: A bug in the 773 coding for MARC21 was corrected from the
original OSS Labs code. The 773s generated by the pre-release code did not have
the first indicator set to '0', which means that they were not supposed to
display. Going forward, the first indicator will be set correctly, but existing
records created with this code will no longer appear (they appeared before only
due to another bug). To correct this, you could globally (or, to make sure you
only modify records created with the Analytics tool, for records with 773$0)
change the first indicator of the 773 from blank to '0'.
== Background ==
An analytic record for an item is a more detailed, monographic biblio for an
item attached to a serial record . This is often used for special issues of a
journal that are released as books on their own (assigned an ISBN, as well as an
ISSN/volume/issue). It is important for researchers to be able to search for
these items both as issues of the serial, and as monographs. It is equally
important for the library to not have duplicate item records for the item in
question to have to keep synchronized.
== Establishing relationships ==
Analytical records are connected to items belonging to parent or host
bibliographic records. This can be accomplished by:
* From an analytical bibliographic record linking to an host item by providing
the item barcode as input
* From a host item by using option "analyze", this creates a new empty
bibliographic record with field 773 (MARC21) populated
* Running a new CLI script that establishes a relationship between the
analytical record and the host item identified by the barcode in the
analytical record's 773$o (MARC21)
== Connecting Records ==
The relationships are maintained in the MARC records, we have not used database
tables at all.
== MARC Representation ==
In MARC21/NORMARC we have used:
* 773$9 to store the Koha item number of the host item
* 773$0 to store the Koha biblio number of the host bibliographic record
The above fields are used to display the relationships in various screens in the
OPAC and the staff interface. Additionally, when populating field 773 with host
item's details, we have used following MARC 21 mapping:
* 'a' <= 100/110/111 $a (author main)
* 'b' <= 250$a (edition)
* 'd' <= 260$a, 260$b, 260$c (place, publisher, year)
* 'o' <= barcode
* 't' <= 245$a (title)
* 'w' <= (003)001 --> if no 001 is available, we can populate biblionumber
* 'x' <= 022$a (issn)
* 'z' <= 020$a (isbn)
In UNIMARC, this code uses:
* 461$9 to store the Koha item number of the host item
* 461$0 to store the Koha biblio number of the host bibliographic record
When populating field 461 in UNIMARC, the following mapping is used:
* 't' <= 200$a (title)
== Treatment of Holds ==
A key requirement was to allow holds to be placed on host items from the
analytical record. We have accomplished this by allowing holds on specific
copies only. Biblio level holds are not allowed. This ensures that holds are
placed on specific items that are relevant to the analytical record.
== Deleting host items with linked analytical records ==
As we have not used database tables to maintain relationships, we had to use
search to find out if any linked analytical records are present. If 1 or more
analytical are present, we do not allow deletion of items. This is similar to
what we see when we try to delete authority records.
== Importing analytical records ==
Analytical records can be imported using bulkmarcimport or the GUI tools. The
new CLI script can be executed after the import to establish relationships with
host items. The script will establish relationships using the host item's
barcode, the barcode must be present in 773$o of the analytical record.
== What if there are two or more copies of the host item? ==
The current design will require that there be two host (773) fields, one for
each copy.
== What if there is no barcode available for the host item? ==
It is still possible to establish a relationship, by populating 773$9 with the
host's item number. However the CLI script uses barcode in 773$o to establish
relationships so it won't work where barcodes are unavailable. Also from an
analytical record, it is possible to establish a relationship to a host item by
providing the barcode as input, this option will not be available as well.
Commits that added the following features were squashed by Chris Cormack (this
is not a list of every commit):
* Display links to host records from biblio detail screens
* Support for UNIMARC, respecting the system preference 'marcflavor'
* Support holds from the OPAC
* Ability to link to items belong to host records from a analytical record
* Display items belonging to host records in the moredetail page
* Ability to edit items belonging to host records, also ability to delink from
them
* Move get host items code into a C4 routine, also calling the new routine in
related perl scripts
* Move host field population to a C4 routine, all changes in pl files to call
new routine
* Allow only specific copy holds for analytical records plus changes to use new
C4 routines
* Support for holds on items linked via host records
* Storing bibnumber and itemnumber in subfields 0 and 9, plus other mapping
changes
* New command line script that establishes relationships between analytical
records and host items and bibs. The script looks for host field (MARC21 773)
in records, and based on barcode in subfield 'o' populates host bibnumber in
subfield '0' and host itemnumber in subfield '9'. The script can be run after
an import of analytical records, it can also be run in the crontab to maintain
the relationships
* Ability to create analytical records from items, to view linked analytics, and
prevent deletion of items that have linked analytics
* New template for catalogue/detail.pl (NOTE: not a new template file, just a
new way of displaying analytics), template displays linked analytics and
allows creation of analytical records
* New zebra index for item number in host fields. This index will be used to
display links to analytical records from host records
* Display title of host record instead of the phrase host record
* Using detail.tmpl for analytics tab instead of a new template file
* Improved qualification info prepration in Prephostmarcfield
* Check for linked analytics before deleting item
* Display link to host record and more meaningful anchor text for edit item link
* Analytical record: Unimarc index in record.abs and help in
create_analytical_rel.pl
* Adding a sys pref that controls display of options to create analytical
relationships
* Add host entry in XSLT stylesheet in staff item detail
* Added host record support to OPAC detail XSLT
* Adding 773$0 and 773$9 to all frameworks
* Adding 773 subfields 0 and 9 to default marc framework via updatedatabase.pl
* Display create analytics and used in links in catalog detail
* Fixed problem where analytical records not showing in OPAC search results
because GetMarcBiblio now needs a flag to add item records
* Fixed problem where analytics count was set to 1 for all records, not just
those with analytics
* Fixed catalogue detail page not to show analytics counts if count is 0
Conflicts:
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
kohaversion.pl
Co-author: Savitra Sirohi <savitra.sirohi@osslabs.biz>
Co-author: Zeno Tajoli <tajoli@cilea.it>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
If Fast Add is accessed from either the circulation homepage or cataloguing,
it should stay on the additem.pl page after saving the first item. Only when
a Fast Add is done in the middle of a circulation transaction should it redirect
back to circ/circulation.pl to complete that transaction.
This patch adds a conditional check for a borrowernumber input param; the presense
of such implies we're in the middle of a checkout. It's absense implies we should
remain on additem.pl
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Bugfix for problems when shelving cart used without In Processing settings
To test, with InProcessingToShelvingCart off, NewItemsDefaultLocation blank,
and ReturnToShelvingCart on, create a new item. Check the contents of the
location and permanent_location fields in its item record -- the same value
should be in both. Then run the item through checkin, and look at those fields
again. The location field should now be set to CART while permanent_location
should still have the original value. After the cart_to_shelf cron job runs
with the proper timing, check the item record again. Both location and
permanent_location should again be identical.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Scripts should be able to compile without warnings as a minimal test
a couple of variables are redeclared in the same scope generating
warnings. Remove the redeclations
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Adds a new routine, C4::Biblio::EmbedItemsInMarcBiblio, to
embed the items in the bib record when necessary:
* cataloging/additem.pl
* rebuild_zebra.pl
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Claire Hernandez <claire.hernandez@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
If the $value is provided by the item, use it, don't use the librarian branch !
Signed-off-by: Sophie Meynieux <sophie.meynieux@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This patch makes the additem screen default to selecting the currently set
library. If the library is unset, it will default to the first branch
alphabetically.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Squashed commit of the following:
commit 66cdb8804136803a3f626d183c8f192f61f3c7b1
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date: Fri Feb 4 12:55:10 2011 +1300
Bug 5691: Updating copyright statement
commit 79ef6c269afc9c644c51709a7657542a0fc6d7d6
Author: Chris Cormack <chrisc@catalyst.net.nz>
Date: Fri Feb 4 12:52:13 2011 +1300
Bug 5691 - Fixing a syntax error and tidying up some formatting
commit a66485dba113c05ed51a3b4ff19f788e335aa1f6
Author: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Date: Tue Oct 5 17:23:55 2010 +0200
(MT #1365) Delete all items
Using DelItemCheck in cataloguing/additem.pl
when deleting all items
commit fe845fd48ab22ff82ad6d8971c468c327b49f3c4
Author: Christophe Croullebois <christophe.croullebois@biblibre.com>
Date: Wed Sep 22 11:39:28 2010 +0200
(MT #1365) Delete all items
Now if IndependantBranches is on and a user try to delete all items, only the items of his branch will be deleted.
A message explain this fact.
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Followup: (MT #1365) Fixing up the English idiom
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Squashed commit of the following:
commit f441094d5095d165eab18340c983a831cce8f6e0
Author: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
Date: Mon Jul 5 20:33:23 2010 +0200
bug4263 followup : Can't blank subfields
Previous bug4263 reintroduced bug 2466: fix clearing item field
This keeps bug4263 followup to be assigned (donot blank dateaccessioned)
But also allow to blank item subfields.
commit 92889b766c41b48bdd0e3a33ca4b183b1e259805
Author: Nahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>
Date: Fri Apr 23 13:54:30 2010 +0200
(bug #4263) dateaccessionned is cleaned on item modification
Every item modification, date accessionned is cleaned, if there is no modification made, we must'nt reset to "undef" the value.
commit 5abb2db16b2564d32e84b7cc680acbc301d73179
Author: Nahuel ANGELINETTI <nahuel.angelinetti@biblibre.com>
Date: Tue Mar 2 09:57:33 2010 +0100
(bug #4263) fix the edition of items with repeatable subfields
The subfield management in item level is broken, fields are concatenated in one field, and if the librarian edit it, the values are not selected.
This big patch fix three things:
1) saving fields that are stocked in SQL(using koha2marc mapping) are now well cut and separated in _REAL_ subfields
2) loading records with repeatable subfields are now well returned
3) Editing items with repeatable fields works well
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Bug 4263 Removing extranious block of code
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
An earlier fix to stop branch values being overwritten in
edit items was causing the branch value to be unset when adding items
Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
The barcode field is not cleared/incremented properly when using the "Add and
Duplicate" option. Rather it is pre-populated with the previously used barcode
which causes additem.pl to return a duplicate barcode error if the cataloger
does not catch the mistake.
The problem is caused by the fact that the current item record is simply
duplicated and re-loaded into the form.
The solution is to add code which either pre-populates with the next barcode
number if the incremental pattern is set or clears the p subfield if one of the
various patterns using the javascript plugin is selected.
In reality C4::Barcodes should be implimented here along with all necessary changes elsewhere.
Ensure that the temporary processing location is always
set regardless of whether one item is added or multiple
copies are added at once.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Allows temporary locations corresponding to 'in processing' and 'shelving'
so that newly-created items, and newly-returned items do not show
immediately as a available. Three new system preferences govern the usage
of these features.
NewItemsDefaultLocation. If system pref NewItemsDefaultLocation is set to a location code,
all newly catalogued items will be set to the location set in this preference.
Location code must be a valid LOC authorized value type.
InProcessingToShelvingCart. if the system pref InProcessingToShelvingCart is turned on,
any items run through returns.pl with a location code for 'PROC', will be modified to
have a new location code of 'CART'.
ReturnToShelvingCart. If the syspref ReturnToShelvingCart is turned on,
all items returned other than confirmed holds will have a new location code of 'CART'.
Any item issued is automatically taken of the shelving cart.
Adds a cron script shelf_to_cart.pl which should be run hourly.
Updates all items with a location of CART to the item's permanent location.
The original location code is stored in the new items column 'permanent_location'.
Original Author: PTFS Contractor <dbavousett@ptfs.com>
This work co-sponsored by
Middletown Township Public Library, Middletown, NJ USA and
East Brunswick Public Library, East Brunswick, NJ USA
Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
In the previous patch,
- my @subf = $field->subfields;
- (defined @subf) or @subf = ();
is not equivalent to
+ my @subf = $field->subfields || ();
as, the results of $field->subields is interpeted in scalar
context, not list context, resutling in @subf containing
the number of subfields, not the subfield data itself, which
engenders the error
Can't use string ("1") as an ARRAY ref while "strict refs" in use
later on. Changing the operator to 'or' instead of '||'
fixes this.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Adding a new item should pre-select the library you are logged in at, where possible.
Use GetBranchesLoop. This solves indy branches filtering, and sort order problems.
Set default off of ->{selected}, to establish pre-selected branch.
Fix flags check in onlymine sub, so superlibrarian + other flags still gets everything.
Removed defined(@array) check, since perl -wc warns it is deprecated.
Note new FIXME for botched date processing.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Before this patch, we used to test for flags == 1, which was wrong when patron had all privileges.
This patch just adds a %2 to check that patron has superlibrarian privilege, and maybe something else we don't care.
I think I fixed it everywhere except in acquisition, that will be addressed by BibLibre new acquisition module.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This correct the html select default in additem.pl, and enforces use of
biblioitems.itemtype as the default in Items::AddItem. The code in
Items is to catch items added through MARC record staging.
Thanks to Joe Atzberger for suggestion.
[RM note: this patch means that an item's item-level item type,
once that item is added or updated via additem.pl,
now cannot be blank or NULL unless the biblio-level item type
is blank.]
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This patch depends on my previous one "Begin cleanup on additem" and
fixes one bug introduced in that patch.
Overhaul of additem sections to factor out common pieces especially attributes.
Plugin js vastly simplified and reimplemented in jquery. Performance improved.
Note that a particularly busy cataloging department should still leave
barcode blank for server-side autopopulation to avoid collision.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
REFACTOR logic out of conditional branches when the assignment ($nextop) is the same.
Be sure to EXIT after printing a redirect, instead of wasting clock filling in the
template for a process the user will never see. Remove the now inapplicable logic for
differentiation between "/cgi-bin" and "non /cgi-bin" installations. There is no
longer any /cgi-bin in the actual directory file path.
This does not fix the value_builder js errors like "Blurbarcode52251 is not defined",
but it does not cause them either (see Bug 2919).
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
staff client is defaulting to the ASNCR code instead of the blank above
For some reason the loop used to build the list of values was
setting the first value to the $value variable if $value wasn't
set already, and the default_value was inside rather than outside
the loop. I've removed the setting inside the loop and placed
the default value outide the loop. It's possible I just don't
understand what the original intention was.
There should be a documenation change at least for 3.0 to the effect that on systems
not running JavaScript, 'incremental' is the only option available for autoBarcode
although other options appear. A fix for this will hopefully appear in 3.2.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
a default installation:
1. Re-names several of the item fields to make more sense to catalogers and patrons
2. Remove links Non-public note from items.paidfor
3. Changes Non-public note to be hidden in the OPAC view
Fixes issues with the 'hidden' field in the framework, specifically:
1. the editor obeys the rules of possible values for hidden (>4, or <-4)
2. the OPAC MARC display obeys the rules of positive values meaning 'hidden in OPAC'
3. the staff MARC display now obeys the rules specified in the hidden values description
The new tables have the same structure and constraints
as the tables they archive with the following exceptions:
* borrowernumber and biblionumber in old_reserves can be
NULL
* the FK constraints (e.g., for itemnumber) on old_reserves
set the child column to NULL if the parent row is deleted
instead of deleting the child row.
* there is no FK constraint on old_issues.branchcode, allowing
a branch to be deleted without changing archived requests.
Some miscellaneous cleanup was done as part of this patch:
* GetMemberIssuesAndFines (C4::Members) now uses bind variables
* fixed POD for GetMemberIssuesAndFines
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Moved this function from an exported function in
C4::Biblio to a public but unexported function
in C4::Items. Added comment noting that this
is used only by additem.pl.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Introduced C4::Items module to separate items API
from biblio API. Details on changes will be
put in later commit messages.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
- bugfix: update items.cn_sort upon edit of item
- bugfix: make failure of a value_builder plugin non-fatal
- bugfix: remove references to non-existent plugins
from optional MARC21 frameworks
bookseller.pl
marc21_callnumber.pl
marc21_classcodes.pl
marc21_locationqualifier.pl
- bugfix: corrected trying to enter 'u*' fields twice in the 'CF'
format in the optional MARC21 frameworks; resulted in
most of the framework not being loaded
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
librarians can only add/edit/delete items on their own branches.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
when Logguing was ON, this resulted in an internal server error, thus the discovery of this bug.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
So.
There are no more errors on saving an item.
There are still little problems when you duplicate a subfield :
Display table is not adapted
When you reedit, all the duplicate field values are concatenated.
But apart from that, it works.
Donot have time enough to work on it these days.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Most of this commit by Joshua Ferraro.
updatedatabase changes by Galen Charlton.
Major changes:
This commit includes a lot of fairly major changes
to Koha's Biblio handling, largest is the addition
and deletion of several columns in the biblioitems,
items tables, as well as cleanup of deletedbiblioitems,
deleteditems tables. Some of the changes are simple
cleanup, but most have to do with improvements to
storage of call numbers in Koha.
Also, I had to clean up the _koha_* routines quite a
lot to make them work -- there was lots of data just
being lost because columns weren't being updated.
I'm still not completely convinced that the items
table is being treated as authoritative for items
data, investigating further.
DB Changes (updated in kohastructure.sql and in
updatedatabases):
ADDED:
biblioitems.cn_source ( auth value, CN_SOURCE, stores the source of the
call number: DDC, LCC, NLM, etc.)
biblioitems.cn_class ( plugin, marc21_callnumber.pl, helps fill in
the rest of the biblio-level fields)
biblioitems.cn_item
biblioitems.cn_suffix
biblioitems.cn_sort ( for zebra sorting, stored as a decimal number)
biblioitems.totalissues ( for counting the total times issued )
items.cn_source ( auth value, CN_SOURCE, stores DDC, LCC, NLM, etc.)
items.itemcallnumber ( plugin, marc21_itemcallnumber.pl, helps fill in
the itemcallnumber based on the record data )
items.cn_sort ( for zebra sorting, stored as a decimal number)
items.ccode ( auth value, CCODE, stores the Collection Code
of the item, can be used as call number prefix
by some libraries )
items.uri
items.materials
items.damaged
DELETED:
items.itype
items.cutterextra
biblioitems.classification
biblioitems.subclass
biblioitems.dewey
biblioitems.lcsort
biblioitems.lccn
biblioitems.ccode
DB version now 3.00.00.009.
Minor changes:
* Drop revision history from C4/Biblio.pm
* GetMarcAuthors now returns additional authors (7XX), not
main authors (1XX)
* Debug warnings in C4/Search.pm commented out
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Porting userinterface improvements from biblios to items.
I have to port that also into serialsadditems.
Maybe there could be a way to have only one place for MARCinput management.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
So, deal carefully with this commit pls, and check it for your setups, because the patch works for me, but I'm not sure to understand well why :\
Signed-off-by: Chris Cormack <crc@liblime.com>
So this implies quite a change for files.
Sorry about conflicts which will be caused.
directory Interface::CGI should now be dropped.
I noticed that many scripts (reports ones, but also some circ/stats.pl or opac-topissues) still use Date::Manip.
== Biblio.pm cleaning (useless) ==
* some sub declaration dropped
* removed modbiblio sub
* removed moditem sub
* removed newitems. It was used only in finishrecieve. Replaced by a Koha2Marc+AddItem, that is better.
* removed MARCkoha2marcItem
* removed MARCdelsubfield declaration
* removed MARCkoha2marcBiblio
== Biblio.pm cleaning (naming conventions) ==
* MARCgettagslib renamed to GetMarcStructure
* MARCgetitems renamed to GetMarcItem
* MARCfind_frameworkcode renamed to GetFrameworkCode
* MARCmarc2koha renamed to TransformMarcToKoha
* MARChtml2marc renamed to TransformHtmlToMarc
* MARChtml2xml renamed to TranformeHtmlToXml
* zebraop renamed to ModZebra
== MARC=OFF ==
* removing MARC=OFF related scripts (in cataloguing directory)
* removed checkitems (function related to MARC=off feature, that is completly broken in head. If someone want to reintroduce it, hard work coming...)
* removed getitemsbybiblioitem (used only by MARC=OFF scripts, that is removed as well)