To test:
1 - Apply patch, update database
2 - Note new syspref 'DumpSearchQueryTemplate'
3 - Leave it off
4 - Enable DumpTemplateVariablesOpac and Staff
5 - Search on staff and opac
6 - View the source
7 - Search for 'search_query' - you shouldn't find it
8 - Enable the new pref
9 - Repeat, but you should find the query
10 - Test staff/opac search and advanced search, cataloguing search, authority search, authfinder search, adding to a basket form a new biblio
11 - All should work and show the query
12 - This will work under both ES and Zebra
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Test plan:
1) Apply the patch
2) Have a Z39.50 endpoint with attr 31 defined - Library of Congress
supports this
3) Try to find some biblio records through Z39.50 using the new field
"Publication year"
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This does a few things:
* We fetch the cn_sort from the DB and use this rather than calculating based on DefaultClassificationSource
We were already pulling based on the items source, so this should not change things
* Rather than using JS to submit the form, it submits via html
* Fix subtitle display and add barcode (it was retrieved in one query but not used)
* Add option to apply different classification scheme to the search
To test:
1 - Add cn_browser.pl to the 'plugin' field in a framework for 952$o
2 - Edit an item on a record in that framework
3 - Enter an itemcallnumber
4 - Click the two dots to launch the callnumber browser
5 - Note the results
6 - Apply patch
7 - Repeat
8 - Note subtitles and barcodes are displayed in results
9 - Note callnumbers are appropriate
10 - Try changing the class source used
11 - Try this with differing dewey,lcc, and other callnumbers
12 - Ensure results are as expected
Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This fix permits to add an "Important" option to the marc structure pages.
Testing:
1) Apply the patch
2) Run updatedatabase.pl
3) Regenerate CSS
4) Define 100 as an "important" field ( Administration » MARC bibliographic framework » MARC structure ( Default Frameword) » Edit )
5) Define 100$a as an "important" subfield (Administration » MARC bibliographic framework » MARC structure (Default Frameword) » Subfield » Onglet a)
6) Edit a record to clear the field 100 (subfields are all blank)
7) Save the record.
8) Validate the following message:
A few important fields are not filled:
* tag 100 subfield a Nom de personne in tab
* Field 100 is important, at least one of its subfields should be filled.
Are you sure you want to save?
Sponsored by the CCSR ( http://www.ccsr.qc.ca )
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test:
1 - Go to Cataloguing
2 - New from Z3950
3 - Find an import a record
4 - Check the plack logs:
Use of uninitialized value in string ne at /kohadevbox/koha/cataloguing/addbiblio.pl line 565.
Use of uninitialized value in string ne at /kohadevbox/koha/cataloguing/addbiblio.pl line 580.
Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 711.
Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 715.
Use of uninitialized value $frameworkcode in string eq at /kohadevbox/koha/cataloguing/addbiblio.pl line 734.
5 - Apply patch
6 - Repeat
7 - No new errors
8 - Confirm selecting 'Default' from 'New from Z3950' dropdown also generates no errors
Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 22721 added use C4::Biblio in cataloguing/value_builder/barcode.pl.
This is missing in value builder barcode_manual.pl.
You get the error :
Undefined subroutine &Koha::FrameworkPlugin::GetMarcFromKohaField called at cataloguing/value_builder/barcode_manual.pl line 41.
Test plan :
1) Configure a subfield of item to use value builder barcode_manual.pl
2) Go to a record
3) Try to add a new item
4) Check the value builder is OK
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested with autobarcode==year-0001,0002
No internal server error, but generates a barcode now.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
and remove 'scalar' keyword in calls where it's not needed.
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This is still wrong, we should use page-numbers.inc, but that is a larger refactoring
This patch fixes non-QueryParser searches by simple getting an using the escaped query (query_cgi)
For QueryParser, we do what the QP code does, just uri escape the query - the way that SimpleSearch does the query parsing instead of the usual buildQuery suggest to me that we should probably switch all of this to use the general Zebra search.
The issues with reservoir should be their own bug
To test:
1 - Search for cat in cataloging search
2 - Get results and see you can paginate
3 - Search for "cat"
4 - Get results but subsequent pages empty
5 - Apply patch
6 - Repeat search for "cat"
7 - You can paginate
8 - Enable UseQueryParser syspref (don't worry about installing)
9 - Confirm can still search with quotes and paginate
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: George Williams <george@nekls.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Note that we change both cataloguing/additem.pl and C4/Items->PrepareItemrecordfordisplay
I can find no code that uses callnumber from the C4/Items sub, except for the itemrecorddisplay script
which is not called with an itemnumber from Koha and should be deprecated for REST or ILSDI or OAI (imho)
To test:
1 - Define itemcallnumber syspref as "082ab,092ab,9520,245a"
2 - Find a record with no items
3 - Ensure it has no 082 field, but an 092 field
4 - Go to add an item - itemcallnumber is empty
5 - Apply patch
6 - Go to add item, itemcallnumber should be the 092ab fields
7 - Delete the 092 field
8 - Go to add item, itemcallnumber should be the 245a
9 - Edit the callnumber to be "testing" and save item
10 - For should now show itemcallnumber="testing" as default
11 - Browse to http://localhost:8081/cgi-bin/koha/services/itemrecorddisplay.pl?itemnumber=## subbing the correct itemnumber
12 - Ensure the callnumber is defaulting to testing
13 - delete the item you created
14 - browse to URL above - callnumber should now be 245 again
15 - Add an 092 field to record and ensure it is now default callnumber
16 - Add an 082 field, it should now be default
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
The MARC::Field as_string method can join multiple subfield using a delimiter, this simplifies the code here
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
When the itemcallnumber system preference is defined, the item add form
pulls data from the specified tag and subfield(s) to pre-populate the
call number field. This update makes it possible to build the
prepopulated callnumber from more than just the first two subfields.
To test, apply the patch and update the itemcallnumber system preference
so that it includes more than two subfields. For instance, "092abef"
- Edit a bibliographic record and populate the specified subfields.
e.g. subfield a -> "One", b-> "Two", e-> "Three", f-> "Four".
- Save the record and go to the add/edit items screen.
- The call number field should contain a string which contains each of
the subfields you populated, concatenated with spaces: "One Two Three
Four."
- Test with other numbers of subfields.
- Test with an empty itemcallnumber preference.
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Use jQueryUI sortable to make fields and subfields moveable in the
MARC editor for both records and authorities.
This patch convert items from div's to ul's and consequently alter css
and js to match. It also replace the up arrow with a more adapted icon
(from font awesome).
Primary authorship by Elliott Davis.
To Test:
1. Add or edit a record in cataloguing module.
2. You should be able to move the fields and subfields around.
- You can click on any part of the element to drag it, the move
icon to the left of the item is a good place to do it.
=> You can only change the order of fields of the same tag.
3. Make sure all of the javascript driven fonctionnality still work :
- Duplicate fields/subfields
- Remove fields/subfields
- Using the tag editor for control fields or to link authorities
- etc
4. Reorder some fields/subfields and save the record.
5. Edit the record again.
6. The order in the editor should match the changes which were saved.
- Empty subfields should appear after the ones with content.
7. Repeat steps 1-6 with the authority editor.
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch modifies the cataloging plugin dateaccessioned.pl so that it
triggers the addition of a datepicker widget to fields it is linked
with. Despite its name the plugin can be used on any item field which
requires a date.
To test, apply the patch and make sure you have one or more item
subfields linked to the dateaccessioned.pl plugin. For instance, in
MARC21:
- Administration -> MARC bibliographic framework -> MARC structure ->
952 -> Edit subfields:
- subfields d ("Date acquired") and w ("Price effective from"):
- Other options -> Plugin -> dateaccessioned.pl
- Go to cataloging and add or edit an item on a bibliographic record
- The "Date acquired" and "Price effective from" fields should be
styled as datepickers.
- Clicking in these fields should populate the field with today's date
and trigger the datepicker popup.
- Test that all the datepicker features work correctly.
- Test that manual entry of a date works.
- With the AcqCreateItem system preference set to "placing an order,"
go to Acquisitions -> Vendor -> Add to basket.
- Add a title to your basket using your preferred method.
- In the "New order" form, find the section for adding an item.
- Test the "Date acquired" and "Price effective from" fields, which
should behave just like they did in the cataloging module.
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
See the comment in the code for more information.
Test plan:
- Set autoBarcode to hbyymmincr
- Create an item and click on the barcode field
- A barcode prefixed by the homebranch is generated
- Click the "Add multiple copies of this item" and enter 4
- Save
=> Without this patch only the first item has the homebranch prefix
=> With this patch applied they all have a barcode in the same format
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch will fix installation of Koha on MySQL 8
DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rank, syntax, encoding,recordtype) VALUES
('lx2.loc.gov',210,'LCDB','','','LIBRA' at line 2 at /usr/share/perl5/DBIx/RunSQL.pm line 273.
https://dev.mysql.com/doc/refman/8.0/en/keywords.html
=> RANK (R); added in 8.0.2 (reserved)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds a select multiple when you add/edit an itemtype, creates functions to return itemtypes by library, and filters the options of itemtype select in additem
To test:
1) Apply this patch set
2) perl installer/data/mysql/updatedatabase.pl
3) In koha administration => item types, edit "Books" itemtype
CHECK => there is now a select multiple whith libraries at the bottom
4) select centerville and save
5) set centerville as current libary
6) search for any biblio in the catalog
7) click on "edit items"
CHECK => book item type is present
8) set any other libary as current library
SUCCESS => book item type is not present
9) Sign off
Sponsored-by: Northeast Kansas Library System
Sponsored-by: Southeast Kansas Library System
Sponsored-by: Central Kansas Library System
Signed-off-by: Jessica Zairo <jzairo@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
In value_builder/unimarc_field_4XX.pl value_builder gets search results
and runs a for loog with $i index. This loop is limiter with number of
results par page, it should also be limited by number of results if
lower that number of results par page.
Same in cataloguing/value_builder/marc21_linking_section.pl.
Test plan :
1) configure framework to use value builder
2) use value builder
3) perform a search with number of results lower than number of results
per page
4) check number of records diplayed is OK
5) perform a search with number of results upper than number of results
per page and check number of results is OK
6) you see number of results par page records and pagination link
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To prevent additem.pl to crash when called with a nonexistent
biblionumber we are here implementing the blocking_error.inc trick to
display a friendly message instead.
Can't call method "fields" on an undefined value at
/home/vagrant/kohaclone/cataloguing/additem.pl line 736.
Test plan:
hit
/cataloguing/additem.pl?biblionumber=
/cataloguing/additem.pl?biblionumber=424242
You will get a friendly "Bibliographic record not found." message,
instead of a 500
Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch allows for redfining the keyboard shortcuts used in rancor.
For now these are set globally (per instance)
Ctrl-S is a codemirror setting and cannot be altered
To test:
1 - Apply patches
2 - update database
3 - Load the advanced cataloging editor
4 - Click the "Keyboard shortcuts" button
5 - Ensure the list looks correct
6 - Note that 'Ctrl-S' note sit cannot be remapped
7 - Note the 'Redefine shortcuts' link at the top of the menu
8 - Confirm all the listed shortcuts work as expected
9 - Click the 'Redefine' link
10 - Ensure current mappings load correctly
11 - Read explanation and verify it makes sense
12 - Remap some functions
13 - Return to the cataloging editor
14 - Confirm your mappings work
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Librarians have requested the ability to delete records with no items
quickly and easily from the "Attach item" results page as items are
moved from one record to another.
Test Plan:
1) Apply this patch
2) Create 2 records with 2 items each
3) Move one item from record A to record B
4) You should see no change from pre-patch behavior
5) Move the second item from record A to record B
6) You should now see a "Delete record" button
7) Click the button
8) Note the record in question has been deleted
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Since
commit 1253975389
Bug 21091: Move add item template JavaScript to a separate file
items cannot longer be edited when receiving an order.
When moving the code to the JS file, the JS variable "opisadd" was
always set to "true":
var opisadd = '[% opisadd | html %]';
Even if the TT variable is 0, opisadd will be "0", which is evaluated to
true in Javascript
To clean the situation it is easier to remove this variable and use "op"
instead.
Test plan:
- Make sure acqcreateitem is set to "when placing an order"
- Create a basket with some orders
- Close the basket
- Go to your vendor and receive an order
- On the receive page, try to edit your item
=> Without the patch, the pop up page will open and then close, not allowing the item to be edited.
=> With this patch applied you will see the item edit form. Save and
confirm that the parent window is updated with the new value (actually
it's refreshed)
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
When you edit a biblio as new, and you have enabled advanced editor,
current record was opened, and was overwritten when saved. This patch
effectively opens a new record based on the one selected.
To test:
1) Enable "EnableAdvancedCatalogingEditor" preference
2) Go to cataloguing and click on advanced editor to save preference to the cookie
3) Search for an item in catalog
4) Click in "Edit as new (duplicate)"
5) Advanced editor should appear.
CHECK => browser url ends with #catalog/{original biblionumber}
=> Title above toolbar is "Editing catalog record #{original biblionumber}"
6) Apply this patch
7) Repeat steps 3 to 5
SUCCESS => browser url ends with #duplicate/{original biblionumber}
=> Title above toolbar is "Editing duplicate record of #{original biblionumber}"
8) Save
SUCCESS => browser url ends with #catalog/{new biblionumber}
=> Title above toolbar is "Editing catalog record #{new biblionumber}"
9) Sign off
Sponsored-by: Carnegie
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Test plan:
Try to search, preview and import authority from Z39.50, everything
should work as expected
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
1 - Have a borrower with edit_catalogue permission and one with
editcatalogue top level
2 - Confirm they can both access the advanced editor from the
'Cataloguing' home page or from the basic editor
3 - Apply patch
4 - Update database
5 - Confirm borrower with 'edit_catalogue' has 'advanced_editor'
permission
6 - Confirm borrowers can access advanced editor as above
7 - Remove 'advanced_editor' permission from borrower
8 - Ensure they cannot access the advanced editor
9 - Ensure links to 'Edit record' from search results go to basic editor
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Argument "01e" isn't numeric in numeric ne (!=) at
/home/vagrant/kohaclone/cataloguing/addbiblio.pl line 507.
A tagfield can be 01e and so raise a warning is compared with == or !=
This patch also fixes few inconsistencies:
- tagfield for items.itemnumber must be retrieved with GetMarcFromKohaField
(to support other marcflavours)
- do not use $_
- loop only once on $usedTagsLib
Test plan:
For devs only, read the code and confirm the changes make sense.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
1. Add multiple copies of an item with data in the 'Copy number' field. Note that tha data will be identical for all items.
2. Apply patch.
3. Add multiple copies of an item with a positive integer (ie. only digits) in the 'Copy number' field. Note that the copy number is incremented for each item.
4. Add multiple copies of an item with some other type of data in the 'Copy number' field. Note that the copy number field remains unchanged for the added items.
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Test plan:
1) Apply the patch
2) Have set dateaccessioned plugin to an item subfield (it is set on 952$d by default)
3) Confirm the functionality of this plugin is same as before patch
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Note: This is here for information purpose, feel free to test it if you
wan to play with it.
TODO: C4::Reserves::_get_itype is not longer in use
No more GetItem must be returned by:
git grep GetItem|grep -v GetItemsAvailableToFillHoldRequestsForBib|grep
-v GetItemsForInventory|grep -v GetItemsInfo|grep -v
GetItemsLocationInfo|grep -v GetItemsInCollection|grep -v
GetItemCourseReservesInfo|grep -v GetItemnumbersFromOrder|grep -v
GetItemSearchField|grep -v GetItemTypesCategorized|grep -v
GetItemNumbersFromImportBatch|cut -d':' -f1|sort|uniq
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
In several places we escape quotation marks using
$value =~ s/"/"/g;
All the occurrences are wrong and must be removed.
Most of them are leftover of bug 11638 (Remove HTML from
addbiblio.pl), which removes the construction of html from pl scripts.
The problem has been highlighted by bug 13618, I did not track down why
the issue did not exist before (?)
Test plan:
0/ Use strings with quotation marks, like:
'Fiddle tune history : "bad" tunes'
You can also use other html characters to make the tests more complete,
like 'Fiddle tune history : <"bad" tunes>'
1/ authorities/authorities.pl
a. Edit an authority filling different fields with quotation marks
b. Edit it again
=> The display (inputs' values) is wrong, if you save the escaped quotes
will be inserted
2/ cataloguing/addbiblio.pl
Same editing a bibliographic record
3/ cataloguing/additem.pl
Same editing items
4/ members/memberentry.pl
Edit a patron's record and fill some fields with quotation marks
+ fields borrowernotes and opacnotes
=> The quotes are inserted directly in DB (escape is done before the
insert!)
5/ opac/opac-review.pl
For QA only: $js_ok_review is never used
6/ tools/batchMod.pl
For QA only: $value is always undefined at that point
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Cataloging value builders for inventory stocknumberAV.pl and stocknumberam123.pl use a regexp to define if entered text is a prefix or not.
It actually only allows uppercase characters. A library may want to catalog with lowercase characters in inventory number and using those value builders.
Note that in database the text is not case-sensitive.
Test plan:
1) Configure stocknumberAV.pl value builder on an item subfield
2) Create an autorized value category 'INVENTORY'
3) Create in this category a value with code 'UC' and description '10'
4) Create in this category a value with code 'lc' and description '20'
5) Create a new item
6) Focus on stocknumber subfield
7) Enter '123' and click on value builder, the entry stays '123'
8) Enter 'UC' and click on value builder, the entry turn to 'UC 0000000011'
9) Enter 'lc' and click on value builder, the entry turn to 'lc 0000000021'
Same for stocknumberam123.pl
To elaborate on step #1:
Go to Administration->MARC Bibliographic framework
Click on the "Action" button to view the framework
for the item you will be creating, view MARC structure.
Search for Tag 952 (LOCATION AND ITEM INFORMATION (KOHA))
Select Actions->Subfields
Edit subfield i for "Inventory Number"
In the "Other options" pane, select the plugin to test.
Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
- Added missing GetHiddenItems parameter change case
Without this prove t had a failure.
- Always use mocks, not set_preference
- Tweaks so t/db_dependent/00-strict.t passes
There was a typo botcat vs borcat and borrowernumber was never
defined. Grabbing from userenv, like other code does.
- Tweak t/db_dependent/Items.t to fully test changes
This will test all the if structures fully in GetHiddenItemnumbers.
prove t/db_dependent/Items.t
- Tweak borrower category code
$borrower->{categorycode} on a Koha::Patron is not the
same as $borrower->categorycode. Fixed error.
- Search was returning URLS for wrong interface
There was one search context place wrong. Changed it to $is_opac
as the logic for setting $is_opac was modified correctly.
- Corrected issues with category code.
When a user isn't logged in, $borrower is undef and causes error
when determining category code. Added conditional check.
- Properly trigger all changes in C4/Search.pm
- Fix QA Test tool failures
C4/Search.pm had some tabs.
- Add some commenting to make sense of logic
- Refactor EmbedItemsInMarcBiblio parameters to hashref
- Trigger GetMarcBiblio's EmbedItemsInMarcBiblio call.
prove t/db_dependent/Items.t
- Add missing test to trigger Koha/BiblioUtils/Iterator change
- Add borrower category overrides
These files generally add borcat parameter to GetMarcBiblio.
Others might include correction of filtering of items
(opac-basket), or a comment as to why no changes were done
(opac-search).
In the case of opac-search, correcting the first FIXME will
likely correct the OpacHiddenItems issues on tags. As such,
that is beyond this bugs scope.
Some code had loop optimizations and fixes made, like a
'next unless $record' when the biblio shouldn't even be in
the list.
- Modify opac-ISBDdetail and opac-MARCdetail
Both files had similar logic. They were rearranged and
optimized, so that both files would have practically identical
initial blocks of code.
Optimizations were possible, because GetMarcBiblio
returns a filtered record, so that there is no double call
(once in the opac-### file and once in GetMarcBiblio) to
GetHiddenItemnumbers.
- Fix hiding in opac-tags
opac/opac-tags.pl was not properly hiding.
There is currently one known bug associated with tags left.
If you have two biblios tagged by different people with the
same tag, the opac-search will show the one you tagged that
is supposed to be hidden, because tag searches work differently
than regular searches. This is beyond the scope of this bug.
See the FIXME's in opac/opac-search.pl
- Trigger the C4::ILSDI::Services changes
prove t/db_dependent/ILSDI_Services.t
- Added missing 'my'
- Test C4/Labels/Label.pm changes
- Improve C4::Record::marcrecord2csv test cases
- Corrected opac-details searchResult call
- Fix breaking issues constraint in ITerator test
- Fix ILSDI_Services test when clubs with branch exist
- Rebased again!
- Rebased t/db_dependent/Items.t conflict.
The test plan is in comment #112 last I checked.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Edit: Fixing merge conflicts in
- t/db_dependent/Items.t
- t/db_dependent/Search.t
- C4/Search.pm
Changes the API for calling GetHiddenItems and all the places in the code that call it. This is to allow borrower categories to be passed in.
Adds an OpacHiddenItemsExceptions syspref to allow certain borrower categories to be able to see items, even if they are marked hidden by OpacHiddenItems
To test:
1) Make two borrowers, one in a category that should see everything (ie Adult), and another in a category that should only see certain things (ie Adult - exceptions)
2) Add the borrower that can see everything (the Adult) to OpacHiddenItemsExceptions
3) To the OpacHiddenItems syspref, add an item type (ensure that you have some records that fall under this type in your library).
4) Log in as the borrower that should only see certain things (Adult - exception)
5) Do a search, filtered to show records which are the item type that you specified in the OpacHiddenItems syspref. No records should show for this borrower as this item type is hidden to them.
6) Log in as the borrower that should see everything (Adult)
7) Do the same search. There should be results from this search, as this borrower category has been specified as an exception to the hidden items
Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This makes e.g. the advanced MARC editor, and anything that uses AddBiblio or
ModBiblio honor BiblioAddsAuthorities.
To test:
1. Make sure BiblioAddsAuthorities and AutoCreateAuthorities preferences are enabled.
2. Add a new record using advanced editor (enable EnableAdvancedCatalogingEditor to
use it), include a previously non-existing author.
3. Save the record and observe the author get an authority number.
4. Add another author, save the record and make sure it also gets an authority number.
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
When stemming is enabled, in catalog searching "C4::Search::_build_stemmed_operand" will transform query operand into stemmed operand using stemmer Lingua::Stem::Snowball with a specified language.
This stemmer returns undef stemmed operand if no language is defined.
In main catalog search (catalogue/search.pl) current language is used.
But in other pages "acqui/neworderbiblio.pl" and "cataloguing/addbooks.pl" no language is defined so stemmed operand is empty and so stemming is not applied.
This patch corrects by returning in "C4::Search::_build_stemmed_operand" operand without change if no langage is defined.
And uses current langage in pages "acqui/neworderbiblio.pl" and "cataloguing/addbooks.pl" so all catalog search uses stemming.
Test plan :
1) Enable system preferences QueryStemming and QueryWeightFields
2) Disable system preferences QueryAutoTruncate, QueryFuzzy and UseQueryParser
3) Go to intranet main page and click on "Search the catalog" tab
4) Perform a search (without index) that uses the stemming, for example searching for "years" will also match "year"
5) Note how many results you get, for example "year" gets 24 results and "years" gets 24 results
6) Go to "Cataloging" module
7) Perform a search on same word in "Cataloging search" tab
8) Note how many results you get
9) Without patch you get fewer results than first search (step 5) because stemming is not applied, for example "year" gets 11 results and "years" gets 15 results
10) With patch you get the same results as first search (step 5) because stemming is applied, for example "year" and "years" gets 24 results
11) Same tests in aquisition module
12) On a basket, click "Add to basket" and perform a search in "From an existing record"
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
1) Apply the patch
2) Go to administration and set up a z39.50 authority server, which does
support searching by control number (use attribute 12), you can use czech
national library server:
host: aleph.nkp.cz
port: 9991
base: aut-utf
format: MARC21
encoding: UTF-8
3) Try to find an authority by control number using z39.50 - if you use the server
recomended in point 2) there is web access to the base at
http://aleph.nkp.cz/eng/aut
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Fixed a typo in a code comment and a whitespace issue in the template.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Keeps the selected framework, allows selecting another and validates the record using the correct framework. Contains additional minor tweaks to display proper error messages.
To test:
1. Add a record with a non-default framework in the basic editor.
2. Switch to advanced editor and make sure the settings menu displays the correct framework.
3. Save the record and confirm that the framework code did not change.
4. Change the framework and save the record again.
5. Verify that the framework code changed.
6. Change one framework to make an extra field mandatory.
7. Make sure that the field is required in the editor when the framework above is selected but not when another framework is selected.
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Those calls to C4::Items::GetItemnumbersForBiblio can be replaced with
my @itemnumbers = Koha::Items->search({ biblionumber => $biblionumber})->get_column("itemnumber")
Test plan:
- Use the GetAvailability service of ILS-DI
- Try to place a hold on an item that is available and another one
- Use the batch record deletion tool to remove record with and without items.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Those calls to C4::Items::GetBarcodeFromItemnumber can be replaced with
my $barcode = Koha::Items->find($itemnumber)->barcode;
But if we are not sure that the item exists, we should test the return
of ->find before ->barcode
Test plan:
- Edit an item
- Check an item in
- Test SIP - I do not really know how to trigger that code, apparently
misc/sip_cli_emulator.pl does not deal with holds. Any ideas?
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Test plan:
- Apply the patch
- Add an SRU authority server in admininistration -> Z39.50/SRU servers
You can try with the French national library, configured as such:
Hostname: catalogue.bnf.fr
Port: 80
Database: api/SRU
Syntax: Unimarc
Record type: authority
Additional SRU options: version=1.2,sru=get
SRU Search fields mapping example:
Keyword (any): aut.anywhere
Name (any): aut.anywhere
Author (any): (aut.type any "pep org") and aut.accesspoint
Author (personal): aut.type=pep and aut.accesspoint
Author (corporate): aut.type=org and aut.accesspoint
Author (meeting/conference): aut.type=org and aut.accesspoint
Subject heading: (aut.type any "geo ram_nc ram_ge ram_pe ram_co") and aut.accesspoint
Subject sub-division: aut.type=ram_pe and aut.accesspoint
Title (any): (aut.type any "tic tut tum ram_tp ram_tu") and aut.accesspoint
Title (uniform):(aut.type any "tut tum ram_tu") and aut.accesspoint
- Try a search from Authorities -> New from Z39.50/SRU
- Check that the authority is correctly displayed in "Show Marc"
- Check that the authority is correclty added to koha in "Import"
- prove t/db_dependent/Breeding.t
Signed-off-by: François Pichenot <fpichenot@ville-roubaix.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
First patch deals with the problem on the item form, this
patch fixes the same problem on catalouging form for the
bibliographic record.
To test:
- Adapt your frameworks:
- Make sure 942$c is mandatory
- Link another field to an authorised value, for example: 942$n to YESNO
- Add a new record
- Verify that the first value of each pull down is preselected,
there is no way to trigger the 'required' error
- Apply patch
- Add a record
- Verify that classification source is preselected according to the
DefaultClassificationSource system preference
- Verify that 942$c now defaults to empty
- Verify all your other mandatory subfields can be set to empty
- Verify that you can't save before correctly setting them
- Chane your frameworks
- Add a default value for 942$c, for example: CF
- Add another record
- Verify the itemtype is now preset to your default itemtype
- Edit an existing record, verify all values show correctly
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
The code assumed that if a subfield is marked as mandatory, there should be no
empty entry in the pull downs.
This assumption is not correct, as it leads to the first entry of the
pull down being preselected if there is no default set. Which means you
will never be alerted of any cataloguing errors and errors will be very
hard to find later on.
Correct behaviour would be to preselect the empty value when there is
no default. This means on saving the item an error message is triggered
and the cataloger is forced to set the value.
To test:
- Adapt your frameworks:
- Make 942$c non-mandatory
- In 952 make itemtype, classification source and some other pull downs
like location or collection mandatory
- Add a new item
- Verify that the first value of each pull down is preselected,
there is no way to trigger the 'required' error
- Apply patch
- Add a new item
- Verify that classification source is preselected according to the
DefaultClassificationSource system preference
- Verify that the itemtype is preselected according to 942$c in
the bibliographic record
- Verify all mandatory fields can be set to empty
- Verify that you can't save before correctly setting them
- Change the 942$c in the record to empty
- Add another item
- Verify the itemtype is now empty
- Change your frameworks and set a default for itemtype (Ex: BK)
- Repeat default check with another pull down like collection or location
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
We do not want empty values for branches (holdingbranch and homebranch
must be mandatory, see bug 21011)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
A # (or &) at any position in 008 field of a bib record causes
all subsequent data in field to be overwritten with default values when
record is saved.
These characters need to be correctly encoded before being passed as
parameters of the url
To reproduce:
1. Find and edit a bib record which has an 008 which differs from the
default values for the MARC framework
2. Choose 008 helper
3. Add # in any position before the end of the field noting the current
values of the data
4. Save record
5. Edit record and select 008 helper
6. Review characters after #
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and it works.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
There is a "max length" value you can define at framework level to
limit the size of the input. But it is not taken into account on the
add/edit item form.
It is a regression that has been introduced by
commit 47d2de9c02
Bug 12176: Remove HTML from additem.pl
max_length vs maxlength
Test plan:
- Define a maximum length for an item subfield
- Add or edit an item
=> Without this patch the maxlength attribute of the inputs are not
defined (maxlength="")
=> With this fix you will see the maxlength attributes correctly set
with the value you defined in the framework
Note:
We could/should set this value to the size of the DB column when mapped
For instance 952$u is mapped with items.uri, which is a varchar(255).
This length restriction should done at framework level
Signed-off-by: Pierre-Luc Lapointe <pierreluc.lapointe@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
If you do not use the EasyAnalyticalRecords feature (introduced with
bug 5528), you will have a lot of warnings in zebra-output.log like:
zebrasrv(1096) [request] Search biblios ERROR 114 1 1+0 RPN @attrset Bib-1 @attr 1=8911 259186
They come from C4::Items::GetAnalyticsCount called by catalogue/detail.pl.
This sub starts a Zebra search on index 'hi' (Host-Item-Number).
If you do not use this field at all (related to 773$9 in MARC21), Zebra
returns an Unsupported Use attribute error (114).
In making this change, I added one minor change:
[1] Remove the commented GetAnalyticsCount in additem.pl and correcting
indentation in that loop (removing tabs). So no change at all there.
NOTE: I will propose to bind the GetHostItemsInfo call in detail.pl and two
other scripts to this preference too on report 20702.
Test plan:
[1] If you use EasyAnalytics, verify that there is no change.
[2] If you do not, check the zebra-output.log. You should no longer see
searches for Host-Item-Number with 1=8911. (As well as ERROR 114 on
this index.)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Since commit 2c9aeb9b0f
Bug 18277: Remove GetBiblionumberFromItemnumber - linkitem
$item is not defined if the barcode is invalid, we should not call
method on it in that case.
Test plan:
- Turn on EasyAnalyticalRecords
- Go to a detail page
- Edit > Link to host item
- Enter an invalid barcode
=> With the patch you get a friendly error message
=> Without this patch it explodes with
Can't call method "itemnumber" on an undefined value at
/home/vagrant/kohaclone/cataloguing/linkitem.pl line 86.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
TEST PLAN
---------
See comment #0 to reproduce.
apply this patch
restart_all
echo | sudo tee /var/log/koha/kohadev/place-error.log
restart_all
cat /var/log/koha/kohadev/plack-error.log
-- just restart information
log into staff client again, home -> circulation -> fast cataloging
cat /var/log/koha/kohadev/plack-error.log
-- just restart information
run qa test tools
Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
'my' creates a new '$value' variable, and prevented the '$value' in
outer scope to be modified
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To test:
1 - prove t/db_dependent/Koha/Z3950Servers.t
2 - Load cataloging and authority home pages
3 - Verify you can add form z395 on each page
4 - Delete all z3950 servers
5 - Viery option to add from Z3950 is removed on both pages
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Given the confusion regarding this behaviour it sounds better to make it
configurable.
This pref will take 4 different values, 1 per place an item can be
marked as lost.
Test plan:
Mark items as lost and confirm the item is returned or not, depending on
the value of the system preference.
- from the longoverdue cronjob (--mark-returned takes precedence if set)
- from the batch item modification tool
- when cataloguing an item
- from the items tab of the catalog module
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
If an error is raised for the barcode, we should not try to perform the
lost logic succeeding it.
Futhermore there is no need to go to GetMarcFromKohaField etc. if we just
use the output of ModItemFromMarc.
Note: It seems unnecessary to clear $itemnumber, but I can understand
the anxiety about passing it to the template with op=additem. So just
leaving it here.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
TEST PLAN:
1) Log in with your superlibrarian account
2) Borrow any book
3) Visit your Checkouts page, and click 'Show Checkouts'
4) Click on the item's barcode to visit the item's page
5) On the item's page, click the 'Edit' button, and choose 'Edit items'
6) In the items table, click the 'Actions->Edit' button of the item you borrowed
7) Mark that item as lost (it should be the first row of the form) and click the button 'Save changes'
8) Visit your Checkouts page. The item should still be there, despite BZ12363 claiming it should've been automagically returned
8.1) Your koha-log should also output a warning message: 'DBIx::Class::Storage::DBI::select_single(): Query returned more than one row...'
8.2) If you visit the item's page, the modification had no effect. It should not be marked as lost.
9) APPLY PATCH
10) Start back from step 2), but this time, after marking the item as lost, the item's page should
reflect the change, and the item you borrowed should've been automatically returned to the library
Signed-off-by: Jean-Manuel Broust <jean-manuel.broust@univ-lyon2.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: Using $item->{itemnumber} instead of new variable.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patchset adds the ability to use the authorities search to select
or clear fields in the advanced editor
To test:
1 - Open a record in the advanced cataloging editor
2 - Press 'Ctrl+L' while in a field that shuold not be linked to
authorities (300 for instance)
3 - Nothing should happen
4 - Try it in a field that should be linked
5 - You should get the authorities pop-up
6 - Values in pop-up should be populated from values in record (as
appropriate for authority type)
7 - Correct authority type should be selected ( PERSO_NAME for 100,
TOPIC_TERM for 650, etc.)
8 - Press 'Clear', field should be blanked
9 - Search again and select an authority
10 - Field should be correctly populated
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds the possibility to define default indicators in
the MARC frameworks. It adds 2 columns in the marc_tag_structure table in
the database in order to accomplish this. All files that reference this
table have also been updated to reflect these added fields.
Test: Add or edit a MARC framework. In the Field list should be 2 extra
columns. It should be possible to add default indicators (1 character)
in these fields. Nothing else should have changed in the meantime.
The default indicator values are not yet visible in the cataloguing module.
The default values are also loaded in the cataloguing form.
Test: Define default values in some MARC framework. Go to cataloguing
and create a new record using this framework. Verify that the defined
defaults are visible when set. Verify the default is empty (as before)
if no default was set. Verify that if the default is changed, the
record is saved with the manually changed value. Verify that upon
changing such a new record, the manually set indicator value is used
and not the default one from the framework.
Don't forget to run database and database schema update
Signed-off-by: Eugene Jose Espinoza <eugenegf@yahoo.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Should be sufficient to read code and see all lines were commented and
that this patch removes useless lines
To be thorough, ensure that your can add an order to a basket and add a
biblio.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
When bibliographic records are merged, the suggestions.biblionumber
field should be replaced with the new record.
Ideally we should have kept an history of the merges, to know what was
the original record. Now we cannot fix the broken links.
Test plan:
1) Create a suggestion in OPAC
2) Accept the suggestion in staff
3) Add order from this suggestion
4) Go to cataloguing search and search for the record and another
5) Merge the suggestion record with the catalog record - catalog record wins (should be the more common case when a patron suggests something that already exists)
6) Verify that after merging, the new title displays in the acquisition record
7) Verify that the suggestion info no longer displays in basket
From Katrin's test plan:
8) Verify that the new title doesn't display in suggestions. The old title will still show as suggested (not updated)
=> This is the title from suggestions.title, I think it makes sense to show this one.
Maybe we should open a new bug report to improve the display of the suggestion, and link to the bibliographic record
Signed-off-by: Lucie Gay <lucie.gay@ens-paris-saclay.fr>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The subroutine GetBiblioItemByBiblioNumber considers that we have a 1-N
relation between biblio and biblioitems, which is wrong (it's 1-1).
So the calls can be replaced with Koha::biblio->biblioitem, it will ease
the read of the code.
Test plan:
1. Use the ILSDI service to display info of a bibliographic record,
biblioitems fields must be displayed
2. Search for items, biblioitems info must be displayed as well in the
result table
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
These plugins are very noisy, badly written and I have no idea what they
do.
t/db_dependent/FrameworkPlugin.t outputs a log of warnings about "
uninitialized value".
Let fix them later.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Test plan:
[1.] Load the patch and make sure you have some Z39.50/SRU servers
(Administration => Z39.50/SRU servers administration)
[2.] Then go to authorities and notice that the 'New from
Z39.50/SRU' button is there
[3.] Next go to cataloging and notice that the 'New from Z39.50/SRU'
button is there too
[4.] Now make sure you have no Z39.50/SRU servers (remove the
servers)
(Administration => Z39.50/SRU servers administration)
[5.] Go to authorities and notice that the 'New from Z39.50/SRU'
button is not there
[6.] Lastly go to cataloging and notice that the 'New from Z39.50/SRU'
button is not there too
:)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I added a missing [% END %] during signoff. Hope no one minds!
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
It has been reported than the missing use statement can cause a
compilation error:
Undefined subroutine &Date::Calc::Today called at
/usr/share/koha/intranet/cgi-bin/cataloguing/value_builder/unimarc_field_100.pl
line 75.
Test plan:
Use this UNIMARC plugin and make sure it fixes the error or at least
does not break it
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch updates the dateaccessioned plugin for the item edit form to
return functionality which was removed in a previous patch.
To test, apply the patch and open an item for editing. Clicking the
"..." link next to the "Date acquired" field should insert the current
date, overwriting the existing date.
Open a blank item add form. Putting the cursor in the "Date acquired"
field should automatically insert the current date.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Added a comment line in set_to_today.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
In plugin unimarc_field_210c, the editors search results have pagination.
First page works but not other pages.
The main problem whas mainly because $startfrom var was missused. It is defined in C4::Output::pagination_bar as page number.
This patch corrects by using a $offset var.
Also removes dead code, obsoleted by using C4::Output::pagination_bar.
Also changes hardcoded results per page from 19 to 20.
Test plan :
- Use UNIMARC catalogue
- Define in framework value builder unimarc_field_210c on 210$c
- Create autority type EDITORS with heading 200$b
- Create 22 authorities of that type
- Index those new authorities
- Create a new biblio record
- Click on 210$c plugin
- Click on "Search"
- You see 20 results
- Click on page 2
=> Without patch you get empty table
=> With patch you get 2 results
- Check that you see "Results 21 to 22 of 22"
- Delete 2 autorities and retest
Works as intended.
Signed-off-by: Simon Pouchol <simon.pouchol@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
[1] Replace corrosponding => corresponding
[2] Replace containts => contains
[3] Replace item_level-itypes => item-level_itypes
[4] Replace Managment => Management
[5] Replace should returns => should return
Test plan:
Note that this patch only deals with POD lines or test descriptions.
So there is nothing to test, just read the patch.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Patch amended by RM: The release notes should not be modified
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
There are several ways to mark an item an lost:
- item list view (catalogue/moredetail.pl, "Items" tab)
- cataloguing (cataloguing/additem.pl)
- Batch item modification tools (tools/batchMod.pl)
- The long overdue cronjob (misc/cronjobs/longoverdue.pl)
So far only the cronjob is configurable, the others mark the item as
returned (does the checkin).
This behaviour should be controlable using a syspref, to let libraries
choose what fit best for them.
Test plan:
Use the 2 options of the pref, mark checked out items as lost using the
different possibilities, and confirm that the behaviours make sense to
you
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This syspref is going to be used for populating field 008, range 15-17
with a desired default. It is currently hardcoded to 'xxu'. If not set,
it will still fallback to 'xxu'.
Signed-off-by: m23 <black23@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 7673 introduced SubfieldsToAllowForRestrictedEditing but bug 12176
broke it assuming that only selects were impacted by this feature.
Test plan:
Go back on bug 7673 and confirm that
SubfieldsToAllowForRestrictedEditing is working as expected with this
patch applied.
Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
For clarification, the item fields that are entered in
SubfieldsToAllowForRestrictedEditing should EXCLUDE the desired
fields you want to disable.
Test plan (updated to test the scenario in the bug Description):
1. Create a patron with only the following permissions:
- catalogue (Required for staff login)
- editcatalogue -> edit_catalogue
- editcatalogue -> edit_items
- editcatalogue -> edit_items_restricted
2. Navigate to Administration -> Global system preferences -> Cataloging
-> Record Structure -> SubfieldsToAllowForRestrictedEditing
3. In the input field for SubfieldsToAllowForRestrictedEditing enter in
all the 952 fields EXCEPT the ones desired to be disabled. In this
case, we want to disallow editing of 952$2, 952$a, 952$b, 952$e, 952$h,
and 952$o so we enter the following into the
SubfieldsToAllowForRestrictedEditing (without quotes) "952$0 952$1
952$3 952$4 952$5 952$7 952$8 952$c 952$d 952$f 952$g 952$i 952$j
952$p 952$t 952$u 952$v 952$w 952$x 952$y 952$z"
4. Click Save all Cataloging preferences
5. Login to the staff client as the created restricted editing patron
6. Edit an item
7. Note that all fields except for the ones excluded from the syspref
are editable
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To test:
1) Create a record
2) Click Edit -> Edit record. open this in another tab
3) Delete the record in the original tab
4) Refresh the edit form in the other tab. Notice the software error
5) Apply patch and refresh page
6) There should be a nice error message with the form fields and buttons
hidden. Confirm links work as expected.
Sponsored-by: Catalyst IT
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Test plan:
0. Apply patches
1. Update database
2. Go to administration -> libraries, try to update some library and
fill in some value into Marc Organization code field
3. Save this library and edit again - the code should be stored
correctly
4. Go to system preferences and fill in some value into MARCOrgCode
preference, note there is enhanced description mentioning the ability to
set organization code on library level
5. Set active library to the one with own org code stored
6. Go to cataloguing, create new empty record and click into field 003 -
there should be the code you filled for that library
7. Set active library to one withou marc org code
8. Go to cataloguing, create new empty record and click into field 003 -
there should be the code from system preference
9. Go to system preferences again and set AutoCreateAuthorities to
'generate' and BiblioAddsAuthorities to 'allow'
10. Go to cataloguing and create some biblio record, fill in any author
in to create its authority record, save the biblio
11. Go to authorities and find this created authority, go to details and
check the fields: 003, 040$a, 040$c, 670$a - there should be used right org code
12. prove t/db_dependent/AuthoritiesMarc.t t/db_dependent/Biblio.t t/db_dependent/Koha/Libraries.t
Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Change parameters to a hashref.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Looks good to me.
Two calls in migration_tools/22_to_30 still in old style.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Most of the time C4::Biblio::GetBiblioData is used to retrieve the title
and/or the author of a bibliographic record.
This patch replaces the easy occurrences of GetBiblioData, the ones
where the 2 joins are needed, but only data from biblio and biblioitems
table are.
Test plan:
It will be hard to test everything, I'd suggest a QAer to review this
patch and confirm that the difference occurrences of GetBiblioData have
been correctly replaced by calling Koha::Biblios->find or
$biblio->bibioitem
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
GetMember returned a patron given a borrowernumber, cardnumber or
userid.
All of these 3 attributes are defined as a unique key at the DB level
and so we can use Koha::Patrons->find to replace this subroutine.
Additionaly GetMember set category_type and description.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Test plan:
Enable EasyAnalyticalRecords and link an item to another one (Edit >
link to host item)
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To retrieve a biblionumber from an itemnumber, we can use:
Koha::Item->biblio->biblionumber
This is only what this patchset does.
Doing that we will be able to get rid of the
C4::Biblio::GetBiblionumberFromItemnumber subroutine.
Test plan:
- Acquisition module: cancel a receipt
- Export a record to CSV
- Modify items in a batch
Item's info should be correct
Other changes with be checked by QA team, by reading the code.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The subroutine C4::Biblio::GetBiblioFromItemNumber was wrong for several
reasons:
- badly named, we can get biblio info from a barcode
- SELECT * from items, biblio and biblioitems
makes things hard to follow and debug, we never know where do come from
the value we display
- sometimes called only for trivial information such as biblionumber,
author or title
This patchset suggests to replace it with calls to:
- Koha::Items->find for item's info
- $item->biblio for biblio's info
- $item->biblio->biblioitem for biblioitem's info
Test plan:
Item's info should correctly be displayed on the following pages:
- circulation history
- transfer book
- checkin
- waiting holds
QA will check the other changes reading the code, it's trivial
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The code from additem to delete all the items of a bibliographic record
is very ackward.
This patch simplifies the algorithm and make the code more readable.
Test plan:
Remove all the items of a bibliographic records
If at least 1 item is checked out you should get an error.
No change with the current behavior is expected.
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The code from scripts and subroutines using this subroutine was not very
elegant. Most of the time the code was unnecessarily complex.
This patch removes this subroutine and adapt the code to use
Koha::Items instead.
1. C4::Items::get_hostitemnumbers_of
I did not understand why the code was so complicated, it seems that we
only want to know if a given item has a given biblionumber
2. cataloguing/merge.pl
We want to retrieve the itemnumber for a given biblio.
We could also have done that with:
Koha::Biblios->find( $biblionumber )->items;
3. labels/label-item-search.pl
We want to loop over the items for a given biblio, no need to use
get_itemnumbers_of and GetItemInfosOf.
We just need to use:
Koha::Items->search({ biblionumber => $biblionumber })
4. reserve/request.pl
We want to retrieve the itemnumbers of the biblio's items
We could also have done that with:
Koha::Biblios->find( $biblionumber )->items->get_column('itemnumber');
Test plan:
1.You need to create analytical record relationships (
EasyAnalyticalRecords needs to be set). Link an item to a biblio using
the 'Edit > Link to host item' menu from the biblio detail page.
From the staff interface place a hold on the biblio. You should see the
items from the biblio and the one you just linked
2. Merge two bibliographic records (with items), the resulting record
should contain items from both original records
3. Create a new label batch, edit it.
Add items to this batch ('Add items' button).
Fill the input with a barcode.
You should see all the items of a biblio.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Updating to use they/them and skipping the ones changed to it
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comments throughout the Koha codebase assume that
all librarians or borrowers are male by using the
pronoun 'he' universally. This patch changes to
'he or she' / 'him or hers'.
Testing plan:
- ensuring modifying tests still pass:
+ C4/SIP/t/06patron_enable.t
+ t/db_dependent/Circulation.t
+ t/db_dependent/Koha/Patrons.t
+ t/db_dependent/Reserves.t
Sponsored-By: California College of the Arts
No code changes detected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Lari Taskula <lari.taskula@jns.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch adds 008 cataloguing value builder for MARC21 classifications
records (LCC, DDC/Dewey, UDC and so on).
For most practical purposes, MARC21 classification records
(<https://www.loc.gov/marc/classification/>) are quite similar to regular
MARC21 authority records, so handling them in Koha is (almost) achievable
by means of the built-in 'regular' MARC21 authority records related
functionalities, but there are some notable differences - in particular,
008 field length and format is not the same.
To test:
1) apply patch
2) link the new plugin (marc21_field_008_classifications.pl) to the 008
field in the existing (or cloned, ..) authority framework of your choice
3) try to add, edit, re-edit 008 field using this "authority" framework,
ensure that the new plugin behaves as it should according to the
Library of Congress specifications for MARC21 classification records
008 field format (<https://www.loc.gov/marc/classification/cd008.html>).
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch also fixes a typo ("<<MM><" should be "<<MM>>")
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
There is only one call to C4::Biblio::ModBiblioframework, it's called
just before C4::Biblio::ModBiblio in cataloguing/addbiblio.pl
At first glance this call does not seems useful: all the subroutines
called from ModBiblio send the frameworkcode in parameter.
I'd go to remove it, but I'd like to get confirmation by others.
No test plan here, you need a good pair of eyes and deep into the
C4::Biblio code.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Converts item plugins to new style (with builder and launcher).
See also bugs 10480 and 13437.
The following plugins have been adjusted:
barcode_manual.pl
barcode.pl
callnumber-KU.pl
callnumber.pl
cn_browser.pl (Added license statement too)
dateaccessioned.pl
macles.pl
stocknumberam123.pl
stocknumberAV.pl
stocknumber.pl
Test plan:
Connect the plugin to an item field.
Verify that the plugin still works.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested if all plugins compile okay.
Ran most of them thru FrameworkPlugin.t.
Tested them in the item editor.
Note: the form for macles.pl comes up, further hard to test.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4::Koha::getframeworks returned a hashref of biblio frameworks.
It was mainly used to generate the dropdown list of frameworks.
The scripts modified in this patch did not necessary order the element
by description (frameworktext), the displays were not consistent from
one screen to another.
Using the same search method everywhere:
Koha::BiblioFrameworks->search({}, { order_by => ['frameworktext'] });
We will know always get the framework in the same order.
Test plan:
Following the different pages modified by this patch, and make sure the
frameworks are displayed correctly in the dropdown list:
1/ acqui/z3950_search.pl - Create an order from an external source.
2/ admin/fieldmapping.pl - Define some mappings keyword / MARC field
3/ admin/marctagstructure.pl - On the MARC frameworks admin page, select
another framework than the default one and click on the 'Search' button
4/ catalogue/MARCdetail.pl - On the MARC defail page, change the
framework you want to use to display the record
5/ cataloguing/addbiblio.pl - Add or edit a biblio record, change its
framework. When editing, the framework of the record should be selected
by default
6/ cataloguing/addbooks.pl - Go on the cataloguing home page and click
on the "New record" button. You should see all the frameworks
7/ cataloguing/merge.pl - Select 2 biblio records to merge. On the first
step (select the merge reference), you should be allowed to select the
framework to use.
8/ tools/inventory.pl - On the inventory page, the "Item statuses" part
should be populated as before this patch
9/ tools/manage-marc-import.pl - Stage records for import. Before
importing them into the catalog, you should see the framework dropdown
list.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works Ok.
No errors
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
The "Delete record" button goes to addbiblio.pl?op=delete, which
incorrectly redirects to Rancor when selected.
Test plan:
0/ Enable EnableAdvancedCatalogingEditor
1/ Edit a record
2/ Switch to the Advanced editor
3/ click on "View the record"
4/ Delete the record
=> Without this patch you are redirected to the editor
=> With this patch you are redirected to the advanced search
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
When editing a bibliographic record, if you switch the framework to
default, the page is reloaded but the framework is not changed.
From the pl script, you can see that the frameworkcode is set to the one
of the biblio if set to false. The empty string, which means default,
should be taken into account.
Test plan:
- Create a record using the Fast add framework
- Save the record
- Open the record for editing
- Use the "Settings" pull down to change the framework to default
- Try another framework
- Try changing to default from there
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
When you use the 006 builder to view the existing values in the 006
tag, Koha is not pulling these existing values into the builder
window. Instead, Koha appears to be using defaults.
To reproduce:
1. Open a record in the editor
2. Switch from BKS to another material type.
3. Change as many settings as possible.
4. Close plugin.
5. Reopen plugin - notice your selections are not shown.
Trivial patch, heavilly inspired by Bug 9093.
To test:
1. Apply patch
2. Ensure that issue described above is no longer reproductible
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
When adding a biblio, the default value of a MARC subfield defined in
the frameworks can be used as placeholders to set the current date or
the surname of the logged in user (use cases?).
The different placeholders are 'YYYY', 'MM', 'DD', 'user'.
When adding an item, same behavior except that 'user' is not replaced.
This patch makes behaviors consistent between the 2 editors and
surrounds placeholders with << >>
We will now have: <<YYYY>>, <<MM>>, <<DD>> and <<USER>>
Test plan:
Define default values for biblio and item subfields.
Create a bibliographic record and attach it an item.
The default values should be used and replaced if you used placeholders.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Remove $dbh as argument to C4::Items::DelItemCheck
and C4::Items::ItemSafeToDelete, also change all
calls to these functions throughout the codebase.
Also remove remaining reference to 'do_not_commit' in
t/db_dependent/Items_DelItemCheck.t
Fixed doubled "$$" in C4/ImportBatch.pm
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
No idea how to replicate this issue but we have been getting several reports
about the following error:
Software error:
Corrupted storable string (binary v2.9) at /usr/lib/perl/5.18/Storable.pm line
417, at /home/koha/kohaclone/cataloguing/additem.pl line 375.
TEST PLAN:
1. Add or modify an Item.
2. No observed changes.
?. We don't know what causes this but we know that add/modify Item occasionally
crashes due to failure of a cookie thawing.
This patch prevents the whole program from dying, because this error is not
critical enough to warrant dying.
Also there is no centralized mechanism in Koha for showing messages to the
user, so there is no easy and convenient way to warn the user that the:
'LastCreatedItem'-cookie or the systempreference 'PrefillItem' is
malfunctioning.
So we instead just warn to the server logs with the malfunctioning cookie in
hopes of nailing down what causes the issues.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
The more correct solution is fix that template file.
However, in the mean time, this works.
TEST PLAN
---------
1) find a record
2) edit record
3) click value builder for 007
4) change everything to pipes as much as possible.
(use Motion Picture to get all 00-22 values)
5) save
-- should save just fine.
6) click the value builder again
-- OOPS! Bad reload.
7) prove t/db_dependent/FrameworkPlugin.t
-- NOISY 007 messages.
8) apply patch
9) click the value builder again
-- good reload
10) prove t/db_dependent/FrameworkPlugin.t
-- No noise related to 007.
11) run koha qa test tools.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
It is similar to unimarc_field_210c_bis, but searches in
biblioitems.collectiontitle instead of biblioitems.publishercode
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
To test:
Start to add or edit a biblio
Open the dropdown to change framework
Notice the order
Refresh the page - notice the order changes
Apply patch
Order is alphabetical
Refresh the page
Order does not change
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as described
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch replaces the occurrences of
my @foo = $cgi->param('foo');
with
my @foo = $cgi->multi_param('foo');
perl -p -i -e
's/^(\s*my\s*@\w+\s*=\s*)\$(cgi|input|query)\->param\(/$1\$$2\->multi_param\(/xms'
**/*.pl
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
This allows sorting to be configured within a field. For example, while
many values are included for search on author, sorting should only be
done on the main entry values. This permits that by have a sort value,
which can be true, false, or null. true and null are pretty much the
same, but false means that a field isn't available for sorting on. By
default (null), fields can be sorted on.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
subroutines should not take $dbh in parameter.
C4::Biblio::TransformMarcToKoha has it and does not use it.
Test plan:
Look at the patch and confirm that all occurrences of
TransformMarcToKoha have been modified.
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
The commit b5ecefd485
Date: Mon Feb 3 18:46:00 2003 +0000
had a funny description:
Added function to check if a MARC subfield name is "koha-internal"
(instead of checking it for 'lib' and 'tag' everywhere); temporarily
added to Koha.pm
"Temporarily", since 2003, everything is relative, isn't it? :)
The thing is that GetMarcStructure returns hash like
field_200 => {
subfield_a => {
%attributes_of_subfield_a
},
%attributes_of_field_200
}
The attributes for field_200 can be 'repeatable', 'mandatory', 'tag', 'lib'.
We don't want to loop on these values when looping on subfields.
Since there are just { k => v } with v is a scalar (string), it's easier
to test if we are processing a subfield testing the reference.
At some places, we don't need to test that, we are looping on values
from MARC::Field->subfields which are always valid subfields.
Test plan:
1/ Edit items using the batch item mod tool
2/ display and edit items via the cataloguing module.
You should not see any changes between before and after the patch
applied.
Tech notes:
We need to check what we are processing when we loop on 'subfields' from
GetMarcStructure, not from MARC::Field->subfields.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
This patch adds the dbrev in atomicupdate, updating the marc structure
for existing installations. (New installation in previous patch.)
And it removes the obsolete plugin files.
Test plan:
Run upgrade. Verify that new plugin is linked (for bib and auth).
Check plugin in editor.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Plugin tested, added to 040a/c/d
Test pass
No koha-qa errors
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch copies code from marc21_field_003.pl to create marc21_orgcode.pl
for more generic use. Other fields like 040c or 040d should use it too.
Note: The plugin is used for authorities too (003, 040a).
One behaviour change is added: If the corresponding field is already
filled, it will not be overwritten.
In the unit test marc21_orgcode already replaces marc21_field_003.
Test plan:
[1] Attach plugin marc21_orgcode to a field (e.g. 003) and test it in
the MARC editor of Cataloguing or Authorities.
[2] Check if a value is not overwritten any more.
[3] Run unit test t/db_dependent/FrameworkPlugin.t; don't be distracted by
the noisy warnings of marc21_field_007.pl. They will be addressed on
another report.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 8064 (Merge several biblio records) change some code used in both
biblios and authorities merge tool without updating the authorities
merge tool.
This patch fixes that.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
This patch mainly replaces C4::ItemType->all with
Koha::ItemTypes->search.
Test plan:
At the places where the C4::ItemType module was used, confirm there is
no regression:
- acqui/neworderempty.pl
- catalogue/itemsearch.pl
- admin/item_circulation_alerts.pl
and the 2 cataloguing plugins:
- marc21_linking_section.pl
- unimarc_field_4XX.pl
QA step:
prove t/db_dependent/HoldsQueue.t should return green
Note that the tests were buggy.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Bug 6657 modified the way C4::Biblio::TransformHtmlToMarc operates in order to
solve an issue occuring during biblio record cataloguing. But this function is
also used by authorities cataloguing, and the code in this case is irrelevante.
This followup allows to distinguish for which kind of record
TransformHtmlToMarc is called: biblio/authority.
A bug appears in authority creation without this patch in some circunstances:
when authid is linked to 001 field.
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Tested with a new authority record
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Bug 6657 modified the way C4::Biblio::TransformHtmlToMarc operates in order to
solve an issue occuring during biblio record cataloguing. But this function is
also used by authorities cataloguing, and the code in this case is irrelevante.
This followup allows to distinguish for which kind of record
TransformHtmlToMarc is called: biblio/authority.
A bug appears in authority creation without this patch in some circunstances:
when authid is linked to 001 field.
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Tested with a new authority record
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
These 2 subroutines are now not necessary anymore, we can use
Koha::Authority::Types to retrieve the authority types.
This patch won't be easy to test. Indeed, a lot of file are updated.
To test it I would suggest to focus on the merge authority
You should also confirm that the authtypecode and the authtypetext
values are correctly displayed when navigating in the authority module.
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
This patch removes code related to stopwords usage. The following methods are removed:
C4::Search->remove_stopwords
C4::Context->stopwords
C4::Context->_new_stopwords
And the buildQuery API was changed (removed the \@removed_stopwords return value).
A follow-up is provided for database changes, to make rebasing easier.
To test:
- Apply this patch
- Do some searches in both intranet and opac interfaces
- Nothing should break
Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Some perl scripts have 644 permissions instead of 755.
I think some are special like install-CPAN.pl.
This patch corrects some common perl scripts.
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch improves the existing merging tool by adding possibility to
merge more than 2 biblios.
There is no functional changes:
- Add some biblios to a list
- In the list check some biblios and click on 'Merge selected records'
- Choose the biblio which will be kept, all others will be deleted
- On the next page you have all biblios you chose in tabs (left side
of the screen) and the preview of result (right side)
- Pick some fields or subfields from records that will be deleted or
delete some fields from reference record.
- Click on 'Merge', if there is no errors you are redirected to the
biblio view.
Added checks for non-repeatable subfields
Added checks for mandatory fields and subfields before submitting the
form.
Added a final report which display deleted records (see syspref
MergeReportFields)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch adds a link to duplicate existing items on the edit items screen
To test:
1 - Apply patch
2 - navigate to the edit items screen for a record with existing items
3 - click the duplicate link and ensure item info but not barcode are carried over
4 - save the item and ensure it is added correctly
5 - check that all previous functionality on page works as before
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
The builder of this plugin includes a window.open call with the name
parameter: \"marc21_field_7\"+ event.data.id +\"\"
Note that this is not the name of the new window.
This trivial patch adjusts this unusual name by tag_editor like other
plugins.
Test plan:
Attach marc21_linking_section to 773$9.
Click on the Tag editor button.
If it opens, it still works :)
Note that the name of the popup is still:
Koha > Cataloguing > plugin for links
Signed-off-by: Fredreic Demians <f.demians@tamil.fr>
Plugin still working, with a valid pop-pup window id.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Test plan:
1/ update the Schema (misc/devel/update_dbix_class_files.pl)
2/ Translate templates for some languages (es-DE, de-DE for instance)
3/ Enable them in the pref (search for 'lang') for the staff interface
4/ Go on the item type admin page (admin/itemtypes.pl)
5/ Edit one
6/ Click on the 'translate for other languages' link
7/ You are now on the interface to translate the item type's description
in the languages you want. So translate some :)
8/ Go back on the item type list view (admin/itemtypes.pl)
9/ You should see the original description (non translated)
10/ Switch the language
11/ You should see the translated description in the correct language.
If the description is non translated, the original description is
displayed.
12/ On the different page where the item type is displayed, confirm that
the translated description appears.
Think further / Todo:
1/ Update all occurrences of the item type's description (DONE)
2/ Implement for authorised values
3/ Implement for syspref value (at least textarea)
4/ Implement for branch names
5/ Centralize all the translation on a single page in the admin area
...
N/ Implement a webservice to centralize all the translations and give
the ability to sync the item types/authorised values description with
the rest of the world (push and pull).
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This fixes the following:
* Remove unneeded year on use Modern::Perl
* Fix occasional freeze when reloading existing record
* Fix encoding for returned record on first save to catalog
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This fixes the following:
* License of editor.pl
* Remove tabs
* Use [% interface %]
* Re-order search fields like the old interface
* Add license information for new libraries
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Full test plan is posted on bug. Test plan for system preference:
1. Apply patch, clear cookies.
2. Go to "Cataloging."
3. Add new record, verify that basic editor is used.
4. Navigate to existing record, click on "Edit record", verify that
basic editor is used.
5. Inside basic editor, verify that no button appears to switch to the
advanced editor.
6. Enable the "EnableAdvancedCatalogingEditor" syspref.
7. Repeat above steps, should still go to basic editor, but button
should appear to switch to the advanced editor; click it.
8. Now, adding new records and editing existing records should go to
the advanced editor.
Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch makes YYYY MM and DD display correctly.
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch removes C4::Dates from cataloguing/additem.pl
To test:
- In MARC bibliographic framework, define a default value
for one of the in Tag 952 Subfield struture, e.g. for
subfield x Non-public note. You can define it under
'Advancde constraints'. Define the value similar to the following:
Year:YYYY Month:MM Day:DD
- Create a new item for a biblio and verify that YYYY, MM and DD are
replaced with today's values.
- Apply patch and repeat that previous step behaves as before.
- Verify that the overall functionality of the form is the same
as before applying the patch.
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. With the last script not accept more than YYYYMMDD
If you enter something else, the script sends to the end of line.
This patch follow up the pattern in constraint default value
Patch amended following comment #6 / mv
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
A closer look at this plugin revealed the same things as earlier:
[1] Since the click redirects to leader, the launcher is not used.
In this case no template file existed.
[2] Leader_video does not use Focus while leader does.
This patch removes 'all' traces of leader_video.
It includes a tiny db revision for those brave people using it. The only
behavior change for them is the focus change.
Test plan:
[1] Run the db revision.
[2] Check if the leader plugin still works as expected.
[3] Git grep on marc21_leader_video. Ignore atomicupdate. No PO files :)
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
A closer look at this plugin revealed the same things as the previous
patch for leader_book.
[1] Template leader_computerfile is not used.
[2] The unused template is not up-to-date either.
[3] Leader_computerfile does not use Focus while leader does.
This patch removes all traces of leader_computerfile.
It includes a tiny db revision for those brave people using it. The only
behavior change for them is the focus change.
Test plan:
[1] Run the db revision.
[2] Check if the leader plugin still works as expected.
[3] Git grep on marc21_leader_computerfile. Ignore PO files.
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
A closer look at this plugin revealed the following:
[1] The leader_book builder redirects to leader.pl; the launcher code with
leader_book.tt is dead.
[2] A diff of the two templates showed that most changes are minimal and
irrelevant. Some updates to leader have not been incorporated into
the unused leader_book.
[3] Leader_book does not use Focus while leader does.
This patch removes all traces of leader_book :)
It includes a tiny db revision for those brave people using it. The only
behavior change for them is the focus change.
Another small change: we do not need Search.pm in marc21_leader.
Test plan:
[1] Run the db revision. If you had some field attached to leader_book,
it should be gone.
[2] Check if the leader plugin still works as expected.
[3] Run the FrameworkPlugin unit test. Ignore warnings from field_007.
[4] Git grep on marc21_leader_book. You will only find references to
PO files in misc/translator.
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
This patch makes the following changes to achieve that:
[1] Use Upload.pm in stage-marc-import.pl, upload-cover-image.pl,
offline_circ/process_koc.pl and enqueue_koc.pl.
[2] A new file-upload.js replaces file-upload.inc in the associated template.
We now use ajax to get progress figures instead of launching perl script
upload-file-progress.
The js changes now also allow for aborting a file upload.
[3] Adds a tools/upload script and template. It allows to upload multiple
files at once.
[4] Makes upload-file return error messages in JSON. For a multiple upload,
we could have some files with errors and others without errors.
The upload is now marked as Failed only if there was no upload at all.
[5] The upload plugin is converted to use tools/upload with plugin param.
Deleting an upload is now presented via the search results form.
NOTE: In editing the process_koc.tt I noticed that the form enqueuefile was
hidden and no longer used (with associated code in process_koc.pl). When a
file has been uploaded, I display the form again (with the Apply directly
button). The code still works.
NOTE: We fix an error in upload-file from one of the patches of bug 6874.
The userid of the Koha admin user is passed to haspermission, but we
should pick the userid from the session.
NOTE: Bug 14686 will add a specific permission for tools/upload.pl, and
will add the tools/upload script to the Tools menu.
For now, you need edit_catalogue to start upload.pl and you will
additionally need a permission like upload_local_cover_images
to successfully upload a new file.
Test plan:
[1] Upload a marc file in stage-marc-import. (This is temp storage.)
[2] Check new entry in table uploaded_files. Look for the file in your
temporary directory (/tmp ?), subfolder koha_upload.
Bonus: Remove permissions on this subfolder. Retry, check error and
restore permissions again.
[3] Upload another (larger) file and abort the upload. Check table and
directory again. You should have a partial file, but no record.
[4] Verify that Stage for import still works as expected.
[5] Test Upload local cover image. (Enable OPACLocalCoverImages.) You can
test an individual image or a zip file including images and a file
called datalink.txt (with lines biblionumber,filename).
[6] Test uploading a offline circulation file:
Enable AllowOfflineCirculation, and create a koc file (plain text):
Line1: Version=1.0\tA=1\tB=2
Line2: 2015-08-06 08:00:00 345\treturn\t[barcode]
Note: Replace tabs and barcode. The number of tabs is essential!
Checkout the item with your barcode.
Go to Offline circulation file upload. Upload and click Apply directly.
Checkout again. Upload again, click Add to offline circulation queue.
[7] Upload three files via tools/upload.pl with a category and marked as
public. Check the results in the table.
Verify that you can download the file in OPAC without being logged in.
[8] Pick one new file and one of the files of step 7. Upload them in the
same category. One upload should succeed. Check for reported error.
[9] Connect upload.pl to field 856$u.
Goto Cataloguing editor.
In an empty 856$u, click the tag editor. Upload a file and click Choose.
Save the record. Open the record in the OPAC and click the link.
Copy this link to your clipboard for next step.
[A] Go back to editor. Click the tag editor on the same 856 field.
Choose for Delete.
Open the link in your clipboard again. Error message?
[B] Check the process of upload, search, download and delete of an upload
with some diacritical characters in the filename. (Bonus points for
adding special chars in the category code.)
Note: You can add categories via authorized values, UPLOAD key.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Bug 14321: [QA Follow-up] Perltidy upload.pl
Run perltidy -pro=xt/perltidyrc on tools/upload.pl.
No other changes.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Test plan: See Bugzilla.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
This patch adds the table of items on additem.pl to the columns
customizer.
Test plan:
1. Open item editor on a record, and verify that all columns are visible.
2. Apply patch.
3. Reload editor, and verify that column visibility hasn't changed.
4. Open "Hide/show columns," and verify that you can add and remove
columns.
5. Change the visibility and togglability of some columns in
columns_settings.pl, and verify that these correctly apply to
additem.pl.
NOTE: The columns that are configurable are selected from the non-hidden
columns that have mappings to MARC subfields in the default MARC21
framework (and can thus be displayed in the item editor).
Signed-off-by: Jenny Schmidt <jschmidt@switchinc.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Add subfields l, n and o for better UNIMARC compliance
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Note: I just did a code audit here, as I don't know enough about
UNIMARC to know if the 4XX fields should have these subfields.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
The cn_browser.pl cataloguing plugin only searches for used callnumbers
on the bibliographic database. There is no need for this plugin to
require special permissions besides access to the catalog.
To test:
- Link the cb_browser.pl cataloguing plugin to 952$o in your favourite cataloguing framework
- Login with a superlibrarian user
- Try the plugin
=> SUCCESS: you can use it
- Login with a user that has the full 'tools' permission
- Try the plugin
=> SUCCSES: you can use it
- Login with a user that doesn't have full 'tools' permission
but has the normal catalogue and cataloguing permissions.
- Try the plugin
=> FAIL: you are requested to login with a different user
- Apply the patch
- Retry
=> SUCCESS: you can use it
- Sign off :-D
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This script does not need a few modules:
IO::File; CGI::Session; C4::UploadedFile.
Warnings can be enabled (with Modern::Perl).
Indirect object syntax replaced for CGI and CGI::Cookie.
Moved the $reply line upwards (not needed twice anymore).
Test plan:
[1] Log in as staff user. Run the URL cataloguing/merge_ajax.pl.
You should see the JSON reponse in the browser.
[2] Logout. Run the URL again. Blank screen.
[3] Go to addbooks.pl (Cataloging Search). Search something, select two
biblios and click Merge selected, etc.
Signed-off-by: Joonas Kylmala <j.kylmala@gmail.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
These 3 should use C4::Output not to explode.
Test plan:
Link the plugins with the correct fields
They should not log an error when calling them
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
The cataloguing plugin stocknumberam123.pl is broken and no
longer generating numbers - this patch fixes it.
To test:
- Link a subfield to the plugin - usually it's 952$i or the UNIMARC
equivalent in your MARC frameworks
- Create a new item, set the inventory number to: A 0000000002
- Start to catalog another item, enter A into inventory and
- Enter A as stocknumber and activate the plugin by clicking on
... at the end of the field
- The number will not get added - Firebug shows an error:
Undefined subroutine CGI::output_html_with_http_headers
- Apply patch
- Verify numbers are now generated and no errors are shown
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
The cataloguing plugin stocknumberAV.pl is broken and no
longer generating numbers - this patch fixes it.
To test:
- Link a subfield to the plugin - usually it's 952$i or the UNIMARC
equivalent in your MARC frameworks
- Set up a new authorised value INVENTORY, the code is an uppercase
prefix - "B"
- The Descriptions is your starting number - 1
- The OPAC description remains empty
- Catalalog an item
- Enter B as stocknumber and activate the plugin by clicking on
... at the end of the field
- The number will not get added - Firebug shows an error:
Undefined subroutine CGI::output_html_with_http_headers
- Apply patch
- Verify numbers are now generated and no errors are shown
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
This patch does:
[1] Some trivial template changes. Modified some comments (POD lines).
[2] Converted plugin to new style.
[3] Table updates: renames id to hashvalue, adds a autoincrement id,
adds filesize, timestamp, owner and category.
RM: This db rev is in a separate sql file in atomicupdate.
[4] Code references to computed hash renamed to hashvalue instead of id.
[5] Removed some code pertaining to exposing upload dir structure. The user
now may choose a category; the uploader takes care of storage.
The list of upload categories is now taken from authorised values; this
might become a separate table in the future. (If there are none,
the upload process creates one default fallback.)
We can add e.g. permissions later, subdir structure, etc. (So dir will
not necessarily be category anymore.)
Test plan:
[1] Run the db revision.
[2] Upload new file. Check the record in the table. Delete it again; check.
[3] Run t/db../UploadedFiles.t.
[4] Run t/db../FrameworkPlugins.t -incl cataloguing/value_builder/upload.pl
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
This adds a dependency on bug 5010, in that the protocol is
assumed in the OpacBaseURL system preference. It also adds
improved error handling.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
This updates the license text for
- C4/UploadedFiles.pm
- cataloguing/value_builder/upload.pl
- opac/opac-retrieve-file.pl
to GPL v3 as per the
http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence
text.
TEST PLAN
---------
1) Don't apply this patch as part of 6874.
2) Run the koha qa test tool.
-- It will FAIL for those three file.
3) Apply this patch
4) Run the koha qa test tool.
-- License problem is corrected, no FAILs.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Two problems were discovered while doing a fresh install
of Koha. These problems in the kohastructure.sql file are
addressed with this patch.
Clicking the plug-in icon should cause the popup window
to refocus. This adds the refocus code to the upload.pl file.
The path to the jquery.js script was wrong in the
upload_delete_file.tt file. Changed [% themelang %] to
[% interface %].
If a user clones 856$u after uploading a file, deletes the file,
and then clicks the plugin icon on the first 856$u, this will go
immediately to the upload screen with an informative error
message.
After some validation was added, it was extended to include
other cases. This serves to patch 6874 to a state where sign
off should be possible.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
This patch adds a javascript and a server-side checks
Test plan:
1/ Choose a file, leave the radios not selected and submit
2/ You have a javascript alert which prevents form to be submitted
3/ Disable javascript and repeat step 1
4/ Form is submitted but form is redisplayed with an error message
telling you to choose a directory.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
* Renames uploadPath to upload_path to follow the standard naming
conventions in koha-conf which use underscores rather than camel case
* Remove reference to intranet-tmpl and replace with [% interface %]
required to pass qa
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Add unit tests for C4::UploadedFiles and move a variable
declaration at subroutine level instead of file level.
Add dependency to Test::CGI::Multipart
Still works, and the newly-provided unit tests have good test
coverage:
C4/UploadedFiles.pm 90.7 65.0 66.7 100.0 100.0 0.2 86.4
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Squash of the following commits:
return with explicit undef removed
Follow-up for PBP fixes
follow-up fix POD syntax
follow-up jquery has moved
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: removed POD changes in Biblio.pm while rebasing.
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
New cataloging plugin upload.pl and new system preference 'uploadPath'.
upload.pl provide a way to upload files on the server and store a link
(url) to it in MARC
uploadPath is the absolute path on the server where the files will be
stored. It's possible to have a hierarchy of directories under this path
and the plugin will allow to choose in which directory to store the
file.
Stored value in MARC subfield looks like this:
<OPACBaseURL>/cgi-bin/koha/opac-retrieve-file.pl?id=<SHA-1 of the file>
So both 'uploadPath' and 'OPACBaseURL' sysprefs have to be set for this
plugin to work correctly
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Slightly amended/simplified the patch during QA: The changes to
GetMarcUrls are not really needed, and would have needed some
attention. Another link text can be supplied by the plugin too.
This also reduces the need for changes in basket.pl,
MARCdetail.pl, detail.pl, opac-basket.pl and opac-detail.pl.
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Edit: more meaninfull commit subject
When searching for multivolumes titles, UNIMARC 4xx field plugin
displays the title of the biblios (200$a), without giving info about
volumes (200 $h $i). It neither doesn't display $e (subtitle) info which
could greatly help to disambiguate search result.
The displayed title is supposed to link to a biblio record view (MARC /
normal). It doesn't work.
TO TEST:
- On a UNIMARC Koha, add a new biblio record
- Call the 4XX plugin from 461/463 field
- Search for a biblio record which contains 200$e, and/or 200$h and/or
200$i subfields.
- You get a result list, with two issues:
1. $a, $h & $i aren't displayed
2. Biblio title is not a link
- Apply the patch, and repeat previous steps.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
I got a link on fulltitle, but in 'ahie' order (not aehi)
Fixed some tabs.
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
The builder contains js functions with a parameter like subfield_managed
or i or something similar. This parameter contains the html id of the
field corresponding with the plugin.
With the functionality of Koha::FrameworkPlugin in place, we can eliminate
one js function call and get the same id via the event passed in. Note
that this actually makes the function a 'real' event handler.
Also note that in many cases this parameter was not used but the id
was borrowed from a perl variable like $params->{id}. If the field is not
cloned, this is not a problem. But some fields can be cloned and should
not use the static perl value but should get it from the event.
Test plan:
Look for js errors when loading the marc editor.
Since the Focus or Click event code has been touched for most marc21
plugins, move your cursor into the field or click on the tag editor
button. Verify that the focus event updates the correct field or the
click event correctly launches the plugin AND the value comes back into
the right field.
Bonus: Attach a plugin with popup (like leader) to 040$d. Clone this field.
Verify that the two launch buttons operate on the correct value.
(This resolves a current bug.)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Checked all 15 plugins.
Plugin marc21_linking_section seems to work, but I could not get it to pass
back something useful into my field. (Same without this patch.)
Tested the clone button with leader on 040d.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
All seems to work, no errors
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch converts marc21 plugins to new style by making the following
modifications:
[1] Replace use strict with use Modern::Perl. This implies that we now
re-enabled warnings. There are no redefine warnings anymore, but note that
we need to silence some warnings from individual plugins that were covered
by disabling the warnings pragma until now. Silencing these individual
warnings is outside the scope of this report.
[2] Sub plugin_javascript is replaced by an anonymous subroutine $builder.
[3] The parameters of $builder are combined in a params hashref. In most
cases we only need $params->{id} for the function name.
[4] Javascript function Clicxxx is renamed to Clickxxx.
[5] The builder does no longer return function_name.
[6] Sub plugin is replaced by subroutine $launcher.
[7] The parameters of $launcher are combined in a params hashref. We only
use $params->{cgi}. Mostly we save that to $input. One exception: $query.
[8] The plugins returns a hash with $builder and/or $launcher.
Test plan:
[1] Run t/db_dependent/FrameworkPlugin.t -incl cataloguing/value_builder/
marc21*.pl. This should catch compile errors and general problems when
building or launching these plugins.
NOTE: You will see several initialize warnings from individual plugins that
were hidden until now by disabling warnings. This is fine; we will be
able to address these warnings now on new reports.
[2] Check behavior of several plugins in the marc editor.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Checked all marc21 plugins. Attached unused plugins to some field.
Some plugins (unused by default) may need some further attention, but
also outside the scope of this report.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
New warnigs, but all seems to work.
No errors.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
marc21_field_003.pl: copy-pasta comment about date removed
marc21_field_005.pl: commented use removed
marc21_field_006.pl: old/irrelevant pod lines
marc21_field_007.pl: old/irrelevant pod lines
marc21_field_008.pl: old/irrelevant pod lines, move sub par line twice
marc21_field_008_authorities.pl: whitespace, old/irrelevant pod lines
marc21_field_040c.pl: two commented lines removed
marc21_field_040d.pl: whitespace, commented lines, old/irrelevant pod
marc21_field_245h.pl: whitespace
marc21_linking_section.pl: relocated some comment lines, and replaced a new
CGI object by the one passed in via the plugin launcher (agreed, this may
not be so trivial as the other changes)
Test plan:
These (trivial) changes are hard to test.
Pick a few plugins and verify that behavior is not changed in the marc
editor.
For the brave: Try marc21_linking_section.pl.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tried marc21_linking_section.pl :)
(ling plugin to 773$9, create new record, search for parent and check values inserted)
No errors
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Preliminary work on marc21_field_008.pl and 008_authorities.pl.
Moving $dateentered en $defaultval to lower scope level.
date_entered is a new sub (in a module); sub Field008 has been reduced to
one line.
Added a trivial unit test for date_entered.
Note: the format used in date_entered could be added in DateUtils, moving
this logic to a better place.
Test plan:
Use both plugins in the marc21 editor (biblios/authorities).
Run the adjusted unit test.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Both plugins works, no errors
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Preliminary work before converting to new plugin style. Several files still
contained tabs or had strange indentation.
Perltidied: marc21_linking_section.pl
Perltidied: marc21_field_007.pl
Perltidied: marc21_leader_authorities.pl
Perltidied: marc21_leader.pl
Perltidied: marc21_leader_book.pl
Perltidied: marc21_leader_computerfile.pl
Perltidied: marc21_leader_video.pl
Test plan:
Run perltidy -pro=xt/perltidyrc on marc21_linking_section and compare.
Try another one too :)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Minor differences on comparison :)
No errors
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 14047: Sort z39.50 servers in Acquisition
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 14047: [QA Follow-up] Move result_class back into attributes
No need to put this into a separate call.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Note that we strictly speaking do not need the hashref inflator here,
because TT understands hash.column as well as object.property.
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
As Jonathan Druart discovered, we were still missing an important attribute
in the selects. Var mv.name was not filled, so the name was empty with nice
side-effects :)
While fixing this, it was also possible to delete some unused vars that Bernardo
already mentioned before: $attributes and $attributes_no_value.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
For me the simptom was different, when saving an edited item
fields were mangled beyond repear :(
No alert for empty mandatory fields.
But this last patch fix the problem.
Tested add/edit items
Cleaner pl file :)
No errors
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Adjusting a few small things and making qa tools happy:
[1] Remove .hidden after [% avalue %] in additem.tt. (Typo)
[2] A closer look revealed that mv.avalue is useless too. An input element
does not contain any content. Putting it after the hidden element
in a non-visible context has no meaning.
[3] Change handling of select attributes readonly and disabled.
[4] Remove unused variable $attributes_no_value_textarea
[5] Removed a comment with TODO referring to this report.
[6] Moving a duplicated TT variable (mv.javascript) outside IF statement.
[7] And finally could not resist this one: Moving strings Tag editor and
No popup from script to template. Plugins++
NOTE: Most item plugins redirect click to focus. In that case there is
no popup, but unfortunately the text Tag editor comes up.
When you remove or rename function Click, No popup comes up. So it works.
Sorry that this small list kept growing :)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch removes HTML code from additem.pl.
To test:
1. Check no regressions on Add/Edit/Save items
2. Update translation files for a language,
check new strings "Tag editor" & "No popup" on staff PO file
3. Check it passes xt/tt_valid.t
Patch partially rebased, part rewritten.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
The text for the marc field are truncated to 22 chars when displaying an
error on mandatory fields.
This limitation is useless and this patch removes it.
Test plan:
Create a mandatory subfield and set a long text (more than 22 chars)
edit or add an authority, click on save.
You should get the error displayed with the full text
Note that this patch modifies the same code for biblio.
Test plan is the same for biblio.
Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
change table id in css file
+ C4::Output is used (Undefined subroutine
CGI::output_html_with_http_headers)
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
When editing an item, the call number browser search for existing call number. If it shows a line is green between two calli numbers, the call numbers searched is available. If the call number is highlighted in red, it means that it already exists. This can be used to avoid repeated call numbers in your collection.
The call number browser also shows its position relative to the rest of the collection.
Sponsored-by: CCSR
To test :
1) Go to MARC bibliographic framework
Home › Administration › MARC frameworks
2) Click in MARC structure (Default framework)
3) Search field 952 and click in subfields
4) Edit subfield o (Full call number)
5) Click Display more constraints
6) In Others Options, Plugin, Choose cn_browser.pl and save changes
7) Search a record and edit its items
Validate : three points (…) beside Full call number input
8) Click in …
Validate : if it can not find the given call number, a green line is shown. Otherwise, the given call number is highlighted in red.
Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Magnus <magnus@enger.priv.no>
Works as advertised. QA scripts pass.
Tested together with other patches. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Bug 13364 - fix datatables.inc
http://bugs.koha-community.org/show_bug.cgi?id=13364
Signed-off-by: Magnus <magnus@enger.priv.no>
Works as advertised. QA scripts pass.
Tested together with other patches, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Bug 13364 - Add a call number browser in item edition page - QA fixed
Tested together with other patches.
Signed-off-by: Marc Véron <veron@veron.ch>
Bug 13364 - Add a call number browser in item edition page - QA fixed II
Tested together with oter patches.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
http://bugs.koha-community.org/show_bug.cgi?id=9987
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch fixes the pod errors on those two files by removing the pod
section that actually does not add anything useful.
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch makes the following cleanup actions for all plugins:
1- Remove sub plugin_parameters. This function is not used.
2- Remove empty plugin or empty plugin_javascript subs.
3- Remove empty Blur, Clic or Focus routines from javascript.
4- Remove pod lines (copy-pasta) only referring to the 3 plugin subs.
5- Remove the last 1; line. It is no longer needed.
Test plan:
Run the unit test t/db_dependent/FrameworkPlugins.t
Test some cataloguing plugins in addbiblio.
Test some item plugins in additem and neworderempty.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
I also checked the syntax of all plugins with perl -c.
And checked the pod (if any) with podchecker: Two files still produce a
warning; the follow-up deals with them: unimarc_field_686a/_700-4.pl.
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
The EXAMPLE plugin helps you to create a new style framework plugin by
providing a simple working example and additional documentation for
developers.
Test plan:
[1] Connect the EXAMPLE plugin to one or more fields.
[2] Try the following events:
a- Focus: If the field is empty, it should put EXAMPLE: into it.
b- MouseOver: If the field is empty and you move your mouse over it,
it should have the same effect as Focus.
c- Change: Edit the field in the editor and tab out of it, the color
of the text should toggle (randomly) between red, green and blue.
d- KeyPress: If you edit the field and you type @, it should give AT.
e- Click: Click on the tag editor. Change the value in the popup.
If you press OK, the field should be changed.
[3] Would the documentation in the perl script help you to create a plugin?
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch implements the use of Koha::FrameworkPlugin in Cataloguing,
Authorities, Acquisition, Serials and Tools.
The main change is architectural: see the commit message of the previous
patch. No changes in behavior are expected, but the support of new events
may provide additional functionality in the future. Some small bugs are
resolved along the way.
The change primarily focuses on the MARC and items editor in Cataloguing.
But the MARC editor for Authorities and the item editor in Acquisition,
Serials and Tools are touched too. This commit message gives some comments
per module.
NOTE FOR CATALOGUING:
A new plugin without popup (or other click event code) now shows the title
No popup when hovering over the tag editor image. The image alerts the
user on a plugin, the title tells about its status. The noclick property
allows for further style modifications in the template. Note that a
follow-up patch will clean up the old style plugins too with the same
effect.
Some additional code in cataloging.js makes it possible to clone subfields
with plugins (although only theoretically useful). The clones use the
same javascript functions but event.data contains an updated id.
This effectively resolves bug 13306. Note that if old plugins do not use
the javascript parameter for the id but the perl variable, cloning does
still operate on the wrong field (with and without this patch set).
In the absence of report 12176 in master, it is not yet necessary to modify
additem.tt. When it gets pushed, it should be an easy rebase.
New style item plugins will no longer need an extra parameter. (The code in
the FrameworkPlugin object actually takes care of that.)
NOTE FOR AUTHORITIES:
This patch also adds class name tag_editor to the buttonDot anchors. This
effectively makes the same tag editor image appear as in Cataloguing.
Futhermore it removes the button from the tab sequence if there is no click
event (really effective after conversion to the new style, since the old
style plugins contain empty onclicks and launchers).
Both small adjustments increase consistency between auth and bib edits.
NOTE FOR ACQUISITION:
In Acquisition two scripts use an item editor, but in a different way.
The scripts addorderiso2709 and neworderempty both rely on the routine
PrepareItemrecordDisplay in C4::Items, but neworderempty creates item
blocks dynamically via an ajax call to services/itemrecorddisplay.pl.
In order to make the dynamic item blocks work with plugins, some code
changes were needed in additem.js. (Normally the event binding is done
at document ready time; now it must be done later.)
At this moment the routine in Items.pm contains the html tags, and this
makes changes to the following templates not necessary for now:
* acqui/addorderiso2709.tt
* services/itemrecorddisplay.tt
Report 13397 has been opened to address moving the html to the templates.
NOTE FOR SERIALS:
Script serial-edit relies also on C4::Items (just as in Acquisition).
This makes changes to serials/serials-edit.tt not necessary for now.
NOTE FOR TOOLS:
The current code in tools/batchMod.pl allows the use of plugins for batch
modification of items. This patch just converts that code to use the new
object. Most item plugins however may not be very useful for operating on
multiple items at once.
PERFORMANCE:
I have benchmarked build_tabs in addbiblio to see how especially the
additional processing of the javascript in the FrameworkPlugin object
would impact performance. Testing default MARC21 framework with 8 plugins
gave the following figures:
- Old situation: 851 ms
- New situation: 942 ms (+10,7%)
- New situation after plugin cleanup: 881 ms (+3,4%)
Note also that adding lines for event binding is compensated by removing
lines for unused events. Page load should essentially be the same.
TEST PLAN:
Suggestion: If you also apply the next patch with the EXAMPLE plugin, you
can test with a rather harmless plugin (with popup) on various places :)
But your test should also include old style plugins, with[out] popups.
If you want to test a new plugin without popup, rename/remove Click$id
in the javascript code of the $builder definition (temporarily).
[1] Test Cataloguing:
- Add/Edit biblio. Try plugins with and without popup.
- Add/Edit items. (EXAMPLE can be used as an item plugin with popup.)
- Clone a subfield with plugin (use EXAMPLE): Verify that the plugin
works on both original and clone with the respective field values.
Is the value put back in the right field too?
[2] Test Authorities:
Edit an authority record. Try plugins with an without popup.
[3] Test Acquisition:
Set system preference AcqCreateItem to "placing an order".
Check the item editor in the following two places:
a- addorderiso2709: Open a basket, add an order from a staged file.
Select a file, click Add orders, and go to tab Item information.
b- neworderempty: Open a basket, add an order from a new empty record.
[4] Test Serials:
Check the item editor on serials-edit. Go to subscription detail.
Click Receive. Choose "Click to add item". (Note that this subscription
should create an item record when receiving this serial.)
[5] Test Tools:
Check the item editor for batch item modification. Enter a few valid
barcodes and press Continue to reach the item editor.
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
With the fast cataloging permission, a librarian was not able to
add/edit items and to delete a record with the FA framework.
This patch fixes that.
Test plan:
0/ Set the permission fast_cataloging (and only this one under
editcatalogue) to a librarian
1/ Log in with this account
2/ Go to Circulation > Fast cataloging
3/ Confirm you can create a record
4/ Save and confirm you can create items
5/ Confirm you are able to edit items, remove all of them and delete the
record.
6/ Make sure it only works for records with the FA framework code.
Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
If you uncheck the checkbox OPAC in the bibliographic framework
definition for an item subfield that is linked to an authorized
value list, the pull down will disappear from the item edit
form on staff. The label still shows.
1) Go to administration > bibliographic frameworks
2) Select a framework and go to the item field (MARC21: 952)
3) Edit a subfield with an authorized values list like damaged,
lost or withdrawn
4) Uncheck the checkbox for OPAC visibility
5) Edit or add an item within your chosen framework
6) Verify the subfield code and description are shown, but the
pull down has disappeared
7) Apply patch, verify the pull down shows now
8) Also test following hidden combination works correctly:
OPAC: checked
All other options: unchecked
Documentation of hidden values:
http://wiki.koha-community.org/wiki/Hidden_values
With special thanks to Jonathan Druart for helping me figure this out!
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
The title method of MARC::Record does not deal with UNIMARC, it should
not be called if the marc flavour is UNIMARC.
Test plan:
On an unimarc installation, edit a notice, with this patch you should
see
"Editing TITLE (Record number BIBLIONUMBER)"
Without, the title was not displayed.
Same in the breadcrumbs.
Bug 13635: Remove another useless call
There is another call to the title method in additem.pl without any
check on the marc flavour.
But here the title variable sent to the template is redefined 3 lines
later.
So it can be simply removed.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested on UNIMARC install, editing a 'record' (not notice) does not show
title on breadcrumbs, status bar or page title.
With patch it does!
No koha-qa errors.
Signed-off-by: joel aloi <aloi54@live.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
It duplicates what the first patch does.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This button lets you replace existing authorities using a Z39.50 search.
http://bugs.koha-community.org/show_bug.cgi?id=11961
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
All tests pass
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
As it seems, this plugin has been created for UNIMARC field 328
(Dissertation note). It refers to authval category LABTHE.
The plugin seems however not to be used: it contains several critical errors.
I tried a quick fix but it was not good enough. Since the code can be
recovered from git (if needed), a real fix can always follow this patch.
What are some problems:
[1] The path to the template is wrong. Should be cataloguing/value_builder
[2] The plugin parameter $input is not used. A new CGI object is created.
[3] Resolving errors 1 and 2 still results in premature end of script
headers.
[4] Not sure whether the plugin can effectively handle missing LABTHE values.
Instead of keeping this in Koha, I opt for removing it for now. As additional
argument I would mention that labs_theses does not have Focus or Blur actions,
only the Click action that does not work.
Test plan:
Git grep on labs_theses.
Signed-off-by: Frederic Demians <f.demians@tamil.fr>
This antique plugin deserves to live forever in Git Historical Museum.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Small fix so the patch applies.
To reproduce, edit, index notice with utf-8 char and search for it
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
See the wiki page for the explanation.
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch
- removes all html_entity usages in tt file which hide utf8 bugs
- removes all encode utf8 in tt plugins because we should get correctly
marked data from DBIC and other sources directly (cf plugin EncodeUTF8
used in renew.tt)
- adds some cleanup in C4::Templates::output: we now use perl utf8 file
handler output so we don't need to decode tt variables manually.
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
to test...
1/ attempt to add a new bib in the cataloguing editor, default framewok
- observe 245b subfield is visible in the editor, for tab 2
2/ uncheck the OPAC visibility for 245b, within the framework editor - then save
3/ repeat step 1/
- observe that the 245b subfield has disappeared from the cataloguing editor!
4/ apply patch,
5/ repeat step 1/
- observe that the 245b subfield now displays correctly in the cataloguing editor
note: this looks looks like a typo bug, that has been in koha for years
Signed-off-by: wajasu <matted@34813.mypacks.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This report is connected to bug 10480 which will change the general
mechanism of loading plugins, but can be tested independently and ahead
of that proposed change.
Several unimarc plugins use a wrapper sub. The code of this subroutine
is not exactly the same for all plugins: in some cases the routine is
extended for double character strings (dblspace and dblpipe). It would
not hurt to use the extended code for all plugins.
By moving the code to a module, we prevent redefinition
when two or more plugins are loading wrapper in a do-statement.
NOTE: You will not see wrapper redefine errors in your log, since the
plugins do not use the warnings pragma (yet). Since this patch touches
seventeen unimarc plugins, a unimarc signoff is preferred :)
Test plan:
Use some plugins changed in this patch (if not in use already).
Load the MARC editor.
Click on some tag editor-buttons to check unchanged behavior.
Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Unimarc plugins work as usual. No regression. Simple code
factorization.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
In working on bug 10480, I noticed that these plugins needed some attention:
[2] unimarc_field_123i.pl: added missing template
[3] unimarc_field_123j.pl: resolved missing template with same file
[4] unimarc_field_210c_bis.pl: removed a warn, corrected some POD lines
Note about UNIMARC field 123i and 123j: Subfields $i and $j are each 8
characters long and contain the same components as subfields $f and $g
except that character position 0 contains a plus sign (for the northern
celestial hemisphere) or a minus sign (for the southern celestial hemisphere).
Test plan:
Connect unimarc_field_123i and 123j to some field.
Look especially at changing + or - for the hemisphere in the popup.
Check left-padding with zeroes for the other positions.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script.
Checked plugin in a UNIMARC installation.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This bug adds a new preference, "SubfieldsToAllowForRestrictedEdition,"
but the use of the term "Edition" in this context is incorrect. I think
it would be more clear to change the preference name to
"SubfieldsToAllowForRestrictedEditing." This patch makes this change.
I realize this isn't a big issue since the preference has a good
description, but I thought that if we were going to make this as clear
as possible now would be the time to do it.
To test, start with a database which hasn't previously been used to test
Bug 7673. Apply all patches and run the database update. Follow the test
plan as described in the bug.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, change appears complete.
All tests and QA script still pass.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
If the sysprefs are empty, we assume that the librarian can edit all
subfields, even if s/he has the restricted permission.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
To know if the user is a superlibrarian, we have to call
C4::Context->IsSuperLibrarian
Signed-off-by: Koha Team AMU <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Two permission names have been changed since the first patch.
Signed-off-by: Koha Team AMU <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
The both syspref names have been changed since the first patch.
Signed-off-by: Koha Team AMU <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
The pref SubfieldsToAllowForLimitedEdition should not affect Fast
cataloguing framework (FA).
Signed-off-by: Koha Team AMU <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch adds the following permissions:
- editcatalogue.limited_item_edition: Limit item modification to barcode, status and note
- editcatalogue.delete_all_items: Delete all items at once
- tools.items_limited_batchmod: Limit batch item modification to item status
The SubfieldsToAllowForLimitedEdition syspref is used to define which subfields can be edited
when the editcatalogue.limited_item_edition permission is enabled.
In the same way, the SubfieldsToAllowForLimitedBatchmod is used to define which subfields
can be edited when the tools.items_limited_batchmod permission is enabled.
Signed-off-by: Koha Team AMU <koha.aixmarseille@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Instead of removing all warnings, we should remove warnings about the
redefined subroutines.
Test plan:
- link the dateaccessioned plugin with one of your biblio field
- edit an item
- verify they are no warnings in the Koha log file.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch makes it possible to include SRU servers in Z3950 search.
It adjusts the Z3950Search routine in Breeding module.
It also replaces SQL code with DBIx statements in Breeding.pm/Z3950Search
and the associated scripts z3950search.pl in cataloguing and acqui.
Test plan:
Verify if a normal Z3950 search still works in cataloging/acqui.
Add a SRU target. (You could just use Koha's port 9998.)
Define sru_options like sru=get.
Use that target in a Z3950 search in cataloging and acqui. (Import.)
Test sru_fields translation by comparing search results between various
settings for some of the fields. For instance, leave title empty and
after that set it to the title field of your SRU target.
Signed-off-by: Giuseppe Angilella <giuseppe.angilella@ct.infn.it>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Replaces name by servername, type by servertype for running Z3950 search.
Limit search scripts to zed (z3950) servers until sru is supported.
Test plan:
Perform a Z3950 search in Cataloguing and Acquisition.
Verify that it still works as it did.
Signed-off-by: Giuseppe Angilella <giuseppe.angilella@ct.infn.it>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch removes HTML code from additem.pl
To test:
1. Chech no regressions on Add/Edit/Save items
2. Update translation files for a language,
check new string "Tag editor" on staff PO file
3. Check it pass xt/tt_valid.t
Rebased
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
There are two instances on this file, but they are not used.
I suppose is old code that was left dangling.
Both scrolling_list, CGIPublisher and CGIitemtype, are not
used on unimarc_field_4XX.tt nor any other file.
Just removed from file two useless db queries.
To test:
1. Apply the patch
2. If you have unimarc config, just go to one of the
fields that use this plugin.
If you don't, can edit you framework and change the plugin
for a tag, e.g. 007. Then save fw, search and edit a record,
clic to open plugin on 007 tag, check that works but don't
save the original record, finally revert your changes.
There must be no functional changes, is unused code.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Verified plugin still seems to work:
- item type pull down shows up correctly
- search works and choosing a record will fill subfields
Passes tests and QA script.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch removes the only instance in this file
To test:
1. Apply the patch
2. If you have UNIMARC, search for a record, edit it,
and go to tag 225
If you don't, edit your framework and connect this
pluging to some tag/subtag
3. Clic on the plugin link. If you don't have any record
that correspond to the search, can remove the commented
line to have something to play
4. The collection pulldown was replaced, check that works,
select a value and press Ok
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes tests and QA script, tested according to test plan.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Same situation as Bug 12694.
There are two instances on this file, but they are not used.
I suppose is old code that was left dangling.
Both scrolling_list, CGIPublisher and CGIitemtype, are not
used on marc21_linking_section.tt nor any other file.
Just removed from file two useless db queries.
To test:
1. Apply the patch
2. Can't remember how to trigger this plugin.
You can edit you framework and change the plugin
for a tag, e.g. 007. Then save fw, search and edit a record,
clic to open plugin on 007 tag, check that works but don't
save the original record, finally revert your changes.
There must be no functional changes, is unused code.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Followed test plan successfully. The behavior of the plugin window
appears to be unchanged after applying the patch.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Amending the test plan a bit: The plugin was added by bug 8185
- not dead code at all :)
In order to test:
- Edit one of your frameworks, make 773 atwxz9 visible.
- Link 773 $9 to the marc21-linking-section plugin
- Create a new record in cataloguing
- Search for a your host item record (parent)
- Link it
- Observe that the subfields have been filled with information
from the other record
$w = 001 from the parent
$9 = biblionumber from the parent
$t = Title
$x = ISSN
...
Still works with the patch applied.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
FAIL cataloguing/value_builder/unimarc_field_125.pl
FAIL pod
*** ERROR: empty =head1 in file cataloguing/value_builder/unimarc_field_125.pl
*** ERROR: Spurious text after =cut in file cataloguing/value_builder/unimarc_field_125.pl
FAIL cataloguing/value_builder/unimarc_field_126b.pl
FAIL pod
*** ERROR: empty =head1 in file cataloguing/value_builder/unimarc_field_126b.pl
*** ERROR: Spurious text after =cut in file cataloguing/value_builder/unimarc_field_126b.pl
FAIL cataloguing/value_builder/unimarc_field_225a.pl
FAIL pod
*** ERROR: =over on line 40 without closing =back (at head1) in file cataloguing/value_builder/unimarc_field_225a.pl
*** ERROR: empty =head1 in file cataloguing/value_builder/unimarc_field_225a.pl
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch just adjusts several POD stuff, and in a few cases
reorganizes a hash definition in order to use spaces instead of tabs
for the QA script to be happy.
Nothing important, really. This patch series just changes '.tmpl' for
'.tt'.
Regards
To+
PS beware that running the koha-qa.pl script can take lots of time on this one
:-D
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Since we switched to Template Toolkit we don't need to stick with the
sufix we used for HTML::Template::Pro.
This patch changes the occurences of '.tmpl' in favour of '.tt'.
To test:
- Apply the patch
- Install koha, and verify that every page can be accesed
Regards
To+
P.S. a followup will remove the glue code.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch extracts variables with HTML from addbiblio.pl
and an instance of CGI::scrolling_list
As it changes how MARC editor show input fields, I prefer
not add patches for other cases mentioned on Comment #1
To test:
1. Verify there are no regressions on MARC editor
Add/Edit records, modify values
2. Update translation file for a language,
check new string 'Tag editor'
About the error message on error when deleting biblio,
it must be localized but the script is not trying to
use a template file, only prints a basic html and aborts.
Perhaps a way of handling errors more gracefully is needed,
but again it need to be solved on it's own bug.
Updated test plan
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
To test:
1/ go to /cgi-bin/koha/cataloguing/z3950_auth_search.pl when you are not
logged in, notice no log in is enforced
2/ Apply patch
3/ go to /cgi-bin/koha/cataloguing/z3950_auth_search.pl notice you now
need to login
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
To test:
1/ go to /cgi-bin/koha/cataloguing/z3950_search.pl when you are not
logged in, notice no log in is enforced
2/ Apply patch
3/ go to /cgi-bin/koha/cataloguing/z3950_search.pl notice you now need
to login
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch adds material type checking to the MARC21 008 tag editor,
based on value from the leader. That is, the 008 tag editor
will choose an initial material type based on the leader 06
(and if necessary the leader 07 position)
_TEST PLAN_
1) Create a new record or open an existing bib record
2) Change position 6 from its current value (probably "a") to
"c" or "e" or "g" or "m" or "p". (See the end of this message
for a comprehensive list of 06 values to try.)
3) Open the 008 tag editor
4) Note that it still says BKS even though it should say "MU"
or "MP" or "VM" or "CF" or "MX".
5) Apply the patch
6) Repeat steps 2 and 3.
7) Note that the 008 tag editor now shows the correct material
type based on the leader.
8) For more comprehensive checking, try switching position 6
back to "a" and changing position 7 to "b" instead of "m".
9) Note that it will switch from "BKS" to "CR".
10) Fin
Comprehensive mapping:
Field 008/18-34 Configuration
If Leader/06 = a and Leader/07 = a, c, d, or m: Books
If Leader/06 = a and Leader/07 = b, i, or s: Continuing Resources
If Leader/06 = t: Books
If Leader/06 = c, d, i, or j: Music
If Leader/06 = e, or f: Maps
If Leader/06 = g, k, o, or r: Visual Materials
If Leader/06 = m: Computer Files
If Leader/06 = p: Mixed Materials
http://www.loc.gov/marc/bibliographic/bdleader.html
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described, nice job.
koha-qa complains for a tab char, removed on followup.
Mode change on TT file (+x), removed.
No other errors
NOTE: It would be desirable to update LEADER values
to reflect changes on 008.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Awesome work David.
Many form elements on the add item page are giving a tabindex of "1" by
the script. This seems to make it impossible to tab through the add item
form fields onto the save buttons. I don't see a reason to set an
explicit tabindex of "1," so this patch removes it.
To test, apply the patch and open an item for editing. Try tabbing
through the add item form fields. It should be possible to tab through
the fields and onto the submit buttons at the bottom. Test again when
adding a new item.
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Test Plan:
1) Apply patch
2) Run updatedatabase.pl
3) View some records with authorities
4) Note your previously set authority separator should still be in use
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No koha-qa errors.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
When importing records, the ISBN is normalized and stored
into database (see C4::ImportBatch::_add_biblio_fields). But when
searching with ISBN into reservoir, it is not normalized
(see C4::Breeding::BreedingSearch). So search does not match.
This patch adds the normalisation to reservoir search. Also, it
replaces call private method _isbn_cleanup by GetNormalizedISBN,
the correct public method. Also allows the reservoir search
on ISBN with hyphens.
This is intended to fix only reservoir searches.
Revised Test plan
-----------------
1) Back up DB
2) Save copy of attached example somewhere findable
2) Home -> Tools -> Stage MARC records for import
3) Click Browse and select the example MARC file
4) Click Upload file
5) Tweak as desired then click Stage for import
6) Click Manage staged records
7) Click Import this batch into the catalog
8) Home -> Cataloging
9) In the Cataloging search text box type 978-0-691-14289-0 and
click Submit
-- ISBN13 with hypens not found in reservoir
10) In the Cataloging search text box type 9780691142890 and
click Submit
-- ISBN13 without hypens not found in reservoir
11) In the Cataloging search text box type 0-691-14289-0 and
click Submit
-- ISBN10 with hypens not found in reservoir
12) In the Cataloging search text box type 0691142890 and
click Submit
-- ISBN10 without hypens found in reservoir
13) Apply patch
14) Repeat steps 9-12, this time it is always found! :)
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch makes Koha <-> Zebra use MARCXML for the serialization when
using DOM, and USMARC for GRS-1.
* The following functions are modified to set the Zebra record syntax
according to the current sysprefs and configuration:
- C4::Context->Zconn
- C4::Context-_new_Zconn
* A new function 'new_record_from_zebra' is introduced, which checks the
context we are in, and creates the MARC::Record object using the right
constructor.
The following packages get touched to make use of the new function:
- C4::Search
- C4::AuthoritiesMarc
and the same happens to the UI scripts that make use of them (both in
the OPAC and STAFF interfaces).
* Calls to the unsafe ZOOM::Record->render()[1] method are removed.
Due to this last change the code for building facets was rewritten. And
for performance on the facets creation I pushed higher version
dependencies for MARC::File::XML and MARC::Record (we rely on
MARC::Field->as_string).
* Calls to MARC::Record->new_from_xml and MARC::Record->new_from_usmarc
are wrapped with eval for catching problems [2].
* As of bug 3087, UNIMARC uses the 'unimarc' record syntax. this case is
correctly handled.
* As of bug 7818 misc/migration_tools/rebuild_zebra.pl behaves like:
- bib_index_mode (defaults to 'grs1' if not specified)
- auth_index_mode (defaults to 'dom')
here we do exactly the same.
To test:
- prove t/db_dependent/Search.t should pass.
- Searching should remain functional.
- Indexing and searching for a big record should work (that's what the
unit tests do).
- Test an index scan search (on the staff interface):
Search > More options > Check "Scan indexes".
- Enable 'itemBarcodeFallbackSearch' and try to circulate any word, it
shouldn't break.
- Searching for a biblio in a new subscription shouldn't break.
- Running bulkmarcimport.pl shouldn't break.
- And so on... for the rest of the .pl files.
[1] http://search.cpan.org/~mirk/Net-Z3950-ZOOM/lib/ZOOM.pod#render()
[2] a record that cannot be parsed by MARC::Record is simply skipped (bug 10684)
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
In biblio (or authority) record editing or creation, Bug 3727 added
an empty value to combobox for subfields using itemtype authorized values,
which is mandatory and does not have a default value. This to avoid
selecting arbitrarily the first value of the combobox.
This patch extends this behavior to normal authorized values like CCODE,
COUNTRY ...
Also, when record already exists and has a defined value for the subfield
this value will be selected in combobox so there is no need for an empty
value.
Test plan :
- In a biblio framework, set a subfield mandatory and using itemtypes
authorised values
- Set a default value for this subfield
- Create a new record with the framework
=> You see the subfield with a combobox, the first empty value is selected
- Go to biblio framework and set a default value for the subfield
- Create a new record with the framework
=> You see the subfield with a combobox, the default value is selected
and there is no empty value
- Select an other value and save the record
- Edit this record
=> You see the subfield with a combobox, the saved value is selected and
there is no empty value
Perform same tests with a normal authorized values categorie (instead of
itemtypes).
Perform same tests with with authority creation/edition
Perform same tests with a normal authorized values categorie and authority
creation/edition
Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described.
Fridolyn: I had a lot of difficulty understanding your test plan,
especially since the second line should not be in the test plan
(since if there is a default value, no empty value should appear).
Perhaps it would be useful to use more whitespace to separate
steps and the things for which a tester should check.
Also, it might be useful to specify what testers should check for
before and after applying the patch, so that they're sure that the
behaviour has been corrected.
In any case, the patch works! Certainly a helpful addition.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
1) Adding a bibliographic record
Subfield is mandatory, no default value:
- adding record: no value is preselected, empty value exists
- editing record: saved value is shown, empty value exists
Subfield is mandatory, defined default value:
- adding record: default is preselected, no empty value
- editing record: saved value is shown, no empty value exists
Subfield is not mandatory, defined default value:
- adding record: default is preselected, empty value exists
- editing record: saved value is shown, emtpy value exists
Subfield is not mandatory, no default value:
- adding record: empty value is preselected
- editing record: saved value is shown, empty value exists
2) Adding an authority record
Repeating tests from above.
- Subfield is mandatory, no default value: OK
- Subfield is mandatory, defined default value: OK
- Subfield is not mandatory, defined default value: OK
- Subfield is not mandatory, no default value: OK
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
By adding:
title=\"Tag editor\"
into the HTML generated in addbiblio, a tooltip displaying
'Tag editor' appears when the mouse is hovered over the
plugin icon.
Test Plan:
1) Log into Staff client
2) Click the 'Search the catalog' tab
3) Type something which will generate results
4) Click the title of a result
5) Click the 'Edit' button
6) Scroll down and click the 'Edit Record'
7) Look through the various tabs and notice that all the plugin
icons have no tooltip.
8) Apply the patch
9) Refresh the page
10) All the plugin icons should have the tooltip text of
'Tag editor'.
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Adds a title attribute. Works as described.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch fixes a problem where if a staff user has superlibrarian
permissions, but also has module-specific permissions, they are
prevent from editing item records that they should be allowed to.
To test:
[1] Turn on IndependentBranches.
[2] Register a superlibrarian staff user at branch A.
[3] Give that new account at least one other module-level
permission. This cannot be done through the user interface,
however, but can be done via SQL:
UPDATE borrowers SET flags = 3 WHERE userid = 'XXX';
[4] Log in as that new superlibrarian.
[5] Bring up the item details (catalogue/moredetail.pl) page for
an item at branch B. Note that there is no 'Edit Item' link.
[6] Similarly, try editing that item (cataloging/additem.pl). Note
that the edit form forbids you from touching the item.
[7] Finally, try editing that item using the Tools | Batch item
modification utility. Note that it doesn't allow you to do so.
[8] Apply the patch.
[9] Repeat steps 5 through 7. This time, the item actions should
be allowed.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes QA script and test suite.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
The method of checking the logged in user for superlibrarian privileges
is obtuse ( $userenv && $userenv->{flags} % 2 != 1 ) to say the least.
The codebase is littered with these lines, with no explanation given. It
would be much better if we had one subroutine that returned a boolean
value to tell us if the logged in user is a superlibrarian or not.
Test Plan:
1) Apply this patch
2) Verify superlibrarian behavior remains unchanged
Signed-off-by: Joel Sasse <jsasse@plumcreeklibrary.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on second patch.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
When QueryParser is off, the cataloging search is passing the incorrect
variable to SimpleSearch. I'm sure this is causing other issues, but
the one I have identified is that any searches with an "&" in them
return no results. This patch corrects the bug.
Test Plan:
1) Catalog a new record titled "Cats & Dogs"
2) Rebuild your zebra index so this record is indexed
3) Browse to cataloguing/addbooks.pl
4) Search for "Cats & Dogs"
5) Notice you get no results
6) Apply this patch
7) Repeat the search
8) Notice your result now shows up!
Signed-off-by: Heather Braum <hbraum@nekls.org>
Signed-off-by: Suzanne Fayle <sfayle@roseman.edu>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This works as described, passes all tests and QA script.
Note: Because $query = $builtquery when the QueryParser is used,
this problem is only visible when UseQueryParser is set to "Don't try".
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch adds a plugin for field 100 of UNIMARC
authorities.
To test on a UNIMARC site:
1) Apply the patch
2) Edit some authority framework, field 100
3) Link subfield 'a' to unimarc_field_100_authorities.pl
plugin, save
4) Edit or add auth record, click on '...' to bring plugin
5) Modify field 100a
6) Save record
Thanks to Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> for
converting Vitor's original patch to a Git patch and doing
some tidying.
Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Stephane Delaye <stephane.delaye@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Mandatory item fields are not indicated the same way in all places. This
patch corrects two places where required fields were shown in bold
rather than using the standard "required" class: When adding an order
from a staged file and when adding an item for a new issue of a serial.
This patch also normalizes the text input size on item entry forms: In
some places it was 50, others 67. I have changed the latter to 50.
Unrelated changes: Added $KohaDates formatting of date and time and
corrected capitalization on a heading on the add order from staged file
page.
It would be nice to be able to use the same method for displaying the
item form as we use on neworderentry.tt -- pulling in the form from a
separate include. However that system is designed for handling multiple
items and would need to be adapted for these cases.
To test, you must have a staged file from which to add an order. Open an
existing basket or create a new one and choose to add an order "From a
staged file." Choose a staged file from which to order. The item entry
form under the "Import all" heading should show required fields in red.
To test in serials: Begin the process for receiving an item from an
existing subscription. On the serials-edit page, find the "Click to add
item" links and click to open the item edit forms. There should be one
under the numbered issue and the supplemental issue forms. In both cases
the item edit screen should show the mandatory item fields in red.
Confirm that the cataloging add item form looks correct and works
correctly.
Revision: Left out the "required" note which should appear after each
required field.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
When the only non-ascii characters in a new child record
are latin + diacritic in the range covered by Latin-1 they
are not being added to a new child record correctly encoded.
Explicitly setting the record's encodiing ensures that
they are interpreted correctly.
see "Unicode Bug" in perldoc perlunicode for background on
why these characters are special
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well. No koha-qa errors.
Same test as before
1) with a record with diacritics in author/title,
2) press new child record, on new record 773adt
with mangled accents
3) Apply patch
4) Repeat 2, now good results
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Tested with a record containing umlauts in the title,
$t was empty before and umlauts in $a mangled.
After applying the patch fields are correctly filled and
diacritics display correctly.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
BiblioAutoLink was being called expecting an array to
be returned. The subroutine in fact returns a scalar
As the variables that the return was stored in, went
out of scope immediately. It is probably better to be
explicit that we are throwing the return away by not
going through the motions of storing it in a variable
To test:
[1] Add or save a bib record using the cataloging editor.
[2] Verify that no regressions have occurred
[3] (optional) If BiblioAddsAuthorities is on, verify that
relevant authority records are linked to from the bib.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
- improve POD
- remove extraneous comments
- correct license statement in new files
- remove backticks in database update SQL
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch introduces a new Z39.50 interface for searching Z39.50
compliant databases for MARC authority records.
These databases aren't as common as their bibliographic equivalents,
but they're out there and very useful. I have included info at the
bottom of this messsage for sample authority databases you can try.
To test this patch:
1) Set up Z39.50 client targets for authority databases. (I've included
information at the bottom of this message for LibrariesAustralia's
test server for authorities as well as instructions on how to use
your Koha's z39.50 authority server as well. The Library of Congress
also has authority databases available (unsure if these are test or
prod), and you might have access to others through OCLC or RLIN. OCLC
provides login credentials for their test databases.
2) Go to the Authorities module
3) Click on the new "Z39.50 search button"
4) Select your authority search targets from the list.
5) Do a search for an authority you would like using either the "Raw"
input box or the more specific input boxes for names, subjects, subject
sub divisions, or titles. (I like searching Name (personal): Eric on
the LibrariesAustralia test DB.)
6) You should see a table listing the server, heading, authority type,
and two other columns (MARC and a nameless column). "Authority type"
is the type of authority it will become when imported in to Koha. In
the Eric example, "PERSO_NAME".
7) Click on "MARC" next to the results of interest to review the MARC
authority record.
8) When you're satisfied with a record, click on "Import".
9) The pop-up window will close and your original Koha window will
change to the "Adding authority Personal Name" screen (in the Eric
example).
10) All the relevant fields should be filled out for the record. Review
them and make any changes as necessary. (N.B. The 001 will be cleared
when saved, so if you have a use for the imported control number, move
it to the 010, 016, or 035 as appropriate. If you have a default value
for the 003, this will also likely be overwritten. Move it if necessary.
The 005 will also be updated when saved, so do not worry about that.)
11) When you're satisfied, click save.
12) Presto! You've imported your first authority record via Z39.50!
--
Here is the info for the LibrariesAustralia test Z39.50 authority
database:
Z39.50 server: LibrariesAustralia Authorities
Hostname: z3950-test.librariesaustralia.nla.gov.au
Port: 210
Database: AuthTraining
Userid: ANLEZ
Password: z39.50
Syntax: MARC21/USMARC
Encoding: utf8
-
The U.S.A. Library of Congress also provides Z39.50 access to its Name
and Subject Authorities (http://www.loc.gov/z3950/lcserver.html).
Name Authority:
Z39.50 server: Library of Congress Name Authority File
Hostname: lx2.loc.gov
Port: 210
Database: NAF
Syntax: MARC21/USMARC
Encoding: utf8
Subject Authority:
Z39.50 server: Library of Congress Subject Authority File
Hostname: lx2.loc.gov
Port: 210
Database: SAF
Syntax: MARC21/USMARC
Encoding: utf8
(N.B. Both of these databases also include title authorities.)
-
For testing purposes, you can also set up a Z39.50 client target,
which points at your own Koha instance's Z39.50 authority server.
To find the hostname, go to /etc/koha-conf.xml and find the value for
the <listen id="authorityserver"> element. Depending on your
configuration, this could be something like the following:
unix:/zebra/koha/var/run/zebradb/authoritysocket
(N.B. You might be using a different scheme than unix sockets...)
To find the database, scroll down to the bottom of koha-conf.xml until
you reach the <config> element. Within this, look for the value of the
element <authorityserver>. It should probably be "authorities".
To set up this Z39.50 client target in Koha...
Z39.50 server: my koha authorities
Hostname: unix:/zebra/koha/var/run/zebradb/authoritysocket
Port:
Database: authorities
Userid:
Password:
Syntax: MARC21/USMARC (or whichever flavour you need)
Encoding: utf8
Signed-off-by: Mason James <mtj@kohaaloha.com>
Bug 10096 [FOLLOW-UP] - Add a z39.50 interface for authority searching
This patch adds the "recordtype" column to the "z3950servers" table.
The value in this column (biblio or authority) then controls whether
the z3950 server shows up in a bibliographic search (through the
Acq and Cataloguing modules) or in an authority search (through
the Authorities module).
I also edited the z3950 management console to show this value
and allow users to edit it. The default value is "biblio", since
the vast majority of z3950 targets will be bibliographic. However,
there is an option to add/edit a z3950 target as a source of
authority records.
Test Plan:
1) Apply both patches
2) Run updatedatabase.pl (after setting your KOHA_CONF and PERL5
environmental variables)
3) Use the test plan from the 1st patch
N.B. Make sure that your Z39.50 client target has a Record Type
of Authority, otherwise it won't display when you're doing a
Z3950 search for authorities.
Signed-off-by: Mason James <mtj@kohaaloha.com>
Bug 10096 [FOLLOW-UP] - fix tabs/whitespace errors to pass QA
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
For some reason, _increment_barcode is called twice in succession in
cataloguing/additem.pl
Test Plan:
1) Enable autobarcode = incremental
2) Catalog an item, not the barcode
3) Apply this patch
4) Catalog another item, the barcode should be the next in line
as previously. No change should be noted.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Test Plan:
1) Apply the patch
2) Run updatedatabase.pl
3) Set WhenLostForgiveFine to Forgive & WhenLostChargeReplacementFee to Charge
4) Issue an item to a borrower, then set to lost from catalogue/moredetail.pl
5) Observe the replacement fee has been charged
6) Return the item
7) Observe the charged fee has been forgiven
8) Set WhenLostForgiveFine to Don't Forgive
9) Repeat 4-6
10) Observe the charged fee has not been forgiven
11) Set WhenLostChargeReplacementFee to Don't Charge
12) Repeat 4
13) Observe that a fee was not charged
Signed-off-by: Alex Hatley <alexh@cctexas.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch adds functionality to forgive overdue fine when an item is
set to lost status. Fines are forgiven only when the syspref
WhenLostForgiveFine is set to yes. Item can be set to lost status from:
- catalogue/moredetail.pl
- cataloguing/additem.pl
- tools/batchMod.pl
- misc/cronjobs/longoverdue.pl
Changed subroutine C4::Circulation::LostItem to forgive fines on the
item depending on the value of syspref WhenLostForgiveFine. This
routine is currently used to return an item and charge a replacement
cost.
Also added a new syspref in C4::Circulation::LostItem -
WhenLostChargeReplacementFee. The replacement fee will now be charged
only if this syspref is set to yes. The default value of the
WhenLostChargeReplacementFee is yes, meaning that current behavior
will not change during upgrade.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Alex Hatley <alexh@cctexas.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Testing notes on last patch in series.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Comment: Work as described, no koha-qa errors
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Copying the test plan from the bug report:
A.
1) have $a active in one of the linking fields (like 461, 463, etc.).
2) have a biblio record with the field 700 $a, $b, $f filled up
3) go to cataloguing -> field 4XX of your choice, use the plugin to
fetch data from biblio rec. mentioned in 2)
4) see the punctuation in $a -- it will be wrong (no closing bracket)
B.
1) have $a active in one of the linking fields (like 461, 463, etc.).
2) have a biblio record with the field 700 $a, $b, $c, $f filled up
3) go to cataloguing -> field 4XX of your choice, use the plugin to
fetch data from biblio rec. mentioned in 2)
4) see the punctuation in $a -- it will be wrong (dash instead of
semicolon between original $c and $f, no closing bracket)
C.
1) have $a active in one of the linking fields (like 461, 463, etc.).
2) have a biblio record with the field 702 $a, $b, $c filled up
3) go to cataloguing -> field 4XX of your choice, use the plugin to
fetch data from biblio rec. mentioned in 2)
4) see the punctuation in $a -- it will be wrong (unnecessary semicolon
after original $c, n.b. lacking space).
D.
1) have $a active in one of the linking fields (like 461, 463, etc.).
2) have a biblio record with the field 712 $a, $b filled up
3) go to cataloguing -> field 4XX of your choice, use the plugin to
fetch data from biblio rec. mentioned in b)
4) see the punctuation in $a -- it will be wrong (unnecessary opening
bracket at the end).
Test plan, all tests and QA script pass.
Thx Bernardo for his testing and explanations!
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
To test:
[1] Turn UseQueryParser off.
[2] Ensure that your database has records in the reservoir. Performing
a Z39.50 search will do this.
[3] Perform a broad cataloging (i.e., cataloguing/addbooks.pl search).
Note that results are returned from the main catalog but that no
reservoir results are returned.
[4] Apply the patch.
[5] Perform the search again. This time, there should be both catalog
and reservoir results.
[7] Enable QueryParser. Perform the search again, and verify that the
catalog and reservoir results are the same.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch works nicely, passes all tests, and the QA script.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch changes the MARC21 007 plugin editor so that it uses
1 character instead of 4 characters for position 01.
TEST PLAN:
1) Create new record/edit an existing record
2) Using the tag editor for the 007 field, choose "Videorecording"
3) Click OK
4) Change the second character in the 007 from "c" to "d"
5) Open the tag editor again
6) Note that position 01 will still say "c - Videocartridge" rather
than "d - Videodisc".
7) Exit tag editor
8) Apply patch
9) Reload the page (Shift + Refresh is always useful)
10) Open the tag editor again
11) Note that position 01 will now say "d - Videodisc"
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Although previous/next browsing was added for searches in the OPAC
in 2011, the staff client has been without any sort of search browsing.
Until now. This patch is an all-singing, all-dancing, all-compatible
implementation of search browsing that will work across multiple
browser tabs and on any browser since IE7 (though the staff client
layout is broken on IE7).
To test:
1) Perform a search that will bring up multiple results.
2) View one of the results.
3) Use the Previous and Next links to browse along the search results.
4) Use the "Return to results" button to check that you end up at the
correct page of results, even if you page through more than 20
records.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Refactors Z3950Search.
Disable batch record counts for z3950 records.
Test plan:
Do various Z3950 searches on multiple targets from Cataloging and Acquisition.
Behavior should not have changed.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This follow-up moves all the MARC-specific functionality of Koha::Record
(now renamed to Koha::MetadataRecord) to a Koha::Util::MARC utility class.
To test, run relevant unit tests:
> prove t/Koha_MetadataRecord.t t/Koha_Util_MARC.t t/db_dependent/Koha_Authority.t
and optionally try to merge a record.
Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch refactors the merge record interface and code a little bit
in preparation for making it possible to merge authority records.
To test:
1) Apply patch.
2) Try merging two records:
a) Create a list.
b) Add two records you would like to (or be willing to) merge
to said list.
c) View said list.
d) Check the checkboxes next to the two records you added.
e) Click "Merge selected records."
f) Choose a merge reference.
g) Choose fields from each record that you want to keep.
h) Click "Merge."
3) Confirm that your merged record has the fields and subfields you
wanted.
4) Run the unit tests for the two files that were changed:
prove t/Koha_Record.t t/db_dependent/Koha_Authority.t
5) Sign off.
Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Move the XML and XSD data files so that access to them
(particularly the XML files) is not blocked by the Apache
configuration change introduced by the patch for bug 9812.
To test, after applying the patch.
[1] Open a MARC21 bibliographic record in the cataloging editor.
[2] Click on the plugin link for the 008 field. Verify that
that the form for all of the fixed field positions is displayed,
and verify that you can change the type of material.
[3] Repeat step 2 for the 006 field.
[4] Verify that there are no entries in the Apache error log that contain
client denied by server configuration: {...}/cataloguing/value_builder/marc21_field_008.xml
or
client denied by server configuration: {...}/cataloguing/value_builder/marc21_field_006.xml
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Also verified translation of those plugins still works correctly.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch corrects more places in Koha where the path to the "prog"
theme is hard-coded in templates, CSS, and scripts.
Staff client home page:
Paths to the Koha logo background image and the module image sprite have
been corrected. Inactive and hover states of the module links
(circulation, patrons, etc) should look correct.
addbiblio.pl:
An <img> tag is replaced with a text link and an
additional CSS class. CSS uses an image-replacement technique to display
the image as before.
To test, open a blank or existing bibliographic record for editing.
Confirm that the "tag editor" icon displays correctly in two cases: 1)
tags linked to plugin editors and 2) tags linked to authorities. Both
should look correct and work correctly.
System preferences:
The system preferences editor appends a "loading" image to system
preference submit buttons when they are clicked. This patch changes
ajax.js to insert a <span> styled with a background-image instead.
To test, open system preferences and modify any preference. Submit the
change and confirm that the "loading" image appears correctly.
Background jobs:
Any place in Koha where a background job is used displays a progress
bar. This patch corrects the path in CSS to the progress bar image. To
test, perform an action which triggers the display of a progress bar.
For instance, batch modification of items. Confirm that the progress bar
image displays correctly.
blue.css:
I don't know if this is still used by anyone, but a couple of image
paths in this CSS file have been corrected.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests, QA script and test plan.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This routine has been introduced by commit 2d90fb22d4.
The only call has been removed by commit 9eba7dc594.
So now, this routine is useless.
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
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>