[Koha-bugs] [Bug 6874] File upload in MARC

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Sep 26 20:33:54 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6874

--- Comment #131 from M. Tompsett <mtompset at hotmail.com> ---
Set up VM from scratch (include qa-test-tools, git-bz [fishsoup branch], koha
origin/master branch)
$ git checkout -b bug_6874 origin/master
$ git bz apply 6874
$ perl Makefile.PL
$ make
$ make test
$ make install
Remember to set up some useful data after you get a working Koha. :)

Configure patch
- edit koha-conf.xml and make sure to fill in <upload_path></upload_path>
  (e.g. <upload_path>/home/mtompset/uploads</upload_path>)
- make sure to give that directory correct permissions
  (e.g. sudo chown www-data.www-data /home/mtompset/uploads)
- attach the plug-in to the 856$u subfield
  (e.g. - log in to staff client
        - click 'Koha administration'
        - click 'MARC bibliographic framework'
        - click 'MARC structure' for a framework
        - Find the 856 tag
        - click 'Subfields'
        - Find the 'u' subfield
        - click 'Edit'
        - click 'Other options (choose one)'
        - select 'upload.pl' in the Plugin drop-down
        - click 'Save changes')

You will want to test in both MARC21 and UNIMARC systems.

$ ./koha_perl_deps -m -u
$ perldoc C4::Biblio
$ perldoc C4::UploadedFiles

This will trigger all the functions in C4::UploadedFiles
$ prove -v t/db_dependent/UploadedFiles.t

Once you have a bilio with 856$u linked up to a file, go to the same biblio on
the OPAC. (e.g.
http://demo.library.kohasystem.ca/cgi-bin/koha/opac-detail.pl?biblionumber=14206)
Then unlink the upload.pl plugin and refresh the OPAC.
This latter step is necessary to test a secondary code point under UNIMARC.

In the staff client, find a biblio.
Add it to your cart.
Click the cart at the top of the page.

This will test opac-retrieve-file.pl fully:
While at the OPAC detail page for the item added
- Click the 'Online resources:' URL.
1) It should work.
- Delete the file from the filesystem.
  (e.g. sudo rm /home/mtompset/uploads/*)
- Click the 'Online resources:' URL.
2) It should fail.
- Open up MySQL and delete the record from the uploaded_files table.
3) It should fail.
- Make sure to clear the 856$u entry for that biblio manually and save.

opac-detail.pl change is tested just by viewing the details of the biblio with
an 856$u link.

opac-basket.pl change is tested by adding the item to your cart and clicking
the "Cart" button.

To test the template files, it is a matter of doing a lot of upload, delete,
upload, whatever type tests in the staff client. This has not been fully
tested, but there are some issues that I want to test to the point of being
able to say what is wrong and how I was expecting it to be handled.

I'm beginning to run short of testing time today again. However, I am pretty
confident that I have tested the following thoroughly:
C4/Biblio.pm
C4/Installer/PerlDependencies.pm
C4/UploadedFiles.pm
basket/basket.pl
etc/koha-conf.xml
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl
opac/opac-basket.pl
opac/opac-detail.pl
opac/opac-retrieve-file.pl
t/db_dependent/UploadedFiles.t

Patches with updatedatabase.pl in them need to be rebased.
I have already attached an extra patch to correct issues in kohastructure.sql

I will continue my testing later of:
catalogue/MARCdetail.pl
catalogue/detail.pl
cataloguing/value_builder/upload.pl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/upload.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/upload_delete_file.tt

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list