Commit graph

1314 commits

Author SHA1 Message Date
Aleisha
94c5f8d5f0 Bug 14553: Silencing warn triggered when clearing item rating on OPAC
To test:

1) Go to any item and clear the star rating (don't have to set a rating first)
2) Notice the warn
3) Apply patch and reload page
4) Clear star rating
5) Notice no warn
6) Click a star to add a rating
7) Make sure your rating, the average rating and amount of votes are all
   correct
8) Could be beneficial to log in as another user and try to add a rating on the
   same item from their account. Check the average rating is
   cacalculated and amount of votes increases
9) Confirm still no warns

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Can see the warning in logs, and its disappearance with this patch.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-11 11:08:50 -03:00
d383d0b127 Bug 14544: Remove debug line
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-11 10:35:06 -03:00
Marc Véron
3e3ec3a14e Bug 14956: (followup) Fix birthday date validation in Opac
To reproduce / test:

- In Opac: Go to 'your personal details'
- Enter a valid birtday date
- In Staff client: Go to Home > Patrons > Update patron records
  (Link on start page: Patrons requesting modification)
- Verify that the birtday date is correct
- Back in Opac, clear the birthday date, try to submit
  => Validation message appears
- Enter an invalid date (32/32/2999 or 00/00/0000), try to submit
  => Birthday date field is cleared, validation message appears.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Wrong today corrected

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-06 15:01:37 -03:00
Marc Véron
7a46b1599e Bug 14956: C4::Dates from files opac/*.pl
Remove C4::Dates from files:
-  opac/opac-memberentry.pl
-  opac/opac-reserve.pl
-  opac/opac-search-history.pl
-  opac/opac-showreviews.pl
-  opac/opac-suggestions.pl
-  opac/opac-serial-issues.pl
-  opac/opac-alert-subscribe.pl
-  opac/opac-ics.pl

To test:
- Apply patch
- Verify, that self registration and holds work as before
- Verify that tabs in catalog item detail work and display
  as before
- For serials: Verify that subscriptions work as before. It is a
  little bit hidden, in tab Subscriptions, then 'More details', then
  tab 'Brief history', button 'Subscribe to email notificatin on
  new issues'
- For ics: Can not be tested at the moment, not yet used (Bug 5456),
  pls. have a look at the code changes

(Amended following comment #2)

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-06 15:01:28 -03:00
Galen Charlton
15f9efb7bd Bug 9468: use new SUGGEST_FORMAT list
This patch uses the new SUGGEST_FORMAT authorized value list for
populating the list of suggestion item types/document types.  It
also improves the display by using the staff or OPAC description of
the authorised value rather than the code.

To test:

[1] Enter a suggestion via the OPAC and select an item type (which
    I will call "desired format" for the rest of this test plan).
[2] Verify that the saved suggestion displays the desired format
    description in both staff and OPAC.
[3] Verify that organizing the list of suggestions by item type
    now works in the staff interface, rather than displaying "Unknown"
    in each tab header.
[4] Verify that existing suggestions' desired formats are displayed
    correctly.
[5] Verify that suggestions can have their desired format edited
    in the staff inteface.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-05 10:46:57 -03:00
6338c77db3 Bug 14544: Fix 'back to lists' link
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-05 10:00:31 -03:00
8cd4dc9bb7 Bug 14544: QA fixes - some minor bug fixes
See comment 171 and 172 for more details.

This patch mainly fixes typo or silly error in templates.

It also uses the relationships added by previous patch to join the
biblioitems and items tables (changes in opac-shelves.pl and
shelves.pl).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-05 10:00:31 -03:00
acfe7fac54 Bug 14544: Fix regression on adding a new list
The user should not be allowed to create a new list and get a friendly
error message if he tries.

The "New list" links are removed.

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-05 09:58:02 -03:00
9af429c33e Bug 14544: Get rid of C4::VirtualShelves and C4::VirtualShelves::Page
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-05 09:58:02 -03:00
6b62fb3970 Bug 14544: Get rid of GetSomeShelfNames
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-05 09:58:02 -03:00
ca0de1009c Bug 14544: Get rid of GetShelfContent
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-05 09:58:01 -03:00
a8f1a576e2 Bug 14544: Get rid of ShelfPossibleAction
Bug 14544: (follow-up) Get rid of ShelfPossibleAction

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-05 09:58:01 -03:00
f510627842 Bug 14544: Make the OPAC side independent of Page.pm
Bug 14544: Fix redirect on editing a list

If you edit a list from the list view, after saving the form, you are
not redirected to the list view (but on the edit form).

Bug 14544: Cosmetic: &rsaquo; should be a class divider

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-05 09:58:01 -03:00
a628b3ca10 Bug 14544: Get rid of GetBibliosShelves
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-05 09:58:01 -03:00
de69ee9a91 Bug 14544: Koha::Virtualshelfcontent[s]
Get rid of AddToShelf and DelFromShelf

Bug 14544: Allow a user to delete his own contents

Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-05 09:58:01 -03:00
54fc66fe96 Bug 14544: Get rid of GetAllShelves
Signed-off-by: Koha Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-05 09:58:01 -03:00
e91a704ab1 Bug 14544: Move share routines to Koha::Virtualshelfshare and Koha::Virtualshelfshares
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-05 09:58:01 -03:00
d73cad91a7 Bug 14544: Get rid of AddShelf
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-05 09:58:00 -03:00
863958f935 Bug 14544: Get rid of GetShelf
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-05 09:58:00 -03:00
Bernardo Gonzalez Kriegel
55456b6e7f Bug 15098: Itemtype description missing from facets for itypes in a search group
This patch adds a second variable to hold item types info
just for facets.

In case we have an item type in a search category, it's description
is removed from GetItemTypesCategorized, which is good for advanced
search, but no for facets

A second var is needed which holds all item type info.

To test:
On top of Bug 15092 patches (no really needed, but I write this on top
of them)
1) Add an item type to a search group
2) Do a search in opac, in facets will see only item type code,
no description, for that item type
3) Apply the patch
4) Repeat search, now description must be present

Followed test plan including translated descriptions. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-05 09:52:08 -03:00
Bernardo Gonzalez Kriegel
e06c5a89fd Bug 15092: (followup) Descriptions not show for search categories
If we have some item types in search categories, description
is not show in opac advanced search

To test:
1) Add some item type to a search category
2) Go to OPAC > Advanced search
empty description for that category
3) Apply the patch
4) Repeat 2), description must be present

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-05 09:49:50 -03:00
6b31947c3b Bug 15035: Anti-spam for opac-suggestions - FOLLOW-UP
to test this patch...

1/ enable 'suggestion' and 'AnonSuggestions' sysprefs

2/ edit the koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt file,
    to reveal the hidden 'negcap' field

   replace line 87 opac-suggestions.tt, from...
     <li id="negcap" style="position: absolute; left: -2000px;">
   to ...
     <li id="negcap">

3/ attempt to add another suggestion, and populate the 'negcap' field
   adding the suggestion is supposed to fail, but actually succeeds!?  :/

4/ apply patch

5/ repeat step 3, suggestion attempt should fail as expected

	modified:   opac-suggestions.pl

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Confirmed insertion with negcap before patch.
With negcap value suggestion fails silently
Without negcap suggestion is inserted
No errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-04 10:46:02 -03:00
298733cb1e Bug 14589: Adjust authorities_merge_ajax and replace some indirect syntax
This patch does the following:
[1] Adjust authorities_merge_ajax just as in bug 14588.
[2] Replace some indirect syntax for fetch GGI::Cookie.
[3] Along the way replace some new CGI's. Note that I am not aiming to
    replace them Koha wide. The "fetch class" variant is less readable.

NOTE: The changes to tools/upload-file.pl and upload-file-progress.pl
are moved to report 14321.

Test plan:
[1] Run the URL authorities/merge_ajax.pl in staff.
[2] Upload a file with Stage MARC records for import.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
[1] It runs, but also before patch
[2] File uploads without problem
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
We could certainly remove 1 or 2 call to CGI->new in tools/background-job-progress.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-02 12:49:13 -03:00
Bernardo Gonzalez Kriegel
96dc8bbd8e Bug 15092: item type descriptions not showing in OPAC advsearch
Go to OPAC > Advanced Search
Tab 'Item type' only shows itemtype icons,
no descriptions. Descriptions must be shown
always

To test:
1) Go to OPAC > Advanced search
2) Check no descriptions for item types
Also check that, reloading the page, item types
shows in random order
3) Apply the patch
4) Check there are descriptions now
and order is by description

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-01 17:07:11 -03:00
22068e3950 Bug 14100: Fix 3 occurrences more
- opac-suggestions.pl
- opac-readingrecord.pl
- opac-reserve.pl

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 12:34:07 -03:00
d58f2cfaf6 Bug 14100: Fix some missing occurrences
This patch fixes:
- reports/bor_issues_top.pl
- sort order
- adv search and search results
- opac-topissues.pl

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 12:34:07 -03:00
30667f0555 Bug 14100: (follow-up) Language overlay for item types
Display the translated description for item types in the following pages:
> admin/smart-rules.pl
> catalogue/detail.pl
> catalogue/itemsearch.pl
> catalogue/moredetail.pl
> reports/acquisitions_stats.pl
> reports/bor_issues_top.pl
> reports/cat_issues_top.pl
> reports/catalogue_out.pl
> reports/catalogue_stats.pl
> reports/issues_avg_stats.pl
> reports/issues_stats.pl
> reports/itemslost.pl
> reports/manager.pl
> reports/reserves_stats.pl
> suggestion/suggestion.pl
> tools/export.pl

> Opac:
> opac-detail.pl
> opac-MARCdetail.pl
> opac-search.pl

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>
2015-10-27 12:34:06 -03:00
Julian Maurice
986cbaf830 Bug 11139: Add support for multiple values in AdvancedSearchTypes
AdvancedSearchTypes syspref can be multivalued, opac-topissues.pl
have to support that.

AdvancedSearchTypes can have one or more of the following values:
'itemtypes', 'ccode', 'loc'.  But this patch adds support only for
itemtypes and ccode.  AdvancedSearchTypes can still contain 'loc' but it
will change nothing to the behaviour of opac-topissues.pl.

This patch also removes duplicate code in template (the "Refine your
search" form was written in two different places)
This introduces a small behaviour change: when there is no results,
instead of having the form in the center of the page, it remains in the
left sidebar and we have a "No results" message in the main area.

Depends on bug 14788

Tested on top of 14788. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-22 11:36:53 -03:00
Julian Maurice
3d7600f976 Bug 14788: Move opac-topissues.pl code into C4::Circulation
Tested with syspref 'AdvancedSearchTypes' set to itemtypes an ccode (one at a time).
No problems found.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-22 11:35:06 -03:00
ahmed
30edfbfa58 Bug 10937: Option to hide and group itemtypes from advanced search
This allows to group certain item types in a category, to be displayed (and searched) as such in OPAC's advanced search.  For example, you can group Reserve 2h and Reserve 12h into a Reserve category.  The 2 and 12h types won't appear anymore.
This also allows to simply prevent an item type from displaying as a search option.

TEST PLAN
------------------
0) Back up database, so you can reset and retest easily. ;)
1) Apply the patch
2) Run Koha QA tool.
3) prove -v t/db_dependent/Koha.t
  -- all tests should pass.
  4) run ./installer/data/mysql/updatedatabase.pl to add the
  two columns to itemtypes
  -- Does a meaningful message get printed?
  Are the columns added?
  "DESCRIBE itemtypes;" should list hideinopac and searchcategory.
  5) You need to add a category to group your item types:
  a) In Intranet/Koha Admin/Authorized values,
  select DOCTYPECAT in the 'Show category:' dropdown
  i) If you do not have a DOCTYPECAT category, create one.
  b) Click button "New authorized value for DOCTYPECAT"
  c) Enter
  Authorized value: HARDWARE
  Description : Hardware
  Description (OPAC): Hardware
  6) Group your items under that new category
  a) In Intranet/Koha Admin/Item types, choose (at least)
  two item types and for each:
  - Click action/Edit on the right column
  - Third row (below Description) is the Search category list box, select Hardware
  - click Save changes at the bottom
  7) Select at least one item to be hidden in the OPAC search
  a) In Intranet/Koha Admin/Item types (again), choose a different item type:
  -  Click action/Edit
  -  Click the checkbox "Hide in OPAC" below the list of icons.
  8) Go test your modifications
  a) Go to OPAC/Adv search.
  b) Validate that all items modified above (hidden or grouped) do not appear in Item type list
  c) Validate that new item type Hardware does appear instead.
  d) Select item Hardware, start Search.
  ) Validate returned items are the of the two types that were grouped into the Hardware category in step 4.

Sponsored-by: Vanier college

Signed-off-by: Nick <nick@quecheelibrary.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-22 11:06:07 -03:00
Lyon3 Team
64b0984a51 Bug 8236: Renewing policy in overdue or restriction case
This patch introduces 2 sysprefs :
    RestrictionBlockRenewing to allow/block renewal of items when patron is restricted.
    OverduesBlockRenewing to allow, block only the late ones or block all checked out items
    Default is "allow" in both case.

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-19 14:36:55 -03:00
5fd30dc5f2 Bug 15005: Remove CGI->url calls from pl scripts
Same as previous patch for calls in pl scripts.

Test plan:
- delete an entry of your search history from intranet and opac
- with IndependentBranches=OFF, go on the waiting holds and confirm that the
link next to 'Holds awaiting pickup for your library on' is correct.
- search for items, the pagination should work correctly

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-19 09:36:43 -03:00
Jesse Weaver
226a10232a Bug 14607: (QA followup) Fix one missing occurence, incorrect calls to GetNormalizedUPC
Signed-off-by: Alexis Rodegerdts <arodegerdts@wallawallawa.gov>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-06 11:09:53 -03:00
Jesse Weaver
0ba37ddeba Bug 14607: Baker & Taylor cover images should be accessible by UPC as well as ISBN
Test plan (requires Baker and Taylor cover images to be set up and enabled):
  1. Create a record with an ISBN that does not have a cover and a UPC
     that does. 141985934X/085391174929 is one set that works well.
  2. Verify that the record shows up as "No image available" in the
     following OPAC locations: shelf browser, reviews, lists, search and
     reading record. This will require adding reviews/checkouts/etc. for
     the record in question.
  3. Apply patch.
  4. Check the locations again, and verify that the record now has a
     valid cover image.

Signed-off-by: Alexis Rodegerdts <arodegerdts@wallawallawa.gov>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-06 11:09:53 -03:00
Jonathan Druart
fb59c5c7c4 Bug 10020: Remove code related to ethnicity
This is a(nother) vestige of Koha (2.2?).
This patch removes unused code related to the 'ethnicity'.

In detail:
There is no way to fill the ethnicity table.
There is no way to fill the borrowers.ethnicity and borrowers.ethnotes.

BUT if borrowers.ethnicity exists, the value is displayed on
members/moremember.pl (and only here).

Test plan:
Apply this patch and confirm there is no regression on
adding/updating/deleting patrons.
Note that you don't see the ethnicity value on the moremember.pl page even if a patron has it.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-06 10:30:32 -03:00
011f439740 Bug 5144: Don't display the failed_holds param in the url if not needed
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-06 10:02:06 -03:00
4f4c5e67ef Bug 5144: Duplicate holds allowed if patron clicks back button after placing hold
Koha is currently not engineered to handle multiple holds per record.
Until such time that is does, we should not allow them to be created.

Test Plan:
1) Apply this patch
2) Log in to the opac
3) Place a hold
4) Hit the back button on your browser
5) Place the hold again
6) Note the new message

Signed-off-by: David Kuhn <kuhn@monterey.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-06 10:01:55 -03:00
26383113d0 Bug 6379: Fix if the reviewer is not the same patron
get_approval_rows does a left join on tags_approval.approved_by =
borrowers.borrowernumber

This means it cannot return the approval tags for a given patron.

Note that this patch could be time-consuming if there is a lot of tags
in the DB.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-05 12:27:44 -03:00
Jonathan Druart
1489bb7342 Bug 6379: Remove link from unapproved tags
At the OPAC, if the tag is not approved, the tag's link did not return
any result.

This patch removes the link.
Test plan:
1/ Set TagsModeration to 'Require'
2/ Create tags at the OPAC
3/ Approve a couple
4/ Confirm that unapproved tags does not have links.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
works as described, no errors

For the (approved) link to work I need to install YAML::XS

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-05 12:27:44 -03:00
a988e9425c Bug 5371: (follow-up) Force no caching for private pages at the OPAC
Same as previous patch for opac-messaging.pl and opac-readingrecord.pl

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-10-02 11:06:18 -03:00
542ab0bce9 Bug 5371: Force no caching for private pages at the OPAC
In order no to slow too much the browsing, it is certainly not a good
idea to add this cache-control value for all pages at the OPAC.

This patch just adds where the author found it could be useful.

Test plan:
1/ Login at the OPAC
2/ Go on the account page (opac/opac-account.pl)
3/ Click log out
4/ Use the back button of your browser
Without this patch you will see the previous page.
With this patch, the previous page will be reloaded and you will be
redirected to the login form.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-10-02 11:06:17 -03:00
098fd64621 Bug 14927: Returns item info when resumptionToken is used
To test:

- activate OAI-PMH with the inclusion of items as explained on bug 12252
- set the OAI-PMH:MaxCount to a low number, 50 for instance
- go to the OAI-PMH page to get the records : [your koha
  catalogue]/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml
- check that item data is included
- get the resumptionToken at the end of the xml
- got to the next page of records [your koha
  catalogue]/cgi-bin/koha/oai.pl?verb=ListRecords&resumptionToken=[your
  resumption token]
- check that item data is now missing

Apply the patch, and repeat previous steps: item data is back.

Signed-off-by: Gaetan Boisson <gaetan.boisson@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-10-02 11:05:24 -03:00
Matthias Meusburger
c34c8ee853 Bug 14368: Add discharges history.
Currently, once a user is discharged, lifting the discharge debarment does
not allow the user to ask for a discharge again.

This patch adds the ability for a user to be discharged several times and to
keep an history of the discharges.

Test plan:

 - As a user, ask for a discharge.
 - As a librarian, allow the discharge.
 - Check that the requested and validated dates appear on the discharge panel of the borrower in the admin interface.
 - Lift the discharge debarment of the user.
 - Check that you can repeat these steps and that the new discharges are added in the discharge panel of the borrower in the admin interface.

Please note that you will need to run misc/devel/update_dbix_class_files.pl after the SQL update.
Adding a primary key to the discharges table was mandatory for DBIX::Class to be able to query with order_by.

Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-09-28 11:56:33 -03:00
1b8f3194e9 Bug 14509: Reject invalid passwords
Bug 10177 rejects password with leading or trailing whitespaces, but
only on the member-password page.
It's not consistent to only do this check on 1 place.
This patch adds the check for the 2 other places: memberentry and at the
OPAC.

Test plan:
1/ Edit a patron and set a password with leading and/or trailing
whitespaces. You should not be allowed to do it (no server side check).
2/ Same at the OPAC ("Change you password" tab). Here there is a server
side check.

Followed test plan. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-09-28 11:51:08 -03:00
83ea49a009 Bug 14321: Integrate Upload.pm into Koha
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>
2015-09-25 12:02:52 -03:00
995e27b373 Bug 14298: Use the new permission in the sco scripts
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Note without this patch, you won't be able to access the SCO side.
So don't panic if you cant use SCO with just the first patch

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-09-25 11:15:48 -03:00
Marc Véron
5dceb851dd Bug 13813: Remove deprecated module C4::Dates from system
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>
2015-09-18 12:40:55 -03:00
Alex Arnaud
51c67bc139 Bug 12252: (follow-up) Include item data only in extended mode
Fix perlcritic error.

Signed-off-by: Signed-off-by: Gaetan Boisson <gaetan.boisson@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-09-17 11:02:30 -03:00
ff807bc244 Bug 12252: Include item data only in extended mode
Previous patches attached to this bug have been refactored to merge bug
3206 and bug 13568 features. So OAI server must be carrefully tested to
ensure that there is no regression in this area: deleted records and
resumption token.

This last patch fixed the way items are returned. They are returned only
if OAI server operates in extended mode, and specifically for format
having the parameter include_item set to 1 (true). For example this
configuration file set via OAI-PMH:ConfFile syspref will return items:

Signed-off-by: Signed-off-by: Gaetan Boisson <gaetan.boisson@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-09-17 11:02:19 -03:00
Robin Sheat
7116094470 Bug 12252: include item data in OAI-PMH ListRecords result
Same in spirit to the other patch, this also includes the item detail in
ListRecords.

Test plan:
* Fetch a URL like:
http://koha/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml
* Verify that there are 952 entries in the returned records where
  appropriate.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>

ListRecords OAI verb returns a list of records including items in 952/995 which
are not hidden based on OpacHiddenItems syspref.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Signed-off-by: Gaetan Boisson <gaetan.boisson@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-09-17 11:02:10 -03:00