Jesse Weaver [Tue, 9 Jun 2015 22:22:05 +0000 (16:22 -0600)]
Bug 14464: Add ability to cancel waiting holds from checkin screen
Test plan:
1. Ensure that ExpireReservesMaxPickUpDelayCharge is set to 0.
2. Place a hold (doesn't matter whether it's a bib/item-level hold),
then confirm the hold by checking it in.
3. Check in the item again, and hit Cancel.
4. The reserve in question should be cancelled.
5. Repeat steps 2-4 twice, once after setting
ExpireReservesMaxPickUpDelayCharge to a nonzero value and again
after clicking the "Forgive fees for manually expired holds"
checkbox.
A fine should only be applied when the syspref is enabled and the
checkbox is not checked. Also, the checkbox should only appear after
enabling the syspref. And finally, the checkbox should remember whether
it is checked across multiple checkins, same as the "Forgive overdue
charges" and "Book drop mode" checkboxes.
Signed-off-by: Jason Burds <jburds@dubuque.lib.ia.us> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: Removed 2 debugging lines. Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Winona Salesky [Mon, 11 May 2015 14:47:36 +0000 (10:47 -0400)]
Bug 14181: MARC21 773 -- Display when ind1 = 0 or blank
Display 773 in opac and staff details when ind1 !=1
Test plan
=========
1/ Add a new record which uses the 773 field to an instance running
master code. (the selected MARC framework should have the 773's
relevant sub-fields enabled and visible on staff client, opac and
the editor).
2/ Set ind1 as '0' (zero). The note should be displayed both on OPAC
as well as the staff client.
3/ Reset ind1 with a non-zero value or leave it blank. The display
note should no longer be visible from either client or opac.
4/ Apply the patch.
5/ Repeat step #1 and #2. The note is displayed on staff and opac.
6/ Repeat step #3. The display note should be visible on both staff
and opac.
7/ run koha-qa.pl -c 1 -v 2
Note : For #1 above, the following LoC record was used:
http://www.loc.gov/marc/bibliographic/examples.html#monographic
The patch applied cleanly and performed as expected.
The koha-qa.pl gave OK as results.
Signed-off-by: Indranil Das Gupta <indradg@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Aleisha [Wed, 12 Aug 2015 00:00:35 +0000 (00:00 +0000)]
Bug 14484: warns when changing patron pw
To test:
1) Go to any patron's page, click Change password
2) Notice warns in error log
3) Apply patch, reload page
4) Click Change password
5) Notice warns are gone and page still works correctly
Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Bug 14646: Koha::RecordProcessor should accept more than one filter
The docs say that Koha::RecordProcessor accepts more than one filter
at a time. But as the regression tests show it doesn't.
This is really important to extend its usage in record processing
(either to enforce policy, transform, etc).
This patch makes ->new evaluate the reference type of the passed filters
and builds an array with a single item if a scalar has been passed. The
loop now explicitly casts the filters as an array.
To test:
- Apply the test patch
- Run
$ prove t/RecordProcessor.t
=> FAIL: tests fail because Koha::RecordProcessor doesn't hanlde
more than one filter at a time.
- Apply this patch
- Run
$ prove t/RecordProcessor.t
=> SUCCESS: tests now pass
- Easy, right? Sign off :-D
NOTE: Read code. Don't like the ? operator logic, but it is
functional despite readability issues.
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>
Bug 14646: (regression test) Koha::RecordProcessor only accepts one filter at a time
This patch introduces new tests to t/RecordProcessor.t so it tests for
creating processors with more than one filter. It does so by running
my $processor = new Koha::RecordProcessor({
filters => ['Null','Dummy']
});
and testing the results.
To test:
- Apply the patch
- Run:
$ prove t/RecordProcessor.t
=> FAIL: tests related to multiple filters fail.
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>
Marcel de Rooy [Mon, 1 Jun 2015 13:21:32 +0000 (15:21 +0200)]
Bug 3333: Confusing item status for not-for-loans
This patch makes a tiny change in C4::Search::searchResults as to the
handling of not-for-loans. This should make the display of status and
availability of items more consistent in opac and staff.
Additionally, a Place hold link should disappear in the opac, when it is
not possible to place a hold on any item of one biblio.
The following spots need special attention; the display should be
corrected by this patch:
[A] Location column showing number of available items in catalogue/search.
[B] Location column of Cataloging Search (addbooks.pl)
[C] OPAC Search results list in non-XSLT view.
NOTE
The forms opac-MARCdetail and MARCdetail also include an Items table with
column Not for loan. The information in this column might still be somewhat
confusing but is actually correct. The column only contains Not for loan if
the item field is set. So it is empty when only the item type is nfl.
Since a correction here is arguable, I am not including it on this report.
Test plan:
[1] Have at least two item types. Mark one item type (X) as not for loan.
[2] Use at least two biblios with two items each. Mark one item of the first
biblio as not for loan at item level (via item editor).
Change one item of the second biblio to the item type of step 1 (X).
[3] Set pref item-level_itypes==item and set all four xslt prefs (for opac
and staff, results and detail) to default.
[4] Check spots A, B and C as mentioned above. Also check:
[D] OPAC Detail, Holdings table, Status column
[E] Staff Detail, Holdings, Status.
[5] Make all four xslt prefs now empty. Check spots A to E again.
Especially observe C here.
[6] Set pref item-level_itypes==biblio. Change your second biblio to item
type of step 1 (X) in the cataloguing editor (MARC 942c).
Check spots A to E again.
[7] Set all four xslt prefs again to default. Check spots A to E again.
[8] Run the unit test t/db_dependent/Search.t.
Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Martin Stenberg [Tue, 18 Aug 2015 14:41:42 +0000 (16:41 +0200)]
Bug 14675: Don't update details if no changes made
if no changes has been made for personal details, bring user back to details
page and inform them that no changes has been made.
Signed-off-by: Aleisha <aleishaamohia@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Kyle M Hall [Mon, 6 Jul 2015 15:00:38 +0000 (11:00 -0400)]
Bug 14498: uri_escape error triggered by duplicate accountno's for patron
If a patron has duplicate accountno's for two different fines in Koha this will trigger the error
usi_escape: Unmatched [ in regex; marked by <-- HERE in m/([ <-- HERE ])/ at (eval 133) line 1.
upon attempt to pay. How those accountno's get duplicated is unknown, but considering accountno
is somewhat vestigial at this point in time, it would be much more sensible to use accountlines_id
which is has guaranteed uniqueness at the database level.
Test Plan:
1) Create a patron with 2 fines
2) Edit the accountno's for those fines and set them to 0
3) Attempt to pay one, note the error
4) Apply this patch
5) Refesh the page
6) Attempt to pay one, no error this time!
7) Test Pay, Write off, Pay amount, Write off all, and Pay selected
Signed-off-by: Deborah Duce <deborah.duce@huntsvillelibrary.ca> 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>
Galen Charlton [Tue, 4 Aug 2015 15:59:39 +0000 (15:59 +0000)]
Bug 14644: unbreak SIP2 terminal login when using telnet transport
This patch fixes breakage introduced by the patch for bug 13506
that prevented SIP2 clients from authenticating themselves over
the telnet transport. Attempts to do so would manifest by the
SIPServer backend crashing and the connection getting closed.
To test:
[1] Use the stock SIPServer config, etc/SIPconfig.xml, and ensure
that the database contains a staff user whose username is 'term1'
and password is 'term1' that has the circulate permission.
[2] Start SIPServer, telnet to port 8023, and attempt to log in. The
connection will be aborted:
$ telnet localhost 8023
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
login: term1
password: term1
Connection closed by foreign host.
[3] Apply the patch and restart SIPSever, then repeat step 2. This time,
the login should succeed:
$ telnet localhost 8023
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
login: term1
password: term1
Login OK. Initiating SIP
Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Bug 14574: Fixing error messages on staff client so they make more sense
To test:
1) Go to cgi-bin/koha/errors/errornumber.pl to see the error messages which currently don't make sense (ie cgi-bin/koha/errors/401.pl etc). Have only made changes to 401, 403 and 404
2) Apply patch
3) Go to cgi-bin/koha/errors/401.pl --> Check that it now says "This error means that you aren't authorized to view this page." and "Please log in and try again.". Check that 'log in' redirects to the log in page (mainpage.pl).
4) Go to cgi-bin/koha/errors/403.pl --> Check that it now says "This error means that you are forbidden to view this page."
5) Go to cgi-bin/koha/errors/404.pl --> This page should be very different. Check that the 'Error 404' is now in italics and not bold. Check that the page gives a list of reasons the user may have been given this error and some options for their next step.
Signed-off-by: Catherine <cnorthcott.work@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: replace tab with 4 spaces.
Note: I am not sure the em tag is useful here. Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Test plan:
1/ On the staff interface create a private list
2/ Go to More > Lists ('Your lists' tab)
3/ Translate the templates to any language like:
$ cd misc/translator/
$ perl translate install es-ES
4/ Enable the translated templates on the sysprefs
5/ Switch to the translated language
6/ Go to the lists page (Mas > Listas in es-ES)
The list should be displayed correctly.
Note: There is a limitation. If a translated string contains a simple
quote ('), it will also break the json.
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@unc.edu.ar>
Jonathan Druart [Tue, 18 Aug 2015 11:43:27 +0000 (12:43 +0100)]
Bug 14529: The new list permission is 'lists', not 'shelves'
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Jonathan Druart [Mon, 13 Jul 2015 16:53:06 +0000 (17:53 +0100)]
Bug 14529: Allow user to delete lists
Bug 13417 allows a librarian to delete any lists if he has the
permission (delete_public_lists).
There is a mismatch in the perm check.
A user can delete a list with the ability to edit (manage) it.
Test plan:
1/ Create a list A with user A
2/ Create a list B with user B
3/ A should be able to manage and delete the list A.
He cans delete B only if he is superlibrarian or has the
delete_public_lists permission.
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
makepartialpayment() wasn't logging the branch either. This patch
fixes that too.
To test:
- Run (with the regression tests applied)
$ prove t/db_dependent/Accounts.t
=> FAIL: tests fail because makepartialpayment is not logging the branch code
- Apply the patch
- Run
$ prove t/db_dependent/Accounts.t
=> SUCCESS: tests pass
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Katrin Fischer [Mon, 8 Jun 2015 01:51:02 +0000 (03:51 +0200)]
Bug 11229: makepayment doesn't log branch in statistics correctly
This patch fixes makepayment() so it correctly logs the branch code
to the statistics table.
To test:
- Run (with the regression tests applied)
$ prove t/db_dependent/Accounts.t
=> FAIL: makepayment() tests fail because logging is wrong
- Apply the patch
- Run
$ prove t/db_dependent/Accounts.t
=> SUCCESS: tests for makepayment now pass
(Note: makepartialpayment tests still fail as they need the next patch)
Original commit message relying on the UI to test:
There are several ways of paying fines, not all of them
recorded the branch the payment was made at correctly:
1) Pay button next to an individual fine
2) Checkbox + pay amount
3) Checkbox + pay selected
For each of those, check if the payment registered in
the table statistics contains the branchcode before
and after the patch.
The patch should fix 1).
2) and 3) are ok with and without the patch.
Important: Don't change the amount, pay individual fines.
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Note: i fixed the commit message, because this is a fix for makepayment
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Bug 11229: (regression tests) makepayment and makepartialpayment should log correctly
This patch introduces tests for makepayment and makepartialpayment to check
they are correctly logging to the statistics table.
To test:
- Run
$ prove t/db_dependent/Accounts.t
=> FAIL: tests fail because statistics are not correctly logged.
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Tools > Export data produces a file badly encoded, when marc/xml file
format is chosen. It works with CSV.
To test:
1. Tools > Export data
2. Choose a limited interval of biblionumber
3. Export in marc/xml/csv.
4. Check files exported at 3: csv file is ok. marc/xml files are
corrupted, ie badly encoded.
5. Apply the patch
6. Repeat steps 3&4, and confirm that all file formats are valid.
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 13485: Add a page to display links to restricted sites
To test:
I) Apply the patch
II) Run updatedatabase.pl
scenario I)
1) Add some content in RestrictedPageContent and RestrictedPageTitle sysprefs.
2) Add your machine ip (ex. 127.0.0)
3) Validate cgi-bin/koha/opac-proxypage.pl shows a page with RestrictedPageContent and RestrictedPageTitle contents.
scenario II)
1) Logout opac page
2) Add some content in RestrictedPageContent and RestrictedPageTitle sysprefs.
3) Add other ip that your machine ip.
4) Validate: cgi-bin/koha/opac-proxypage.pl shows a login page.
5) Validate: cgi-bin/koha/opac-proxypage.pl shows a page with RestrictedPageContent and RestrictedPageTitle contents after login.
Followed both scenarios, works as expected. Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 13485 [QA Followup]
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 13485 - Atomic Update + Rename Proxy page to Restricted page
Test plan:
I) Apply the patch
II) Run updatedatabase.pl
scenario I)
1) Add some content in RestrictedPageContent and RestrictedPageTitle sysprefs.
2) Add your machine ip (ex. 127.0.0)
3) Validate cgi-bin/koha/opac-restrictedpage.pl shows a page with RestrictedPageContent and RestrictedPageTitle contents.
scenario II)
1) Logout opac page
2) Add some content in RestrictedPageContent and RestrictedPageTitle sysprefs.
3) Add a diffrent ip.
4) Validate: cgi-bin/koha/opac-restrictedpage.pl shows a login page.
5) Validate: cgi-bin/koha/opac-restrictedpage.pl shows a page with RestrictedPageContent and RestrictedPageTitle contents after login.
Kyle M Hall [Tue, 17 Mar 2015 14:09:28 +0000 (10:09 -0400)]
Bug 13853: Show waiting hold expiration date for waiting holds in holds ajax datatable
We should show the expiration date for waiting holds in the holds
datatable that appears in circulation.pl and moremember.pl
Test Plan:
1) Ensure ReservesMaxPickUpDelay is set
2) Place a hold on a record
3) Place a second hold and set it to waiting by checking it in
4) Place a third hold with an expiration date
5) View the holds tab on circulation.pl and moremember.pl
6) Note the first hold has no expiration date
7) Note the second hold has an expiration date of today + ReservesMaxPickUpDelay days
8) Note the thrid hold has an expiration date of whatever you set it to
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Cathi Wiggins <CWIGGINS@ci.arcadia.ca.us> Signed-off-by: Megan Wianecki <mwianecki@mplmain.mtpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Kyle M Hall [Wed, 8 Oct 2014 16:04:35 +0000 (12:04 -0400)]
Bug 13030: Show waiting hold expiration date for waiting holds on circulation.pl
We should show the date a waiting hold is set to expire for each hold in
the list of waiting holds in circulation.pl
Test Plan:
1) Apply this patch
2) Find a waiting hold for a patron, browser to circulation.pl
for that patron
3) Set system preference ReservesMaxPickUpDelay to 5
4) Refresh circulation.pl, note the waiting holds now display a
"waiting until" part with the waiting date plus 5 days
5) Set system preference ReservesMaxPickUpDelay to 0 ( or empty
string )
6) Refresh circulation.pl, note the waiting hols no longer have a
"waiting until" line.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Followed test plan successfully. Automated tests successful.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Cathi Wiggins <CWIGGINS@ci.arcadia.ca.us> Signed-off-by: Megan Wianecki <mwianecki@mplmain.mtpl.org>
Bug 13030 [QA Followup] - Fix unit tests
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Fridolin Somers [Tue, 16 Jun 2015 07:40:41 +0000 (09:40 +0200)]
Bug 11325: Focus not on "Add Item" in Lists
When viewing a list, the focus/cursor is no longer on the "add items" field below the list.
This patch moves the "Add Item" form at left part of page so that it is always shown (usefull when there are a lot of items). And adds focus to barcode input so you can enter several items with a barcode scanner.
Test instructions:
1. Create a list
2. Make sure you have an object with an assigned barcode
3. Go to the list
=> The barcode entry interface should be at left and has the focus
4. Enter the barcode and press enter (or use a scanner)
=> The item is added to the list
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
I like the new position.
Works well, focus on input box
No errors
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Marcel de Rooy [Thu, 28 May 2015 09:54:56 +0000 (11:54 +0200)]
Bug 6874: [QA Follow-up] Last adjustments for future developments
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>
Marcel de Rooy [Wed, 27 May 2015 11:52:25 +0000 (13:52 +0200)]
Bug 6874: [QA Follow-up] Adjustments for opac-retrieve
Adds httpheaders sub to UploadedFiles; this will be extended on a new
report. (Idea is to add configurable headers for file extensions.)
Trivial unit test added.
Small cosmetic changes to opac-retrieve-file.
Test plan:
Run test UploadedFiles.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Mark Tompsett [Sun, 12 Apr 2015 03:57:43 +0000 (23:57 -0400)]
Bug 6874: Catch warnings for clean tests.
I hate noisy tests, so I cleaned them up.
MEGA TEST PLAN
--------------
git checkout -b bug_6874 origin/master
git bz apply 6874
-- yes, it should all apply smoothly.
I intentionally restored an old backup from a couple months ago to force the upgrade.
staff client:
-- upgrade
-- login
Koha administration
MARC Bibliographic framework
MARC structure (for BKS)
Search for 856
Subfields
Edit (for u)
Other options
Plugin: upload.pl
Save changes
Search the catalog tab
{choose a word, any word. I used fancy, because I knew we had a cookbook}
click first link
Edit
Edit record
8 (that's the tab name)
click the name for 856
scroll down to u and click the plugin icon
-- Correctly got a configuration error message.
At a command prompt:
vi ~/koha-dev/etc/koha-conf.xml
/enable_plug
-- add in:
<upload_path>{appropriate path. I used /home/mtompset/uploads}</upload_path>
:wq
mkdir {appropriate path used}
-- I even added some subdirectories
sudo chown -R -v www-data.www-data {appropriate path used}
Back in staff client:
click the plugin icon again
-- this time an upload screen pops up
click the 'Upload file' button
-- message about no file or destination
browse for a file, select one
click the 'Upload file' button
-- message about no destination
click the 'Cancel' button
click the plugin icon
click a destination radio button
click the 'Upload file' button
-- message about no file
browse for a file, select one
click the 'Upload file' button
-- message about success
click the 'close' button.
-- the text box has been filled in with a nice URL
click the plugin icon
click cancel
click the plugin icon
click delete
-- the test box should be blanked, and a success message given
click Close
-- reupload a file properly
click the plugin icon
click delete
click upload file
browse for a file, select a destination, click upload file
click close on success message
click 'Clone this subfield'
click the second plugin icon
click delete
click close
click the first plugin icon
-- Nice error message about a URL which points to nothing.
click cancel
In the second 856$u type in a URL (eg. www.google.com)
click the second plugin icon
-- this jumps immediately to the upload screen, but does not give an error message, because the URL does not have opac-retrieve-file in it.
click save (we need to save the bibliographic record)
In OPAC:
search for the same word (I used fancy)
find the entry you just updated with links
click the two links. The dangling entry should give you a 500 error, and the other link should work just fine.
get back to the detail page
In staff client:
edit
edit record
8
change the 856$u to a valid file in the first link.
save
In OPAC:
refresh the detail page, and click the first link again
this time it should get downloaded nicely.
From a command line:
prove -v t/db_dependent/UploadedFiles.t
perldoc C4::Biblio
perldoc C4::UploadedFiles
One more round of tests tomorrow, and this should be ready. :)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Tested on top of 5010
Followed mostly mega test plan, seems to work :)
Can upload, delete, modify, etc
Test runs Ok
No koha-qa errors
I view this as valuable addition, dangling since 2011!
As with 5010, I consider this can be pushed (for 3.22)
and we can fix anything wrong later.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Mark Tompsett [Thu, 17 Apr 2014 00:49:02 +0000 (20:49 -0400)]
Bug 6874: id based on contents, filename, and directory.
This patch corrects the inability to upload the same file to a
different directory, or even a renamed file to the same
directory. By including the filename and directory as part of
the $id SHA generation, only identical files in the same
directory with the same file name will generate the same $id.
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>
Mark Tompsett [Wed, 16 Apr 2014 04:23:40 +0000 (00:23 -0400)]
Bug 6874: Clean up file URL generation
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>
Mark Tompsett [Tue, 15 Apr 2014 03:54:07 +0000 (23:54 -0400)]
Bug 6874: License Text Update
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>
Mark Tompsett [Thu, 26 Sep 2013 15:45:19 +0000 (11:45 -0400)]
Bug 6874: kohastructure.sql, jquery.js, refocus, and more
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>
Julian Maurice [Mon, 30 Sep 2013 07:34:01 +0000 (09:34 +0200)]
Bug 6874: Force user to select a directory
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>
Kyle M Hall [Wed, 25 Sep 2013 07:07:44 +0000 (09:07 +0200)]
Bug 6874: (QA followup) Attach files to bibliographic records
* 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>
Julian Maurice [Wed, 12 Jun 2013 13:12:51 +0000 (13:12 +0000)]
Bug 6874: Move uploadPath syspref to koha-conf.xml
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>
Julian Maurice [Thu, 11 Apr 2013 12:36:27 +0000 (12:36 +0000)]
Bug 6874: Add unit tests for C4::UploadedFiles
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>
Paul Poulain [Tue, 19 Mar 2013 09:48:08 +0000 (10:48 +0100)]
Bug 6874: QA follow-up
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>
Julian Maurice [Wed, 18 Jul 2012 14:47:54 +0000 (16:47 +0200)]
Bug 6874: Attach files to bibliographic records
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
Bug 14534: Stop overdue_notices.pl from issuing the warning: Use of uninitialized value $borrowernumber
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
To test:
1/ Run the overdue_notices.pl script (don't do this on production
obviously :))
2/ Notice the warns
3/ Apply patch
4/ Run again
5/ Notice no warns, but notices are still generated ok
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: tidy whitespaces Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Alex Arnaud [Thu, 11 Jun 2015 08:55:35 +0000 (10:55 +0200)]
Bug 13663: Fix permissions in upload-file.pl and upload-file-progress.pl
Test plan:
Verify that the circulate_remaining_permissions perm is enough to upload
.koc file.
Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Bug 14548: Typo in help file for 3.20 (batch_record_modification.tt)
Typo found in batch_record_modification.tt file for Koha help in 3.20
Test plan:
1) Go to url 'koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/batch_record_modification.tt:20' and check the typo "critera" or go to Tools › Batch record modification, open up the help
2) Apply the patch
3) Repeat step 1 and check if the typo is fixed.
Sponsored-by: Universidad de El Salvador Signed-off-by: Aleisha <aleishaamohia@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Typo found in basket.tt file for Koha help in 3.20
Test plan:
1) Go to url 'koha-tmpl/intranet-tmpl/prog/en/modules/help/acqui/basket.tt:24' and check the typo "susbscription" or go to Acqusitions > create or view an existing basket, open up the help
2) Apply the patch
3) Repeat step 1 and check if the typo is fixed.
Sponsored-by: Universidad de El Salvador Signed-off-by: Aleisha <aleishaamohia@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Chris Cormack [Sun, 26 Jul 2015 07:07:19 +0000 (19:07 +1200)]
Bug 7143: New developers
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Indranil Das Gupta needs to be included. Emmanuele Somma was
missed a while back, so adding ad shifting numbers for people after her.
Some tab fixes too, I don't have the time to fix them all.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Martin Renvoize [Thu, 8 May 2014 15:48:42 +0000 (15:48 +0000)]
Bug 12216: One should be able to override zebra config
One should be able to override zebra configuration on a per instance
basis. This patch adds /etc/koha/sites/instance to the 'profilePath'
in the zebra config files such that that location is sources first
for any override config files.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Great catch Martin. I thought this was already pushed by the way.
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
This will be useful. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Kyle M Hall [Tue, 30 Sep 2014 19:07:50 +0000 (15:07 -0400)]
Bug 13851: Replace waiting holds logic in circulation.pl with Koha Objects
This is the original patch for bug 12892 and replaces the older style of
fetching the holds data with Koha Objects. It will be used as a
foundation for future features.
Test Plan:
1) Apply this patch
2) Create a hold, set to waiting
3) Browse to circulation.pl for that patron
4) Note you see the list of waiting holds
5) Switch your logged in branch to a different branch
6) Note the "Waiting at" line is no longer emphasized.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Cathi Wiggins <CWIGGINS@ci.arcadia.ca.us> Signed-off-by: Megan Wianecki <mwianecki@mplmain.mtpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Mark Tompsett [Fri, 15 May 2015 04:49:18 +0000 (00:49 -0400)]
Bug 13948: Prevent explosion when Template::Plugin::Stash not installed
TEST PLAN
---------
1) Install first two patches
2) do not install, or uninstall Template::Plugin::Stash
3) Upgrade to make sure system preference is added.
4) Set the system preference to turn it on for Staff and OPAC
5) Refresh staff -- kaboom
6) Load OPAC -- kaboom
7) Apply this patch
8) Reload staff and OPAC
-- nice HTML comment about what is wrong.
9) run koha qa test tools.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Neat, runs well. Tested with/without sysprefs and Template::Plugin::Stash
No koha-qa errors
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Kyle M Hall [Thu, 2 Apr 2015 15:14:45 +0000 (11:14 -0400)]
Bug 13948: Add ability to dump template toolkit variables to html comment
It would be incredibly helpful if we could easily enable Koha to dump
all Template Toolkit variables to a comment for debugging purposes.
Test Plan:
1) Apply this patch
2) Run updatedatabase
3) Enable the new system preferences DumpTemplateVarsIntranet and
DumpTemplateVarsOpac
4) Load a page in the staff intranet, view the html source
5) Note the template toolkit variables are embedded in an html comment
6) Load a page in the opac, view the html source
7) Note the template toolkit variable are embedded in an html comment
NOTE: I had to cpan2deb Template::Plugin::Stash to test.
This is not optimal. Additionally:
http://www.template-toolkit.org/docs/modules/Template/Plugin/index.html
does not contain Stash. I suspect this was how it was
introduced initially by TT.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> 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@unc.edu.ar>
Marcel de Rooy [Wed, 20 May 2015 11:42:37 +0000 (13:42 +0200)]
Bug 13049: [QA Follow-up] Remove unneeded module
The call to cronlogaction is done in cleanup_database. So there is no use
in keeping the module here.
Test plan:
Run or compile (perl -c) script delete_expired_opac_registrations.pl.
Run or compile (perl -c) script delete_unverified_opac_registrations.pl.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Marcel de Rooy [Thu, 9 Oct 2014 07:52:44 +0000 (09:52 +0200)]
Bug 13049: Merge selfreg cron jobs into cleanup_database
This patch moves the core code of two selfreg cron jobs into the Members
module. The new routines are called from cleanup_database with two new
parameters. The old cron jobs are now wrappers to cleanup_database.
As a bonus, we can add a unit test now.
In time, we can obsolete the selfreg cron jobs. For now, the code is in one
place and behavior does not change.
A next step (as described on the Bugzilla report) would be: remove the Delay
pref for self regs.
Test plan:
Run the unit test t/db_dependent/Members.t.
Test the two new parameters of cleanup_database.pl.
Verify if delete_expired_opac_registrations.pl still works.
Same for delete_unverified_opac_registrations.pl.
Signed-off-by: Frederic Demians <f.demians@tamil.fr>
. Fixed minor merge confict on UT & cleanup_database.pl
. UT ok
. The two deprecated scripts still work as before, with a warning
message.
. cleanup_database.pl do the deletion job, calling new C4::Members
function rather that doing it directly.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Bug 14240: Add '(All libraries)' to notice deletion form
Trivial patch that shows (All libraries) instead of an empty cell
for notices that are applicable across all libraries.
Test plan
=========
1) Log in to staff client
2) Tools->Notices & slips
3) Add a dummy notice for all libraries
-- test code, test description, email - test subject, test content
Click Submit
4) Click Delete
-- note that the Library column value is blank.
5) Click the no option
6) Apply this patch
7) Click Delete
-- note that the Library column value is (All Libraries).
8) run koha qa test tools.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Bug 10961: (followup) Make query fields explicit and add regression tests
add correct frameworkcode to _koha_marc_update_bib_ids parameters
add test, prove with : prove t/db_dependent/Biblio.t
TEST PLAN
---------
1) git checkout -b bug_10961 origin/master
2) git bz apply 10961
3) git checkout origin/master -- C4/Biblio.pm
4) prove t/db_dependent/Biblio.t
-- was expecting failure, got failure.
5) git reset --hard origin/master
6) git bz apply 10961
7) prove t/db_dependent/Biblio.t
-- success as expected.
8) Read over code.
-- Noted it also grabs the framework code for the biblio, rather than uses default.
And it also corrects an indentation issue.
Test case looks like it attempts to cover the biblionumber!=biblioitemnumber case
by adding 1.
9) run koha qa test tools.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Kyle M Hall [Fri, 27 Sep 2013 16:53:39 +0000 (12:53 -0400)]
Bug 10961: Error in GetMarcBiblio can cause severe data loss
A bug in GetMarcBiblio can cause severe data loss if your database has
records where the biblionumber and biblioitemnumber do not match and the
script misc/batchRebuildBiblioTables.pl is run.
The Biblio::GetMarcBiblio makes a kall to
C4::Biblio::_koha_marc_update_bib_ids which passes the biblionumber as
both the biblionumber *and the biblioitemnumber*.
Thus, if your biblio and biblioitem numbers are not always equal, you
will end up with a record where the biblioitemnumber is incorrect in the
record!
This is usually not a severe issue, but since batchRebuildBiblioTables
uses that record to update the database tables, it ends up updating the
wrong biblioitem row!
NOTE: What a horrible, horrible typo that was. Tested this with the
second patch.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Mark Tompsett [Fri, 3 Jul 2015 22:04:04 +0000 (18:04 -0400)]
Bug 14487: Noise best detected under Debian 8
The first error is caused by the fact that
$messages->{'IsPermanent'} is undefined.
The second error is caused by querying the CGI
parameter 'barcode' inside a function call. This is not required.
There is a variable $barcode set with the parameter. Changed to
use the variable.
TEST PLAN
----------
1) Test first patch.
2) Clear the log
3) Put in a barcode which is not checked out.
4) Check the log.
-- should be two errors. One about a hash,
the other will only be detectable under Debian 8.
5) Apply this second patch
6) Clear the log
7) Put in a barcode which is not checked out.
8) Check the log.
-- should be empty.
9) run koha qa test tools
Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
1/ check out an item and then check it back in.
1/ check the logs after the check-in to see the warns from
returns.pl line 623 of :
(a) Use of uninitialized value $holdingBranch
(b) Use of uninitialized value $collectionBranch
2/ apply patch
3/ check out and check-in again. no warns are recorded this time.
NOTE: Under Debian Jessie, there are other messages.
Additionally, this only corrects the line 623 ones.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Marc Véron [Sat, 2 May 2015 05:20:22 +0000 (07:20 +0200)]
Bug 14107: Patron cards: Make barcode width and height scaling editable
The size of the barcode in patron card creator was hardcoded to 1% of the card height and 80% of the card width.
This patch exposes both values in the layout editor. If no values are given, the previousely hard coded values (0.01 / 0.8) are used in order to work with existing card definitions.
To test:
- Go to Home > Tools > Patron card creator
- Export a patron card (PDF) from en existing definition
- Apply patch
- Export patron card again, compare results (should be the same)
- Go to Home > Tools > Patron card creator > Manage card layouts
- Edit the layout you use for testing and set barcode scaling values e.g. to 0.03 for height and 0.4 for widht
- Export patron card again, verify that barcode size changed
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 14268: Followup - instruction for preftype selection
removes the now redundant instruction "Note: you should have no
reasons to modify the following default values" and replaces it
with "Note: change the variable type to one of the dropdown values
as needed"
Signed-off-by: Tadeasm <tadeas.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Mark Tompsett [Mon, 25 May 2015 19:38:36 +0000 (15:38 -0400)]
Bug 14268: Use dropdown for variable types
The information needed to build the dropdown is already passed.
This patch uses it to build the variable type dropdown correctly.
TEST PLAN
---------
1) Apply 14135
2) In the staff client:
Home -> Global system preferences -> Local use
3) Click 'Edit' on any system preference.
4) Note all the types listed.
5) Click 'Cancel'
6) Apply this patch
7) Click '+New Preference'
8) Enter data to have a decent 'Free' type preference.
9) Click 'Save'
10) For each type noted in step 4 (do 'Free' again last)
a) Click 'Edit' for the added system preference
-- it should be the last saved variable type.
b) Change the variable type to the next type.
c) Click 'Save'
d) Repeat steps (a) through (c) until all the types have
been done.
-- NOTE: Yes, there are other strange things here, but
those are beyond the scope of this bug.
11) Run koha qa test tools
Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> Signed-off-by: Tadeasm <tadeas.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Katrin Fischer [Mon, 8 Jun 2015 02:28:50 +0000 (04:28 +0200)]
Bug 12906: Show shipment date in invoice search result list
Patch adds the shipment as a new separate column to the
search results of the invoices search.
To test:
- Search for invoices in the acquisition module
- Verify the results table shows the shipment date
- Verify that sorting works correctly
Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Mark Tompsett [Thu, 30 Apr 2015 00:52:43 +0000 (20:52 -0400)]
Bug 5685: Add missing about information
In comment #20, Katrin requested the about page be updated
to reflect the addition of a jquery plugin.
TEST PLAN
---------
1) Apply all patches
2) Log in to Staff Client
3) Home -> About Koha -> Licenses
-- jQuery Validation Plugin is now listed nicely.
4) Run koha qa test tools
License appears as expected, qa OK Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Owen Leonard [Thu, 23 Oct 2014 13:50:38 +0000 (09:50 -0400)]
Bug 5685: [OPAC follow-up] Validation of email address field
This patch makes a few changes to the way errors are handled in the
OPAC:
- The validation plugin has been moved from the global include file to
the template itself. Since we aren't doing form validation on any
other page yet it doesn't make sense to include it globally at this
time.
- The error message which appears if you have JavaScript disabled and
have submitted invalid emails was styled in a non-standard way.
- I have added in-page links to the error message which appears if you
have JavaScript disabled so that you can click to jump to the field
which contains the error.
- I have modified the error message language slightly to make it (I
hope) read better.
Signed-off-by: Nicole Engard <nengard@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Juhani Seppälä [Fri, 15 Aug 2014 09:11:17 +0000 (12:11 +0300)]
Bug 5685: Validation of email address field
This patch adds server-side & client-side validation for email
form fields in the members/memberentry -view and in the
opac/memberentry-view (bootstrap).
I recently added simple validation for phone number and email address fields
for our in-house koha and saw this old bug: I'm open to any ideas on how
to do this better. Validation for phone numbers would be easy to add on
top of this but I left it out since this bug is only about the email
fields.
To test:
1) Select a member and go to any of the edit forms with email fields
(Primary info, "Library use", "Alternate address", "Alternative
contact").
2) Disable javascript in the browser in order to test server-side
validation and try to input invalid emails in each of the email form
fields.
3) Confirm that an invalid address is catched from any of the email
fields, an alert shown for each invalid address and that the member's
information was not updated with invalid data.
4) Enable javascript in the browser.
5) Confirm that the jquery validation plugin caches invalid addresses
from any of the email fields and that you cannot send the form before
correcting the problem.
6) Perform the same tests for the opac-memberentry-view.
Note: as the jQuery validation plugin doesn't exist in the bootstrap
folder, I just copied it over from the staff-client folder -how to deal
with this?
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I have undone the changes to opac.css so that they can be submitted as a
separate patch. I have some other follow-ups to make as well.
Signed-off-by: Nicole Engard <nengard@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
mxbeaulieu [Mon, 15 Jun 2015 15:05:51 +0000 (11:05 -0400)]
Bug 14387: Merge reference selection has no effect when merging authorities.
This patch swaps the authority records according to the refenrece record selection.
To TEST:
Merge two authority records, select the second as merge reference.
The reference authority is always the first.
Apply the patch.
Repeat previous steps, the authority is now merged using the selected reference record.
modified: authorities/merge.pl
Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 11693: Default emailing preferences not loaded for self registering patron
The call to AddMember_Opac does not take care of the messaging prefs
when enhanced messaging is enabled.
This patch adds the call to handle_form_action to do that.
Test plan:
Enable self registering patrons and enhanced messaging.
Check the (default) message prefs for the relevant patron category. At least
enable email for one notice.
Self-register a user with and without verification email enabled.
Check in both cases that the message prefs of the user conform to
those in the patron category. (So at least one enabled.)
Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Mon, 13 Apr 2015 08:12:03 +0000 (10:12 +0200)]
Bug 8684: Add regression tests for SearchItemsByField
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jonathan Druart [Tue, 7 Apr 2015 12:14:18 +0000 (14:14 +0200)]
Bug 8684: Fix duplicate check on creating items in the acquisition module
The script acqui/check_uniqueness.pl has been introduced by bug 7178.
But bug 11425 added a call to a new subroutine SearchItemsByField in
order to refactore some code. This subroutine calls SearchItems with an
arrayref, which is not what SearchItems is expecting.
This broke the duplicate check done on creating items in the acquisition
module.
To reproduce the issue:
1/ Fill the pref UniqueItemFields with "barcode" and AcqCreateItem with
"placing an order"
2/ Create a new basket
3/ Create a new order
4/ Close the basket
5/ Receive items and set barcode with one already in your DB
6/ Save
7/ Nothing happen on the interface, but an error should have been added
in your Koha log file:
Can't use an undefined value as an ARRAY reference at
/home/koha/src/acqui/check_uniqueness.pl line 48.
Test plan:
1/ Repeat steps 1-6
2/ You should see a warning on the interface
Note that this should also happen with AcqCreateItem set to "creating an
order".
Works well, no errors.
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Jacek Ablewicz [Wed, 24 Jun 2015 17:43:05 +0000 (19:43 +0200)]
Bug 14456: EmbedSeeFromHeadings record filter shouldn't process MARC holding fields
If the system preference IncludeSeeFromInSearches is enabled, records
exported for zebra indexing are being additionally processed by
EmbedSeeFromHeadings record filter (right now used only in rebuild_zebra.pl
script). This filter embeds 'see from' fields (extracted from authority
records linked with the given biblio via $9 subfields) into target MARC
record, which is then subsequently indexed in zebra.
Currently all fields containing $9 are getting the same exact treatment
by this filter. But on the export stage when the filter is applied, MARC
record being processed already does have holdings data fields added in
the previous stage (usually 952 / 995, depending on the MARC format).
Problem is that holdings data fields use to have $9 subfields in them
as well (mapped to item.itemnumber by default). As a consequence, some
(great many in the typical setup) records exported for zebra indexing
may have surplus "see from" fields added erroneously in semi-random
fashion, so biblio searches would often return some completely
unexpected additional results.
EmbedSeeFromHeadings record filter should not process holdings fields
when dealing with MARC records intended for zebra indexing.
To reproduce:
1) database with as many sample or real-world biblio, item and authority
records as possible is recommended for testing purposes
2) enable IncludeSeeFromInSearches
3) export a bunch of biblio records for zebra (e.g.:
misc/migration_tools/rebuild_zebra.pl -I -b -x -k -length=1000),
inspect the result xml records in /tmp/<whatever> file; observe that at
the end of many records, here and there some extra "see from" (= 1st
indicator: 'z') fields tend to appear, which shouldn't be there ;)
To test:
4) apply patch
5) redo 3)
6) compare results from 3) and 5) with diff
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
I introduced a regression test for this. You should run the tests
without/with the patch and verify that the patch actually fixes the problem.
Good job Jacek! I'm sure writing the regression test would take less time
than such a detailed commit message!
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 14456: (regression test) Holdings fields should be skipped by EmbedSeeFromHeadings
This patch introduces a regression test for the situation in which
an itemnumber on a record matches the authid of an authority record
and the current implementation of the EmbedSeeFromHeadings filter
wrongly includes new holding fields with authority data...
To test:
- Apply the patch
- Run:
$ prove t/db_dependent/RecordProcessor_EmbedSeeFromHeadings.t
=> FAIL: The test 'Holdings fields not processed to introduce See-from heading'
fails.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Bug 14545: Typo in help file (stage-marc-import.tt)
Typo found in stage-marc-import.tt file for Koha help in 3.20
Test plan:
1) Go to url 'koha-tmpl/intranet-tmpl/prog/en/modules/help/tools/stage-marc-import.tt:28' and check the typo "precendence" or go to Tools > Stage MARC records for import and open up the help
2) Apply the patch
3) Repeat step 1 and check if the typo is fixed.
Sponsored-by: Universidad de El Salvador 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>
Marcel de Rooy [Fri, 26 Jun 2015 12:12:20 +0000 (14:12 +0200)]
Bug 14167: (QA followup) Making Koha::Logger bit more crash resistant
Moving the BEGIN block to _init for the most part. We only need to
initialize when we actually start using the logger.
Removed the third init part. If we do not have a log4perl_conf in the
koha config, we are not using it yet.
Method get uses hash parameters now. It calls init. If we do not have a
config or the logfile is not writable, we will not use log4perl.
Using AUTOLOAD as a wrapper around Log4perl in order to add some checks
that log4perl does not have.
If a logrotate would change file permissions on a default logfile, we
should catch that now too (see recheck).
Test plan:
Run the previous tests again.
Will still add a unit test.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Kyle M Hall [Thu, 14 May 2015 11:04:19 +0000 (07:04 -0400)]
Bug 14167: (QA followup) Add template and changes needed for packages
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: upgraded DEBUG level to WARN in config file. Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Marcel de Rooy [Fri, 5 Jun 2015 08:08:22 +0000 (10:08 +0200)]
Bug 14167: (QA followup) Adjust category handling in Koha::Logger
The first patch makes the category parameter mandatory.
This patch makes it optional, falling back to the current package. This is
the expected log4perl model. It would not be necessary to pass the class
name everywhere (check subclasses..)
It also adds a delimiter between the interface and the class name.
The first line would make the logger more sensitive to C4::Auth log
messages while staying at the WARN level for other messages, etc. The
second line makes the trace visible from the renewal example.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Kyle M Hall [Thu, 7 May 2015 15:20:50 +0000 (11:20 -0400)]
Bug 14167: Add Koha::Logger based on Log4perl
Koha needs a better logger, and it seems like the best solution would be
to take advantage of Log4perl which is already a fully featured logger.
We use Log4perl to selectively decide what statements should be logged,
and where they should go!
Test plan:
0) Install Log::Log4perl via packages or cpan
1) Apply this patch and the example renewal patch
2) Copy etc/log4perl.conf to your koha conf directory, edit the paths
to match your current error logs
3) Edit your koha-conf file and add the
<log4perl_conf>/path/to/log4perl.conf</log4perl_conf> line
4) Watch your intranet and opac error logs
5) Perform a renewal via the staff interface, note there is nothing new
in the log file
7) Update the log4perl.conf, change the log level from WARN to TRACE
for both the staff and opac sides
8) Perform a renewal via the staff interface, note the logged lines
9) Perform a renewal via the opac, note the logged lines
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended this patch: Moved the renewal stuff to a separate example patch.
And upgraded the DEBUG level to WARN in the log4perl config file. Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>