Changing the framework in the MARC editor immediately after duplicating
a bib record no longer clears the fields.
This patch changes the Changefwk Javascript function so that it passes
the "op" value and the "biblionumberdata" (as the biblionumber) from
addbiblio.pl back to itself, when submitting the form in order to
change the framework.
The reason we need to do this is because the form in addbiblio.tt
is hard-coded to always submit an "op" value of "addbiblio". Currently,
we need to have it hard-coded to "addbiblio", because all the magic
happens in addbiblio.pl when there is an "op" of "addbiblio". If we
always passed the "actual" "op" value, such as "duplicate", nothing
would ever happen when we clicked "save". It seems to me that this
is a flaw in the design of addbiblio.pl.
If we pass the "op" and "biblionumber" when changing frameworks, we're
able to tell addbiblio.pl that we're still wanting to "duplicate" this
"X" biblionumber. However, by having the form still hard-coded to
"addbiblio", when we hit save, the form will do the magic, check if
it's a duplicate, and save the record (or prompt for action if it
is a duplicate).
--
I also noticed that if you make changes to a record, then change
the framework before saving, your changes get cleared (since the
original record from the database is loaded when the page reloads).
It seems to me that this is a bug. Changing the framework should
change the layout while preserving the content. I think most users
would assume that when changing the framework.
This patch also introduces another hidden input into addbiblio.tt and
the Changefwk Javascript called "changed_framework". Basically, if
the Changefwk Javascript is run, it tells addbiblio.pl that the
framework is changed, and it uses the posted data from the form
(which we have been modifying) instead of reloading the record from
the database.
--
Test Plan:
A) Before Applying Patch:
To Show That Changing the Framework Erases All Fields When
Duplicating a Record:
1) Go to any bib record
2) Go to Edit > Edit as new (duplicate). You should see filled
in fields.
3) Change the framework to any other framework than the one
that is currently specified.
4) Note that every single field is now blank
To Show That Changing the Record then Changing the Framework
Ignores Changes, When Editing a Record
5) Go to any bib record
6) Go to Edit.
7) Change the title of the record to "I've changed the title".
8) Change the framework to any other framework than the one that is currently specified.
9) Look at the title. You'll notice it is the original title, and NOT "I've changed the title".
B) Apply the Patch
Also, clear your memcache and shift+refresh your screen. You don't want to use cached templates/javascript.
C) After Applying the Patch
Repeat Steps 1-3 and 5-8.
You should now notice that changing the framework when duplicating the item does not clear all the fields.
You should also notice that any changes you make prior to changing the framework will still exist after changing it.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
In additem.pl, in the code that generates item form you find:
@values = $itemrecord->field($tag)->subfield($subtag) if ($itemrecord && defined($itemrecord->field($tag)->subfield($subtag)));
This patch adds the check of $itemrecord->field($tag) undef.
I did not found a way to test it because item tag is always defined
when editing an item, but it would be safer/prettier to add this check.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passed-QA-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
When editing a biblio, the bug 7883 introduces the "save and continue
editing" feature. After saving, the page is loaded with the first
tab selected. This patch refresh the page with the same tab selected.
Test plan:
1/ Edit a biblio.
2/ Click on the 5th tab.
3/ Click on the "Save and continue editing" button.
4/ You are redirected on the same page with the same tab selected
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Several cataloging plugins make some simple AJAX GET calls via the YUI
AJAX feature. This code can be easily converted to jQuery.
To test, link each plugin to the relelvant field by editing your MARC
stucture. Confirm that functionality is unchanged.
For callnumber.pl and callnumber-KU.pl, test by linking to 952o.
callnumber.pl is triggered on blur of (when you focus on and click away
from) the 952o entry field. callnumber-KU.pl is triggered by clicking
the "..." link.
stocknumberam123.pl should be linked to 952i. If your data doesn't
already have information stored for inventory number, modify at least
one record to add one. The plugin is triggered on blur of the 952i
field. It should increment the highest value inventory number stored in
your system.
unimarc_field_010.pl is UNIMARC-specific, so I'm guessing about its
functionality. I tested it by linking the plugin to MARC21 field 020a.
The plugin is triggered on blur of the affected field (020a in my test).
You can confirm that the plugin returns valid data by using a tool like
Firebug to view the XHR response. Or if you're not using UNIMARC you can
hack the plugin to update a different field instead (line 57,
/^tag_210_subfield_c/ ). I tried "245_subfield_c" instead of
"210c_subfield_c." Nonsensical, but useful for testing.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Tried the 3 MARC21 plugins. Did not try the Unimarc one, but it's exactly the same code change.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Test Plan:
1) Enable IndependantBranches
2) Apply this patch
3) Run updatedatabase.pl
4) Verify that the system preference still functions correctly
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Patch reworked from Elliot Davis' original patch - but using bootstrap instead of YUI.
This patch adds the ability for catalogers to save and continue editing when adding new biblios.
To Test:
Select an existing item or create a new item in cataloging using your favorite framework.
Edit the bib
From the save menu in the dropdown, select the new option of "Save and continue editing"
If you are missing required fields you should still be prompted to fill them in before saving
Once all required fields are in place you should be allowed to save, and you will be redirected to tab 0.
The original patch claims to redirect to the original tab, but I never observed that behaviour from it - this patch merely takes what was in the original and makes it boostrap.
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Revised patch according to QA comments. No more dependent from bz 9780.
At present, merging records breaks the link order/record, except
if an item of the deleted record is used in the order.
This is a serious issue for libraries creating items on receipt.
This patch moves existing orders from deleted record to destination record.
It creates a new function Acquisitions::GetOrdersByBiblionumber,
that could be used by other patches later.
To test :
Check the problem :
1. Set syspref AcqCreateItem = Create an item when receiving an order
1. Create a basket with one order
2. Put the record used by this order in a list
3. Put an other record in the list
4. Merge the 2 records, keeping as a reference the record NOT used in the order
5. In the order, you will see for that order "Deleted bibliographic information..."
6. Apply the patch
7. Repeat steps 1-4
8. In the order, you will see the title/author of the kept record.
9. Set syspref AcqCreateItem = Create an item when placing an order
10. Repeat steps 1-4 (an item will be created)
11. In the oreder, you will see the title/author of the kept record
(it is already the case at present. the patch should not alter this behavior)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test plan, test suite and QA script pass.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Test plan:
Same as previously.
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>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Works. No errors.
Without patch and normal staff user, logged out
With patch, normal staff, valid output.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This plugin, for pseudo-authority-control of publisher information,
used YUI autocomplete to pull existing publisher data from the
biblioitems table. Despite its name it is not UNIMARC-specific.
It assumes publisher name data is saved in biblioitems.
This patch converts the autocomplete to jQueryUI. The search
script has been amended to return valid JSON. The template has
been modified to enable the jQueryUI autocomplete and to add
structure more consistent with other popups.
To test, link the publisher name field in your MARC structure to
the unimarc_field_210c_bis.pl plugin. Open a MARC record for
editing and click the "tag editor" link to launch the plugin.
Type the first few letters of a publisher which exists in your
database. You should get an autocomplete menu of publishers
which match your search. Select one and click the "choose"
button to fill the field in the MARC editor.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: work as described. No errors.
Test: link 260b to plugin. Edit record and search first letters
of present editors. Menú appears and can select and fill value.
Why plugin 210c_bis talk about field 225a?
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Plugin now works correctly for me, even when linked
to 260$b in a MARC21 installation. All tests and QA script
pass.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Someone at the library education in Oslo told me that it would be
better to have the default for 000/17 set to 1, instead of 2 as it
is today.
To reproduce:
- Run through the Web-installer in Norwegian and choose NORMARC as
the MARC dialect
- Go to Home > Cataloging > Add MARC record and start to add a new
record
- Click in the 000 field and it should be filled with:
" nam a22 2 4500"
- Reload the page, then open the value builder for 000 and click on OK
- 000 should get filled with the same string as above
To test:
- Apply the patch and repeat the steps from above. The default value
for 000 should now be:
" nam a22 1 4500"
(Don't be confused by the 1s and the 2s. A value of 1 in position 17
means "level 2", and a value of 2 means "level 1" - that is how it
is defined in the "standard":
1 = Nivå 2, iflg. Katalogiseringsregler
2 = Nivå 1, iflg. Katalogiseringsregler)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Small changes. Didn't test in a NORMARC installaton, but
trusting Magnus with this and seeing no reason why it
shouldn't work.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This patch does several things:
- Set the default for 008/15-17 to "no " (yes, there is space at the end)
- Link from 008/15-17 in the value builder to NORMARC country codes
- Set the default for 008/35-37 to "nor" (by setting the
DefaultLanguageField008 syspref)
- Link from 008/35-37 in the value builder to NORMARC language codes
- Fix a missing <tr> around field 35-37
To reproduce:
- Run through the Web-installer in Norwegian and choose NORMARC as
the MARC flavour
- Go to Home > Cataloging > Add MARC record and add a new record
- Click in the field for 008. The default should look like:
130415t xxu||||| |||| 00| 0 eng d
^^^ ^^^
- Reload the page and open the value builder for 008. Problems:
- The text for 15-17 links to MARC21 country codes
- The default for 15-17 is xxu
- The text for 35-37 links to MARC21 language codes
- The default for 35-37 is eng
- If you choose e.g. "Monografier" in the top dropdown then click
on "OK" the window does not close
To test:
- Apply the patch and run through the Web-installer again, selecting
Norwegian and NORMARC
- Go to Home > Cataloging > Add MARC record and add a new record
- Click in the field for 008. The default should look like:
130415t no ||||| |||| 00| 0 nor d
^^^ ^^^
- Reload the page and open the value builder for 008.
- Check that...
- The default for 15-17 is "no " (with a space at the end)
- The link goes to NORMARC country codes
- The default for 35-37 is "nor"
- The link goes to NORMARC language codes
- Select something from the top dropdown and click "OK". Check that the
window closes and that the values that are entered into the 008 field
matches what you chose in the popup window.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Trusing Magnus is right, so testing for any regressions mainly, all good
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Only changes NORMARC specific plugin and system preferences
files. Changes all seem logical to me.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Searching for stdid: Standard ID, srchany: RAW (any) somehow did not work
anymore.
Probably my fault :) Note that these two fields are in Cataloging Z3950 search
and not in Acquisition.
Fixing encoding problems: When adding -utf flag for CGI in acqui/z3950 and
cataloging/z3950, the decoding statements in C4/Breeding, Z3950Search should be
removed.
Test plan:
Search in Cataloging with:
Standard ID: 9782358670043 on LOC
RAW (any): musee [add an accent aigu on first e] on LOC -- Add diacritic!!!
Search in Acquisition
Somewhere, does not matter, but use a diacritic.
A note: My git version still has a hard time with utf8. Need to upgrade to version 1.7.10 to resolve this..
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described. No errors
Without patch z39.50 search for example Std ID OR musee gives no results,
with patch there are.
No problems in acq search.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Good catch, passes all tests and QA script.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This alternative patch modifies the script where the input markup is
built and adds an alternative configuration for textareas. This gives
the textareas explicit "cols" and "rows" attributes. I think this
solution is preferable to a style fix because it solves the bug while
eliminating some invalid markup (no "size" or "maxlength" attributes on
textareas, which are invalid without explicit dimensions).
To test, add a nice big chunk of text to an existing item's item field
like "Public note" (952$z), save, and edit again. The field should now
be displayed in a more comfortably-sized textarea.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
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>
This patch replace use of CGI::scroll_list() to show list of branches.
In two files, marc21_linking_section.pl and unimarc_field_4XX.pl,
the scrolling list is created but not used in the template file,
so the code is removed.
Also minor renaming/normalizing of variables.
To test:
1) Install with some branches, records and patrons
2.1) Select a record, click 'Place hold', select user,
there is a library pull-down next to 'Pickup at:',
list is ordered case sensitive
2.2) Go to Reports > Average loan time,
next to Library is a pull-down,
list without order
2.3) Go to Reports > Catalog by item type,
next to 'Select a library' is a pull-down,
list is ordered case sensitive
2.4) This is tricky, go to Reports home,
change last part of URL 'reports-home.pl' with
'manager.pl?report_name=issues_by_borrower_category'
(can't find a direct link), next to 'Select a library'
is a library pull-down,
list without order
2.5) Edit/Add a patron, on section 'Library management'
there is a library pull-down, case sensitive
2.6) OPAC, as logged user, make a suggestion or hold,
there is library pull-down, correct order
3) Apply the patch
4.1) Repeat 2.1), correctly ordered list
4.2) Repeat 2.2), correctly ordered list
4.3) Repeat 2.3), correctly ordered list
4.4) Repeat 2.4), correctly ordered list
4.5) This is a bit more work
There are 3 possible situations to test:
A) No branches, must show a message that are no
libraries defined
B) New patron, must show a correctly ordered
list of branches, current branch selected
C) Edit patron, must show a correctly ordered
list of branches, patron branch selected
4.6) Small changes on variable names, so retest 2.6)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
With the inclusion of this patch, all searches will (try) to use
QueryParser for handling queries for both the bibliographic and authority
databases if UseQueryParser is enabled. If QueryParser is unavailable,
UseQueryParser is disabled, or the search uses CCL indexes, the old
search code will be used.
To test:
1) Apply patch.
2) Run the unit test with `prove t/QueryParser.t`
3) Enable the UseQueryParser syspref.
4) Try searches that should return results in the following places:
* OPAC (simple search)
* OPAC (advanced search)
* OPAC (authorities)
* Staff client (header search)
* Staff client (advanced search)
* Staff client (cataloging search)
* Staff client (authorities)
* Staff client (importing a batch using a match point)
* Staff client (searching for an item for adding to a label)
* Staff client (acquisitions)
* Staff client (searching for a record to create a serial)
* ANYWHERE ELSE I HAVE FORGOTTEN
5) Disable the UseQueryParser syspref. Repeat at least some of the
searches you did above.
6) If all searches worked, sign off.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Searching still works as expected for variuos places.
QueryParser syspref seemed to be enabled by default
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Reviewing Bug 9649, this bug comes up.
This patch correctly sort frameworks by description.
To test:
1) Go to Cataloguing home, button 'New record' shows
unordered list of frameworks
2) Apply the patch
3) refresh, the list must be correctly sorted.
Revised to sort using uppercase.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
It's been a while since this bug is around. This normalization is only
used for UNIMARC and yields a fatal error when those variables are set
on (at least) MARC21 setups.
Regards
To+
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: update comment
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Seems like simple omission when passing $pars hash to
Z3950Search function.
Test scenario:
1. select any Z39.50 search form and enter valid ISSN
2. verify that you don't get any results from remote servers
3. apply this patch and re-check that results are now availble
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Added a new system preference to set the UNIMARC field 100 default language.
The default value for that system preference is 'fre'.
Changed Biblio.pm to use the system preference:
- if the language is bad filled in the preferences it uses 'fre' as default value
- only replaces the language when the field 100 is empty
- if the language is filled with the plugin only replaces the positions 25-28 to 'y50'
Signed-off-by: Rolando Isodoro <rolando.isidoro@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
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>
Remove some debug warnings, fix indentation
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
As a first step in realizing the goals of report 6536 (Z3950 Search improvements), this patch moves identical code in acquisition and cataloging to module level.
A followup deals with formatting.
Note that this patch should not change any behavior.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I did not find any regression
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.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>
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>
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>
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
It works: (1) merging's still effective, and (2) two new error messages appear
in staff .po file after update it.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Some Z39.50 server may use the MARC-8 encoding, which uses separated
diacritics. By forcing a normalization, all imported records will have
combined diacritics.
Records with separated diacritics might not show up in Zebra searches if
the search terms use accented characters.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
http://bugs.koha-community.org/show_bug.cgi?id=8610
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
checked it still works after the patch with UNIMARC and BNF server (that
provide utf-8 records)
Bugzilla description (from delaye):
1 / Create a list of authorised values(INVENTORY_NUMBER). In which the
code is the prefix and the description the last number assigned.
2/A space between the prefix and number.
3 / From a holding record, after indicate the prefix when you click on
the plugin -> koha search the last number from authorised values
assigned in the list and increment n +1 level meter
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Works as advertised (see provisos below). Tested the following:
1) INVENTORY category has only authorised value 'PR' => PR prefix filled
in, everything else gives an error.
2) INVENTORY category has two authorised values, both work.
3) INVENTORY category has no authorised values, nothing is incremented
4) Barcode contains numbers, nothing is changed.
Two potential gotchas (neither of them significant enough to warrant
changing, in my opinion):
1) Prefixes must consist only of uppercase alphabetical characters.
2) Negative numbers are padded with zeros to the left of the negative
sign.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
If countitems not set to 1 it was not being declared
but is referred to outside this scope, generating
runtime warnings and test failure
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This plugin works like the unimarc plugin unimarc_field_4XX. It
insert: $9 -> biblionumber $w -> 001 $t -> 245$a (title )
$x -> 022$a (ISSN) $z -> 020$a (ISBN) The search is done on
'any' index. Data are inserted only in the working record.
To insert data in the connected record, you need to open
the other record.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
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.
Rather than treating ISBN and ISSN as the same, this patch breaks
them out into separate parts of the query, as well as changing
the truncation attribute to enable right truncation (the correct
behavior for the ISBN field in MARC21, and valid behavior in
UNIMARC).
Signed-off-by: Joseph Alway <jbalway@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
In addition to adding a new barcode plugin, this commit begins
refactoring the barcode generation code using a new module,
C4::Barcodes::ValueBuilder. From the POD:
This module is intended as a shim to ease the eventual transition
from having all barcode-related code in the value builder plugin
barcode.pl file to using C4::Barcodes. Since the shift will require
a rather significant amount of refactoring, this module will return
value builder-formatted results, at first by merely running the
code that was formerly in the barcodes.pl value builder, but later
by using C4::Barcodes.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Implement auto-incrementing EAN-13 barcodes
To make this work, C4::Barcodes::next was modified to call process_tail with
new incremented value so that process_tail can generate correct checksum.
Since process_tail is currenlty not used by any barcodes, this change is safe.
C4::Barcodes is used by addbiblio.pl when adding multiple records, while value_builder
is used in all other cases.
Test scenario:
1. prove t/Barcodes_EAN13.t
2. KOHA_CONF=/etc/koha/sites/fer/koha-conf.xml prove t/db_dependent/Barcodes.t
this will check C4::Barcode implementataion
3. in systempreference change autoBarcode to incremental EAN-13 barcode
4. edit two items of any biblio assigning barcodes and verify that numbers
are increasing. Have in mind that last digit is check digit, and it
doesn't increment, but is calculated from barcode itself. Example with
checksum in brackets: 000000086275[2], 000000086276[9], 000000086277[6]
5. Add Item and verify that it gets assigned next barcode
6. Add & Duplicate item and verify barcode increase
7. Add Multiple Copies and verify that barcode increase for each copy
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
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>
A logic bug in the original code adding DefaultClassificationSource
caused the default not to be used (the last used value was used instead)
The bug was fixed in additem by bug 2398 but addbiblio's use
of the code was not fixed.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
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>
The HTML for authority search results was previously generated in
C4::AuthoritiesMarc::BuildSummary, which meant that it couldn't be
translated. This patch moves the HTML generation into the templates
by introducing a new authorities-search-results.inc include file for
both the OPAC and the Intranet which contains a Template::Toolkit BLOCK
for rendering the authority results. Fixes the authority autocomplete
by removing the untranslatable strings, and returning only data from
the database.
To test:
1. Apply patch.
2. Test authority searching in the authority module in the staff client
3. Test authority searching in the authority control plugin in the
cataloguing module (and the plugin for UNIMARC field 210$c, if you
can figure out how)
4. Test authority searching in the OPAC
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested with MARC21 data.
1) Applies cleanly on current HEAD.
2) Authority search in staff
Patch works wonderfully, only some small notes found while testing that have
not been changed by this patch:
ENH note: Search terms show up nowhere. So if I want to change the sorting, I have to
repeat typing in my search term. Even if the form does not keep the term, it
should be visible somewhere on the screen what I searched for.
ENH note: The pagination on top and at the bottom of the result list are formatted
differently. Maybe some missing CSS?
ENH note: Also the authority type is not shown at all in the result list.
3) Cataloguing and authority plugins
The autocomplete function works nicely.
ENH note: There is only one small enhancement
I could imagine. If I start my search from 100 it will limit the search to
'persons' but the autocomplete will also suggest other authorities. It would
be a bit cleaner, if the autocomplete could limit by the appropriate authority
type too. Very nice feature.
Plugins overall work nicely. Created links include the authority numbers and work
correctly.
4) Authority search in OPAC
Works nicely. Display is consistent, but translatability greatly improved.
ENH note: In staff we use 'Details' in OPAC we use 'View full heading' - I wonder
if maybe 'details' would be better understandable for users?
Note: Code reveals a system preference 'AuthDisplayHierarchy' that is
not available in the system preference editor. I talked to Jared and he
will work on this feature later on. For now it's no regression, as the
preference has never been visible.
When a new marc record is added, the language code in field 008 Range 35-37 defaults to Englih ("eng"). This makes cataloguing inefficient and error-prone for librarians if most of the bibliographic data is e.g. in German or in French.
Test:
- Apply patch
- Edit preference DefaultLanguageField008, fill in e.g. 'ger'
- Go to Cataloguing, Add marc Record
- Click in field 008. Language code should read 'ger' (instead of 'eng')
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
This patch modifies the permissions required to access the cataloging
home page (addbooks.pl) so that the user requires edit_catalogue,
edit_items, or fast_cataloging permission.
Users with only edit_catalogue permission will only see biblio edit
links. Users with edit_items permission will only see item edit
links. Users with fast_cataloging permission will only be able to
view information about contents of the catalog--useless for them
but I'm not sure how better to handle it.
To test, log in as a user with each of the above permissions
enabled separately and in combination and test access.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.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>
1) Removes unused subroutine get_host_control_num
2) Fixes small mistake, correct subfield for ISBN 020 is z
3) Checks system preference for correct marcflavour instead of
assuming MARC21
4) Fixes MARC21 to not use author(), because it would also add
fields like $w and $0 to 773$a
5) Fixes MARC21 to not use title(), but 245$a, because it would
also add too many subfields.
6) Adds definitions for UNIMARC and includes NORMARC
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Works properly with all supported MARC flavours.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Simplifies the adding of analytical records and ensures that
the data populating the 773 tag is correct. From the host record
add child record is selected and create bib is entered to generate
a new record with host item tag populated from the parent
Caveat: currently prepare_host_field only returns a field for
MARC21. Values for UNIMARC and NORMARC can easily be added but
should be done by someone familar with those formats
and conventions
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
To test:
- create a new record
--> if you enter a value in 001 anaytics will use that in $w for linking later
--> if you set 000/LDR 19 - Multipart resource record level to 'a' there will
be a link from the parent record to the child record later
- save your record and go to the staff detail page
- in toolbar select 'New' > 'New child record'
- check field 773, 245 and 001 from the parent record should have been copied there
- check links between child and parent in staff
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed conflicts in all 3 files.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Works properly for MARC21, and follow-up adds support for NORMARC and UNIMARC.
While typing an authority, will automatically propose authorities (similar to
autocompletion for patron search if activated)
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Tested searching for authorities with and without autocomplete. Note that
this is most useful when used in the "Main entry" box instead of the
"Main entry ($a only)" box.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Corrected tabs to spaces in auth-finder-search.inc while resolving merge
conflict.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Squashed patch incorporating all previous patches (there is no functional
change compared to the previous version of this patch, this patch merely
squashes the original patch and follow-up, and rebases on latest master).
=== TL;DR VERSION ===
*** Installation ***
1. Run installer/data/mysql/atomicupdate/bug_7284_authority_linking_pt1
and installer/data/mysql/atomicupdate/bug_7284_authority_linking_pt2
2. Make sure you copy the following files from kohaclone to koha-dev:
etc/zeradb/authorities/etc/bib1.att,
etc/zebradb/marc_defs/marc21/authorities/authority-koha-indexdefs.xml,
etc/zebradb/marc_defs/marc21/authorities/authority-zebra-indexdefs.xsl,
etc/zebradb/marc_defs/marc21/authorities/koha-indexdefs-to-zebra.xsl, and
etc/zebradb/marc_defs/unimarc/authorities/record.abs
3. Run misc/migration_tools/rebuild_zebra.pl -a -r
*** New sysprefs ***
* AutoCreateAuthorities
* CatalogModuleRelink
* LinkerModule
* LinkerOptions
* LinkerRelink
* LinkerKeepStale
*** Important notes ***
You must have rebuild_zebra processing the zebraqueue for bibs when testing this
patch.
=== DESCRIPTION ===
*** Cataloging module ***
* Added an additional box to the authority finder plugin for "Heading match,"
which consults not just the main entry but also See-from and See-also-from
headings.
* With this patch, the automatic authority linking will actually work properly
in the cataloging module. As Owen pointed out while testing the patch,
though, longtime users of Koha will not be expecting that. In keeping with
the principles of least surprise and maximum configurability, a new syspref,
CatalogModuleRelink makes it possible to disable authority relinking in the
cataloging module only (i.e. leaving it enabled for future runs of
link_bibs_to_authorities.pl). Note that though the default behavior matches
the current behavior of Koha, it does not match the intended behavior.
Libraries that want the intended behavior rather than the current behavior
will need to adjust the CatalogModuleRelink syspref.
*** misc/link_bibs_to_authorities.pl ***
Added the following options to the misc/link_bibs_to_authorities.pl script:
--auth-limit Only process those headings that match the authorities
matching the user-specified WHERE clause.
--bib-limit Only process those bib records that match the
user-specified WHERE clause.
--commit Commit the results to the database after every N records
are processed.
--link-report Display a report of all the headings that were processed.
Converted misc/link_bibs_to_authorities.pl to use POD.
Added a detailed report of headings that linked, did not link, and linked
in a "fuzzy" fashion (the exact semantics of fuzzy are up to the individual
linker modules) during the run.
*** C4::Linker ***
Implemented new C4::Linker functionality to make it possible to easily add
custom authority linker algorithms. Currently available linker options are:
* Default: retains the current behavior of only creating links when there is
an exact match to one and only one authority record; if the 'broader_headings'
option is enabled, it will try to link to headings to authority records for
broader headings by removing subfields from the end of the heading (NOTE:
test the results before enabling broader_headings in a production system
because its usefulness is very much dependent on individual sites' authority
files)
* First Match: based on Default, creates a link to the *first* authority
record that matches a given heading, even if there is more than one
authority record that matches
* Last Match: based on Default, creates a link to the *last* authority
record that matches a given heading, even if there is more than one record
that matches
The API for linker modules is very simple. All modules should implement the
following two functions:
<get_link ($field)> - return the authid for the authority that should be
linked to the provided MARC::Field object, and a boolean to indicate whether
the match is "fuzzy" (the semantics of "fuzzy" are up to the individual plugin).
In order to handle authority limits, get_link should always end with:
return $self->SUPER::_handle_auth_limit($authid), $fuzzy;
<flip_heading ($field)> - return a MARC::Field object with the heading flipped
to the preferred form. At present this routine is not used, and can be a stub.
Made the linking functionality use the SearchAuthorities in C4::AuthoritiesMarc
rather than SimpleSearch in C4::Search. Once C4::Search has been refactored,
SearchAuthorities should be rewritten to simply call into C4::Search. However,
at this time C4::Search cannot handle authority searching. Also fixed numerous
performance issues in SearchAuthorities and the Linker script:
* Correctly destroy ZOOM recordsets in SearchAuthorities when finished. If left
undestroyed, efficiency appears to approach O(log n^n)
* Add an optional $skipmetadata flag to SearchAuthorities that can be used to
avoid additional calls into Zebra when all that is wanted are authority
records and not statistics about their use
*** New sysprefs ***
* AutoCreateAuthorities - When this and BiblioAddsAuthorities are both turned
on, automatically create authority records for headings that don't have
any authority link when cataloging. When BiblioAddsAuthorities is on and
AutoCreateAuthorities is turned off, do not automatically generate authority
records, but allow the user to enter headings that don't match an existing
authority. When BiblioAddsAuthorities is off, this has no effect.
* CatalogModuleRelink - when turned on, the automatic linker will relink
headings when a record is saved in the cataloging module when LinkerRelink
is turned on, even if the headings were manually linked to a different
authority by the cataloger. When turned off (the default), the automatic
linker will not relink any headings that have already been linked when a
record is saved.
* LinkerModule - Chooses which linker module to use for matching headings
(current options are as described above in the section on linker options:
"Default," "FirstMatch," and "LastMatch")
* LinkerOptions - A pipe-separated list of options to set for the authority
linker (at the moment, the only option available is "broader_headings," which
is described below)
* LinkerRelink - When turned on, the linker will confirm the links for headings
that have previously been linked to an authority record when it runs. When
turned off, any heading with an existing link will be ignored.
* LinkerKeepStale - When turned on, the linker will never *delete* a link to an
authority record, though, depending on the value of LinkerRelink, it may
change the link.
*** Other changes ***
* Cleaned up authorities code by removing unused functions and adding
unimplemented functions and added some unit tests.
* This patch also modifies the authority indexing to remove trailing punctuation
from Match indexes.
* Replace the old BiblioAddAuthorities subroutines with calls into the new
C4::Linker routines.
* Add a simple implementation for C4::Heading::UNIMARC. (With thanks to F.
Demians, 2011.01.09) Correct C4::Heading::UNIMARC class loading. Create
biblio tag to authority types data structure at initialization rather than
querying DB.
* Ran perltidy on all changed code.
*** Linker Options ***
Enter "broader_headings" in LinkerOptions. With this option, the linker will
try to match the following heading as follows:
=600 10$aCamins-Esakov, Jared$xCoin collections$vCatalogs$vEarly works to
1800.
First: Camins-Esakov, Jared--Coin collections--Catalogs--Early works to 1800
Next: Camins-Esakov, Jared--Coin collections--Catalogs
Next: Camins-Esakov, Jared--Coin collections
Next: Camins-Esakov, Jared (matches! if a previous attempt had matched, it
would not have tried this)
This is probably relevant only to MARC21 and LCSH, but could potentially be of
great use to libraries that make heavy use of floating subdivisions.
=== TESTING PLAN ===
Note: all of these tests require that you have some authority records,
preferably for headings that actually appear in your bibliographic data. At
least one authority record must contain a "see from" reference (remember which
one contains this, as you'll need it for some of the tests). The number shown
in the "Used in" column in the authority module is populated using Zebra
searches of the bibliographic database, so you *must* have
rebuild_zebra.pl -b -z [-x] running in cron, or manually run it after running
the linker.
*** Testing the Heading match in the cataloging plugin ***
1. Create a new record, and open the cataloging plugin for an
authority-controlled field.
2. Search for an authority by entering the "see from" term in the Heading Match
box
3. Confirm that the appropriate heading shows up
4. Search for an authority by entering the preferred heading into the Main
entry or Main entry ($a only) box (i.e., repeat the procedure you usually
use for cataloging, whatever that may be)
5. Confirm that the appropriate heading shows up
*** Testing the cataloging interface ***
6. Turn off BiblioAddsAuthorities
7. Confirm that you cannot enter text directly in an authority-controlled field
8. Confirm that if you search for a heading using the authority control plugin
the heading is inserted (note, however, that this patch does not AND IS NOT
INTENDED TO fix the bugs in the authority plugin with duplicate subfields;
those are wholly out of scope- this check is for regressions)
9. Turn on BiblioAddsAuthorities and AutoCreateAuthorities
10. Confirm that you can enter text directly into an authority-controlled field,
and if you enter a heading that doesn't currently have an authority record,
an authority record stub is automatically created, and the heading you
entered linked
11. Confirm that if you enter a heading with only a subfield $a that fully
*matches* an existing heading (i.e. the existing heading has only
subfield $a populated), the authid for that heading is inserted into
subfield $9
12. Confirm that if you enter a heading with multiple subfields that *matches*
an existing heading, the authid for that heading is inserted into
subfield $9
13. Turn on BiblioAddsAuthorities and turn off AutoCreateAuthorities
14. Confirm that you can enter text directly into an authority-controlled field,
and if you enter a heading that doesn't currently have an authority record,
an authority record stub is *not* created
15. Confirm that if you enter a heading with only a subfield $a that *matches*
an existing heading, the authid for that heading is inserted into
subfield $9
16. Confirm that if you enter a heading with multiple subfields that *matches*
an existing heading, the authid for that heading is inserted into
subfield $9
17. Create a record and link an authority record to an authorized field using
the authority plugin.
18. Save the record. Ensure that the heading is linked to the appropriate
authority.
19. Open the record. Change the heading manually to something else, leaving
the link. Save the record.
20. Ensure that the heading remains linked to that same authority.
21. Change CatalogModuleRelink to "on."
22. Open the record. Use the authority plugin to link that heading to the
same authority record you did earlier.
23. Save the record. Ensure that the heading is linked to the appropriate
authority.
24. Open the record. Change the heading manually to something else, leaving
the link. Save the record.
25. Ensure that the heading is no longer linked to the old authority record.
*** Testing link_bibs_to_authorities.pl ***
26. Set LinkerModule to "Default," turn on LinkerRelink and
BiblioAddsAuthorities, and turn AutoCreateAuthorities and
LinkerKeepStale off
27. Edit one bib record so that an authority controlled field that has already
been linked (i.e. has data in $9) has a heading that does not match any
authority record in your database
28. Run misc/link_bibs_to_authorities.pl --link-report --verbose --test (you may
want to pipe the output into less or a file, as the result is quite a lot of
information)
29. Look over the report to see if the headings that you have authority records
for report being matched, that the heading you modified in step 2 is
reported as "unlinked," and confirm that no changes were actually made to
the database (to check this, look at the bib record you edited earlier, and
check that the authid in the field you edited hasn't changed)
30. Run misc/link_bibs_to_authorities.pl --link-report --verbose (you may want
to pipe the output into less or a file, as the result is quite a lot of
information)
31. Check that the heading you modified has been unlinked
32. Change the modified heading back to whatever it was, but don't use the
authority control plugin to populate $9
33. Run misc/link_bibs_to_authorities.pl --link-report --verbose
--bib-limit="biblionumber=${BIB}" (replacing ${BIB} with the biblionumber
of the record you've been editing)
34. Confirm that the heading has been linked to the correct authority record
35. Turn LinkerKeepStale on
36. Change that heading to something else
37. Run misc/link_bibs_to_authorities.pl --link-report --verbose
--bib-limit="biblionumber=${BIB}" (replacing ${BIB} with the biblionumber
of the record you've been editing)
38. Confirm that the $9 has not changed
39. Turn LinkerKeepStale off
40. Create two authorities with the same heading
41. Run misc/migration_tools/rebuild_zebra.pl -a -z
42. Enter that heading into the bibliographic record you are working with
43. Run misc/link_bibs_to_authorities.pl --link-report --verbose
--bib-limit="biblionumber=${BIB}" (replacing ${BIB} with the biblionumber
of the record you've been editing)
44. Confirm that the heading has not been linked
45. Change LinkerModule to "FirstMatch"
46. Run misc/link_bibs_to_authorities.pl --link-report --verbose
--bib-limit="biblionumber=${BIB}" (replacing ${BIB} with the biblionumber
of the record you've been editing)
47. Confirm that the heading has been linked to the first authority record it
matches
48. Change LinkerModule to "LastMatch"
49. Run misc/link_bibs_to_authorities.pl --link-report --verbose
--bib-limit="biblionumber=${BIB}" (replacing ${BIB} with the biblionumber
of the record you've been editing)
50. Confirm that the heading has been linked to the second authority record it
matches
51. Run misc/link_bibs_to_authorities.pl --link-report --verbose
--auth-limit="authid=${AUTH}" (replacing ${AUTH} with an authid)
52. Confirm that only that heading is displayed in the report, and only those
bibs with that heading have been changed
If all those things worked, good news! You're ready to sign off on the patch
for bug 7284.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Rebased on latest master and squashed follow-up, 16 February 2012
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Rebased on latest master, 21 February 2012
Signed-off-by: schuster <dschust1@gmail.com>
This patch changes the default value of the 06 char in 008
from 't' to 'b.' This change allows for a valid 008 field
if no dates are entered in 07-14.
To test:
1. Create a new MARC record (prior to patch application).
2. Click on the 008 field to auto-populate.
3. Note that the 06 char is 't'.
4. Apply patch.
5. Create a new MARC record.
6. Click on the 008 field to auto-populate.
7. Note that the 06 char is now 'b'.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Confirm fix works per test plan.
Signed-off-by: Melia Meggs <melia@test.bywatersolutions.com>
A library using an inhouse callnumbering system wants to be able to generate the next available call number not already in use. This custom call number plugin returns the next callnumber not already in use once a correct prefix has been entered. The prefixes are four to six letters, space, then one or two numbers.
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>
In the data entry form, there is a (hidden) functionality for note subfields.
MARC21 500-599 and UNIMARC 300-399 subfields are displayed in TEXTAREA rather
than INPUT tags. This is good since usually notes can be pretty long. But if
one of those fields is marked in the framework as 'hidden', then it isn't
displayed at first when you create a record and when you expand the field by
clicking on its label the field is displayed in a one-line INPUT tag.
To reproduce this bug:
- Modify your framework:
MARC21: 500$a, hidden=1
UNIMARC: 300$a, hidden=1
- Create a new biblio record with this framework
- Open the tab containing 500 or 300 field
- 500 or 300 tab is collapsed
- Click on 500 or 300 label to expand the field
- 500$a or 300$a is displayed in a one-line INPUT tag, not in a TEXTAREA
as it should
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test plan works. Also checked cloning and deleting
subfields still works.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works as advertised. Simplifies code too. Well documented test plan.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
- Adding subtitle to the display of titles to be merged
- Adding a link to preview the MARC record of titles to be merged
- Fixing up markup of form to improve appearance
- Correcting breadcrumbs
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
ModBiblio() - set framework to "" if "Default"
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
All 4 tests passed:
Test 1: Merge two records with the same framework
Desired result: shouldn't get any prompting to pick a framework, and the
same framework should be used
Test 2: 2 records, different frameworks, into the kept record's framework
Desired result: merge with kept records framework used
Test 3: 2 records, different frameworks, into the discarded record's
framework
Desired result: merge with used records framework used
Test 4: 2 records, different frameworks, into a third framework
Desired result: merge with third framework used
Changed searchResults() interface
Added trailing \n when parsing OpacHiddenItems to make YAML happy
XSLTParse4Display() and buildKohaItemsNamespace() take hidden
items as input param
Removed numbering from the search results, looks wrong with
hidden items
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.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>
When no size info is available, an empty string is
sent to the TT (if nothing is sent, the TT engine
will display another information, irrelevant for Koha).
Signed-off-by: Gaetan Boisson <gaetan.boisson@biblibre.com>
Works beautifully!
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>
The 3 files had use strict missing. The patch add the use strict and modify what's needed to work with it
4XX.pl also has some perlcritic fixes:
Variable declared in conditional statement at line XXX, column 9. Declare variables outside of the condition. (Severity: 5)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Links to UNIMARC documentation were being shown when marcflavour =
NORMARC. This patch hides the doc link functionality for NORMARC
by hiding:
1. The checkbox for turning doc links on/off
2. The hyperlinked questionmarks
This patch does not hide e.g. the JavaScript functions related to
the doc link functionality, in order to make it easy to add
doc links for NORMARC in the future (hopefully).
The doc link functionality was passing a variable called MARC21
(based on the contents of the marcflavour syspref) to the
template and testing the value of this to decide if MARC21 or
UNIMARC doc links were to be shown. I have replaced this variable
with he standard/full marcflavour syspref, in order to make it
possible to test for more then two MARC dialects.
To test:
- Set the marcflavour syspref to MARC21, NORMARC and UNIMARC, one
after the other.
- Check that correct doc links are shown for MARC21 and UNIMARC
on the cataloguing screen, and that no checkbox and no doc links
are displayed for NORMARC.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described - thx for the great test plan!
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
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>
Holds are now shifted and reordered by date placed.
Holds already marked waiting, or in transit are not reordered.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
It messes up javascript default values
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
A corrected version of the patch of 6 June 2011.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
TransformHtmlToMarc(): changed interface - no point passing params when
they can be accessed from $cgi
Signed-off-by: Liz Rea <lrea@nekls.org>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Fixing improperly nested template logic inside HTML tags in MARC
editor. Modifying script to stop tag attribute markup from being
passed to the template directly in favor of using template logic.
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>
- Adding similar icons for cloning and deleting tags
- Adding icon for the "Tag editor" links ("...")
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
This patch also fixes giving the first callnumber with a given prefix.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.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>
Currently, the default for this MARC control field is hardcoded in the plugin code of marc21_field_008_authorities.pl (two occurrences).
This patch moves it into a new syspref. If this pref should not exist, the old hardcoded value is used. Authorities preference file is updated too.
A warning is generated if the length of the field is not correct.
Furthermore, the default for position 14 (heading use: main or added entry)
should be dependent on the authority type. For CHRON_TERM, GENRE/FORM and
TOPIC_TERM, it should be b (not appropriate) instead of a (appropriate).
Rebased on March 17. Follow-up patch added for installation pref.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
* 010 now don't care of - or no - in the isbn
* 225a window now higher to have all buttons displayed
Signed-off-by: Sophie Meynieux <sophie.meynieux@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Adding - to regexp for matching branch code. Wondering if other characters should not be added too.
Signed-off-by: Julian Maurice <julian.maurice@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>
Due to changing to T-T $template->pama("lang") return undef,
now is $template->{param} the right value.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Remove some unnecessary checks when check of error is
sufficient. Make the order in some cases more logical
Should remove some possibilities of runtime warning noise.
Although some calls belong to the 'Nothing could
ever go wrong' school have added some warnings
Signed-off-by: Christophe Croullebois <christophe.croullebois@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This patch makes z3950_search.pl handle the situation properly, and z3950_search.tmpl
show a proper message instead of a program error. All this, in case the javascript
checks that alert the user (that at least one target has to be chosen) are by-passed.
Regards
To+
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed small translation problem in javascript alert message.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Two things are happening.
First, the SELECT does not account for a branchcode greater than 2 chars.
This is fixed by just selecting the final four digits representing the
incremental suffix from the barcode field.
Second, the incremental suffix (4 digits) is not rolling back over to zero when
reaching 9999.
This pattern probably needs help. It should allow for cataloging of 10000 items
per month as is. I would not recommend doing barcode numbering this way, but
need to support it since it is in use in at least one library.
This patch also impliments strict and warnings per Bug 2505
Signed-off-by: Stéphane Delaune <stephane.delaune@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Biblio framework has 3 entry points controlling if input box are
displayed by default in data entry form:
- 'mandatory' flag at field level
- 'mandatory' flag at subfield level
- 'hidden' flag at subfield level
It doesn't work as it should (?):
- All subfields are expanded (shown) if their field is mandatory
- A subfield containing anything is always expanded whatever it contains
- A mandatory subfield is always expanded
- An hidden subfield isn't expanded.
Default framework having 0 in all marc_subfield_structure.hidden, by default
all subfields will be expanded.
TO BE INTEGRATED IN RELEASE NOTES:
Koha sysadmin should have to edit its frameworks to add hidden=1 in
appropriate subfields.
Signed-off-by: Stéphane Delaune <stephane.delaune@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
If the subfield is set as mandatory with an empty default value, an
empty value is added in the selectbox and this value is selected by
default. Before, the first element was automatically selected, so it was
easy to forget to set this mandatory value.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
- XSLT for the OPAC
- Value_builders for lesder, 007 and 008
- Default NORMARC framework
- Reverse MARC logic of some subs, so MARC21 is default (and works for NORMARC)
- Add NORMARC as an option to the syspref marcflavour
- Add record.abs for NORMARC
- Add NORMARC and nb as options to Makefile.PL
- Add etc/zebradb/lang_defs/nb/sort-string-utf.chr
- Copy MARC21slim2OAIDC.xsl to NORMARCslim2OAIDC.xsl
Some things are still missing, e.g.:
- XSLT for Intranet
- More MARC21slim2*.xsl transformations
When modifying an existing biblio, the "Save and edit items" option in the
"Save" menu did not redirect to the edit items screen. Instead, it redirected to
the regular details screen.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.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>
Modification of the intranet cataloguing plugin for 006/008 fields to allow
select a type of material and change the positions available to enter the data.
Data are hard stored in xml files to allow easy translation and processing through
Javascript and JQuery-AJAX.
Bug 3013 - Fix selection of combo and trailing whitespace
Bug 3013 - Fix selection of combo
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Save button and duplicate confirmation redirects must respect
the edititems permission: Users without permission to edit items
should not be redirected to the edit items screen.
Signed-off-by: Nicole 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>
Currently, the plugin marc21_field_005 and its unimarc opponent fill field 005
when this field gets focus. This implies that updating a record without
touching this field does not update 005.
At the same time, a user could accidentally delete a character in the 005 when
having focus. This mutilated field value will be saved however.
I would suggest to add a few lines to ModBiblioMarc in Biblio.pm to ascertain
that adding or updating a record always updates 005 in marc21 as well as
unimarc.
Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
- Adding "readonly" class to readonly fields to guarantee
that readonly state is indicated visually
- Adding "locked" icon to the background of readonly
fields for additional visual feedback
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
More podchecker cleanups to eliminate warnings / errors
Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
working through the master branch to eliminate all
podchecker warnings/errors
Actual improvement to the quality of the POD will
come later (hopefully with assistance of others)
Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
The way an existing value was tested was wrong. 0 is a valid value but a
false value for Perl.
=> replace privious proposal.
[3.2] Should also apply.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Patch from Tomás Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
- Adding inline preview/import menu to match cataloging z39.50 search
- Improving behavior of inline menu on both pages
- Adding white space to ISBN/ISSN output on both pages to allow
line breaks, improving table width and horizontal scrolling.
Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
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.
My investigation finds that the problem in Internet
Explorer was not with the spaces in the URL but
with the spaces in the "name" attribute of the pop-up
window. Converting spaces to underscores allows
the plugin links to work correctly.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Removed instances of 'use YAML' that were either completely
unnecessary or which were used only in debug code. Also
removed a needless import of Data::Dumper.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Check OPACXSLTResultsDisplay instead of XSLTResultsDisplay when
determining whether to use the XSLT bib results stylesheet for
OPAC search results.
In the process, added a new $search_context parameter to
C4::Search::searchResults() to specify whether results
are to be served up for the staff interface or for the
OPAC.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This patch change the way to retrieve the value to insert in the record.
The way it was done, was verry ugly.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
A follow-up to the fix for Bug 4121, the user should be able to control whether
the action of saving a bibliographic record takes them to the add item screen
or the detail screen, independently of whether they are adding or modifying the
record.
The addition of a "split button" would leave the default action in place if the
user clicked the "main" part of the button. Clicking on the menu would give the
user specific choices.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This plugin will automatically add brackets around the value typed in at the time the field's focus is removed ( onblur ).
If the text in the field is already enclosed in brackets, it will do nothing.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Looks like someone has done some search/replace on character codes with
patterns that match the address. Oops.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Give the user the ability to merge two records, one being kept and the other deleted.
Selection of the records to merge can be done from virtualshelves.
In addbook.pl, the framwork options are sorted in random order. They should be
sorted in alphabetical order of value or code.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
The breeding id, rather than coming from the database, was set by a counter.
Not so good links in the search results that way.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
In the cataloging search results from the catalog, the result set would
decrease by one per page. Past page 19 there was an empty table. The reason
is that SimpleSearch gives the result set ( 20 records here ), and
searchResults expects to trim the result set to just the 20 records we want.
This changes the call to searchResults() to have a 0 offset to the result set.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
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>
Numbers in perl with leading zeros are interpreted in octal
Ensure that comparisons are done using string operators
or where appropriate use the MARC::Field method
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This patch, fix the unimarc 700-4 plugin, adding the plugin_parameters() function.
And add an eval, that permit to have error in plugin, but don't die the editor.
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>
Removed unused toggle variable from z3959_search.pl. Added __odd__ variable to table in z3950_search.tmpl for non-javascript users.
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>
Coding by Rick Welykochy <rick@praxis.com.au>
[1] Three new system preferences to enable particular
bib record views in the staff interface:
viewMARC
viewLabeledMARC
viewISBD
Implements enhancement 2642.
[2] New button in the regular and cataloging search results
pages in the staff interface to allow the operator to redo
the search against Z39.50 targets instead of the Koha database.
[3] Added copyright date and edition to cataloging and Z39.50 search results.
Implements enhancement 2640.
Feature sponsored by MassCat.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
It turns out that the "blank" record created by MARC::Record->new()
has a leader, so now I explicitly create one in addbiblio.pl. I
also realized I can't count. :-)
Modified per comments by Joe and Galen to keep SetMarcUnicodeFlag
and move it and the leader set to earlier in the process.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Changed the plugin so that the form for editing the MARC21
leader now sets postion 9 (character coding) to 'a' (UCS/Unicode)
and no longer gives the cataloger the option to change it. Koha
uses UTF-8 exclusively for MARC records, and a number of bugs
can be triggered by storing MARC21 bib and authority record
whose Leader/09 is anything other than 'a'. Since internal
routines are increasingly ensuring that the MARC21 Leader/09 is
set to 'a', it doesn't make sense to give catalogers the idea
that it's possible (or a good idea) to set the Leader/09 to any
other value.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
biblios can now be added librarian name automatically when cataloguing.
add "user" in the Default value of the biblio
[RM doc note: in other words, if in the MARC framework you set
the default value of a subfield to 'user', the username of the
cataloger will be entered into that subfield whenever you create
or modify that bib in the Koha bib editor.]
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
When clicking on the '...' of an headings field
in the bib editor, the authority search that
popped up did not take the default search
string from the bib field. Fixed by making
sure that openAuth is always used to do the
popup link.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
It turns out that the "blank" record created by MARC::Record->new()
has a leader, so now I explicitly create one in addbiblio.pl. I
also realized I can't count. :-)
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 makes sure that MARC21 authorities have a minimal
Leader, 008, and 040. If an authority record is created through
BiblioAddsAuthority it generates a 670 based on information in
the bib record.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Delivered version only had Text material type; this patch includes
all 14 material types with appropriate values for each.
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>
This patch modifies z3950 search result page in order to
use jquery to highlight rows rather than an explicit
css class.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
this patch fix the unimarc plugin 4xx to work with cloned fields, the id of the div wasn't replaced when the field was cloned.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This patch fix two bugs:
* tag duplication
If you try to duplicate an autority tag, the javascript call is kept, and the id is not modified, and fields are not emptied.
* openAuth() call
The id called on duplicated fields is not the great id.
And the different values sent to auth_finder.pl to pre-fetch datas from firstname, etc... send values from all same tags, and not from the selected tag.
(cherry picked from commit 40115eb110)
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Adding two js functions :
getSubfieldcode(tagsubfieldid) returns the subfieldcode from tagsubfieldid
(tag_XXX_subfield_Y_WWWW_TTTT returns Y)
getTagInputnameFilter(tagsubfieldid)
(tag_XXX_subfield_Y_WWWW_TTTT returns tag_XXX_subfield_._WWWW)
I think those two functions are much useful when cataloguing.
openAuth now takes all the information for Heading search of authorities.
TODO A javascript DOM Navigation would be better.
This js works, but is surely slower than DOM would be.
Still, it seems that our DOM tree is quite hard to decode.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This includes part of a patch from Henri-Damien Laurent
that could not be applied because Chris and Joe patches
happened to win the race.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Failure to pass the $framework parameter by dateaccessioned.pl causes
GetMarcFromKohaField to return 0,0 which breaks the value builder. The
patch
submitted corrects this.
This patch is build against the current 3.1.x HEAD, however, this bug
also
affects the 3.0.x codebase and should be applied there as well.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Failure to pass the $framework parameter by barcode.pl causes
GetMarcFromKohaField to return 0,0 which breaks the value builder. The
patch
submitted corrects this.
This patch is build against the current 3.1.x HEAD, however, this bug
also
affects the 3.0.x codebase and should be applied there as well.
fbcbug 4
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This plugin use the 'ISBN' field(010$a) to search the "publishercode"(editor) and set it in as 210$c.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
You actually *could* input data into those fields, but it wasn't
immediately obvious, because the field size was "4" and the
value was " ". You couldn't type anything in until you
backspaced over the spaces that were there by default.
UPDATE 2008-11-05: Make absolutely sure that those values
are 4 chars long (via JavaScript)
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>