Main Koha release repository https://koha-community.org
Find a file
Mark Tompsett b113318bb2 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>
2015-08-07 15:23:36 -03:00
acqui Bug 12054: Inactive vendors should be inactive 2015-07-20 10:34:55 -03:00
admin Bug 12054: Inactive vendors should be inactive 2015-07-20 10:34:55 -03:00
authorities Bug 14387: Merge reference selection has no effect when merging authorities. 2015-07-24 13:44:58 -03:00
basket Bug 14330: Remove unused email_sender from sendbasket/sendshelf 2015-06-08 10:38:08 -03:00
C4 Bug 6874: id based on contents, filename, and directory. 2015-08-07 15:23:28 -03:00
catalogue Bug 14449: Add authentication check on retrieving item info when receiving 2015-07-20 10:10:59 -03:00
cataloguing Bug 6874: Clean up file URL generation 2015-08-07 15:23:19 -03:00
circ Bug 13851: Replace waiting holds logic in circulation.pl with Koha Objects 2015-07-29 15:47:13 -03:00
course_reserves Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
debian Bug 12216: One should be able to override zebra config 2015-08-03 11:59:03 -03:00
docs Bug 7143: New developers 2015-08-03 11:59:30 -03:00
errors Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
etc Bug 6874: (QA followup) Attach files to bibliographic records 2015-08-07 15:22:13 -03:00
install_misc Bug 14066: Removing more Readonly 2015-05-06 11:05:22 -03:00
installer Bug 6874: kohastructure.sql, jquery.js, refocus, and more 2015-08-07 15:22:45 -03:00
Koha Bug 13851: Fix typo in POD 2015-07-29 15:47:47 -03:00
koha-tmpl Bug 6874: Clean up file URL generation 2015-08-07 15:23:19 -03:00
labels Bug 12911: batch_id for new labels batches can be asssigned to several batches 2015-05-14 11:11:03 -03:00
members Bug 5685: Validation of email address field 2015-07-24 13:47:32 -03:00
misc Bug 14534: Stop overdue_notices.pl from issuing the warning: Use of uninitialized value $borrowernumber 2015-08-07 15:20:03 -03:00
offline_circ Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
opac Bug 6874: License Text Update 2015-08-07 15:23:05 -03:00
OpenILS
patron_lists Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
patroncards Bug 14107: Patron cards: Make barcode width and height scaling editable 2015-07-24 14:07:18 -03:00
plugins Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
reports Bug 9006: Remove AUTOLOAD in C4::Context 2015-07-20 10:11:41 -03:00
reserve Bug 13687: Move hold policy check into CanItemBeReserved 2015-05-19 12:05:50 -03:00
reviews Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
rotating_collections Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
selenium Adding selenium tests for filterMembers 2009-09-30 11:30:37 +02:00
serials Bug 13662: Fix the serials.receive_serials permissions 2015-06-05 12:53:09 -03:00
services Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
skel
sms Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
suggestion Bug 10752: Alert the librarian if the suggestion has not been added 2015-04-28 15:11:42 -03:00
svc Bug 14299: Today's checkouts not always sorting correctly 2015-06-05 12:53:03 -03:00
t Bug 6874: Catch warnings for clean tests. 2015-08-07 15:23:36 -03:00
tags Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
test Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
tmp/modified_authorities
tools Bug 13663: (followup) fixes tab char QA test fails 2015-08-07 15:18:55 -03:00
virtualshelves Bug 14383: Fix some typos in comments and documentation 2015-06-22 17:34:46 -03:00
xt Bug 14383: Fix some typos in comments and documentation 2015-06-22 17:34:46 -03:00
.editorconfig Bug 12545: Add EditorConfig.org file to the source tree 2014-08-22 11:07:45 -03:00
.htaccess
.mailmap (RM followup) .mailmap updates 2015-05-22 17:02:21 -03:00
about.pl Bug 14167: (QA followup) new entries in koha-conf.xml should be tested in about.pl 2015-07-21 11:54:17 -03:00
changelanguage.pl Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
edithelp.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
fix-perl-path.PL Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
help.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
INSTALL
install-CPAN.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
INSTALL.debian Bug 8092 follow-up: Add optional dependency on CHI 2012-06-09 13:08:18 +02:00
INSTALL.fedora7 Bug 11757: remove dependency on POE 2014-02-15 01:38:15 +00:00
INSTALL.opensuse Bug 11757: remove dependency on POE 2014-02-15 01:38:15 +00:00
INSTALL.ubuntu Bug 7764: (follow-up) editorial tweaks 2013-10-04 16:27:55 +00:00
Koha.pm Bug 13948: DBRev 3.21.00.016 2015-07-28 10:32:31 -03:00
koha_perl_deps.pl bug 10548: fix count of missing required dependencies by koha_perl_deps.pl 2013-07-11 14:03:32 +00:00
kohaversion.pl Bug 13758: Move the Koha version from kohaversion.pl 2015-05-07 11:39:04 -03:00
LICENSE Bug 9440 - update Koha's LICENSE file from GPL2 to GPL3 2013-02-12 08:52:10 -05:00
mainpage.pl Bug 8007: Discharge - Glue 2015-04-30 12:33:53 -03:00
Makefile.PL Bug 13758: (QA followup) Make Makefile.PL aware of Koha.pm 2015-05-07 11:42:12 -03:00
MANIFEST.SKIP Bug 9546 : Updating make manifest tardist 2013-02-06 23:54:46 -05:00
README
README.robots
rewrite-config.PL Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00

Koha is a free software integrated library system.

Koha is distributed under the GNU GPL version 3 or later.
Please read the file LICENSE for more details.

To install or upgrade Koha, please see the INSTALL file appropriate
to your platform.

Report bugs at http://bugs.koha-community.org/

Visit the Koha Project website at http://www.koha-community.org/