Commit graph

115 commits

Author SHA1 Message Date
9b34b07d62 Bug 17375: Search by dateofbirth - handle invalid dates
Prevent internal software error when searching patron with invalid birth date

To reproduce:

- Go to Home > Patron
- Expand patron search (click on + at the left of the search button)
- In drop down 'Search fields', select 'Date of birth'
- Enter a valid date (e.g. 11.02.1995 if syspref 'dateformat' is set to dmydot)
Result: Search works OK
- Enter an invalid date, e.g. 11.02 or abcd...
Result: Internal server error

- Do a patron search with many results
- Use filter on results screen, select 'Date of birth' as search field and
  enter an invalid date to search (e.g. 'a')
Result: Endless message 'Processing'

To test:
- Apply patch
- Repeat steps above
- In both cases, you should get "No results"

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Lucio Moraes <lmoraes@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-27 13:18:32 +00:00
81a04af278 Bug 14610 - Add and update scripts
Signed-off-by: Jennifer Schmidt <jschmidt@switchinc.org>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-26 12:15:14 +00:00
cd7b84f675 Bug 17252 - Koha::AuthorisedValues - Remove GetAuthorisedValueByCode
The subroutine C4::Koha::GetAuthorisedValueByCode returned the
description (staff or opac) for a given authorised value.

Note that we may need a unique key to ->find instead of ->search.

Test plan:
- Checkin an item that cannot be checked in because it's lost, the
  message should display the AV description
- Generate a letter with borrowers.streettype equals an ROADTYPE AV, the
  description should be displayed.
- Edit a patron attribute type, the AV dropdown list should be
  displayed
- Create the PA_CLASS AV category (see bug 7154) and make sure it
  behaves as before when editing a patron
- The checkout list should display descriptions for LOC, LOST and
  DAMAGED

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-10-21 15:35:21 +00:00
75a217e672 Bug 16769: [QA Follow-up] Still found an occurrence
Script svc/report did contain one old-style call.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-10-10 17:03:55 +00:00
99bdb7edbd Bug 15975 - Add Owning Library Column to Checkouts
To test:
1 - Checkout some items to a patron
2 - Note there is no 'Home library' column
3 - Apply patch
4 - Note there IS an 'Home library' column
5 - Use the columns configuration and ensure you can hide/display column at
will

Sponsored by: Coeur d'Alene Public Library (http://www.cdalibrary.org/)

Works as expected (after clearing browser cache).
Commit message amended (as of comment #7)
Signed-off-by: Marc <veron@veron.ch>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-25 15:41:36 +00:00
Charles Farmer
ad0cd505eb Bug 14668: Show serial enumeration in INTRANET circulation.tt and OPAC patron's relatives' checkouts
TEST PLAN

1. THE CHECKOUT TAB, INTRANET
    1.1. Add a value to the 'h' subfield of an item. ie: 'volume #42'
    1.2. Check out the item to a patron
    1.3. Display this patron's issues in his checkout page
        1.3.1. The enumchron should be concatenated with the title

2. A PATRON'S RELATIVE, INTRANET + OPAC
    1.1. Add somebody to a patron's guarantee list
    1.2. Checkout a serial to this guarantee
    1.3. Visit the guarantor's OPAC and INTRANET checkout page
        1.3.1. You should see the enumchron in his guarantee's issues

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

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-25 15:39:50 +00:00
062a70cb61 Bug 17285: (15758 follow-up) Fix advanced editor
Little mistake from df97814, $branches is a hash { branchcode =>
branchname }

Test plan:
Edit a biblio with the advanced editor

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
The advanced editor works as expected

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-12 15:33:11 +00:00
b93ca8a281 Bug 8030 - (QA Folllowup) Use Koha::Libraries
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-12 08:47:46 +00:00
9f7a55f3f2 Bug 8030 - (QA followup) Remove svc file no longer user Use animated gif for waiting as elsewhere Remove confirmation
Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-12 08:47:04 +00:00
bc152d8ba2 Bug 8030 - Change pickup location of a hold from patron record
To test:
1 - Place some holds for a patron
2 - Load the patron into checkout module
3 - View thier holds tab, should have a dropdwon for location
4 - Alter the location
5 - You should recieve a confirmation box
6 - Confirm that pressing cancel does not update holds
7 - Confirm that pressing Yes does update the hold
8 - Confirm that waiting holds are not updateable

Signed-off-by: Jason M. Burds <JBurds@dubuque.lib.ia.us>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-12 08:47:00 +00:00
0079ca7c72 Bug 15758: [QA Follow-up] Some corrections related to GetBranchName
[1] Acquisition.pm
The lines filling $row in GetBasketGroupAsCSV may have side-effects when
the library name is not found. This change restores former behavior. Just
theoretically more safe.
Note that it also contained a typo: $row->{deliveryplace} should have been
$row->{$place}.

[2] Auth.pm
checkauth: $branchname = Koha::Libraries->find($branchcode)->branchname;
Should normally be fine, but I rather have an empty string here than
crashing on "Can't call method branchname on undefined value".
Same for sub check_api_auth.
Note that this holds for a larger number of calls, but I am adding a check
here because it is checkauth.
Also removed a duplicate use Koha::Libraries-statement.

[3] Search.pm
Also removed a duplicate use statement for Libraries.

[4] svc/holds
Added an (explicit) use statement for Koha::Libraries.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-08 14:36:05 +00:00
df97814f30 Bug 15758: Koha::Libraries - Remove GetBranches
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-08 14:36:03 +00:00
19a977dc7b Bug 15758: Koha::Libraries - Remove GetBranchName
This is the fourth and last patch set to remove C4::Branch.
The real purpose of this patch is to standardise and refactor some code
which is related to the libraries selection/display.
Its unconfessed purpose is to remove the C4::Branch package.

Before this patch set, only 6 subroutines still existed in the C4::Branch
package:
- GetBranchName
- GetBranchesLoop
- mybranch
- onlymine
- GetBranches
- GetBranch

GetBranchName basically returns the branchname for a given branchcode.
The branchname is only used for a display purpose and we don't need to
retrieve it in package or pl scripts (unless for a few exceptions).
We have a `Branches` template plugin with a `GetName` method which does
exactly this job.
To achieve this removal, we will use this template plugin and delete the
GetBranchName from pl and pm files.
The `Branches.all()` will now select the library of the logged in user
if no `selected` parameter has been passed.
This new behavior could cause regressions, for instance there are some
places where we do not want an option preselected (batch item
modification for instance), keep that in mind when testing.

GetBranchesLoop took 3 parameters: $branch and $onlymine.
The first one was used to set a "selected" flag, for a display purpose:
select an option in the libraries dropdown lists.
The second one was useless: If not passed or set to 0, the
`C4::Branch::onlymine` subroutine was called.
This onlymine flag was use to know if the logged in user was able to see
other libraries infos.
A patron can see the infos from other libraries if IndependentBranches
is not set OR if he has the superlibrarian permission.
Prior to this patch set, the "onlymine test" was done on different
places (neworderempty.pl, additem.pl, holidays.pl, etc.), including the
Branches TT plugin. In this patch set, this test is only done on one
place (C4::Context::only_my_library, code moved from
C4::Branch::onlymine).
To accomplish the same job as this subroutine, we just need to call the
`Branches.all()` method from the `Branches` TT plugin. It already
accepts a `selected` parameter to set a flag on the option to select.
To avoid the repetitive
  [% IF selected %]<option selected="selected">[% ELSE %]<option>[% END %]
pattern, a new `html_helpers` TT include file has been created, it
defines an `options_for_libraries` block, which takes a `selected`
parameter. We could imagine to use this include file for other
selects.

The 'mybranch` and `onlymine` subroutines of the C4::Branch package have
been moved to C4::Context. onlymine has been renamed with
only_my_library. There are only 4 occurrences of it, against 11 before
this patch set.
There 2 subroutines are Context-centric and it makes sense to put them
in `C4::Context` (at least it's the least worst place!)

GetBranches is the tricky part of this patch set: It retrieves all the
libraries, independently of the value of IndependentBranches.
To keep the same way as the existing calls of `Branches.all()`, I have
added a `unfiltered` parameter. If set, the `Branches.all()` will call
a usual Koha::Libraries->search method, otherwise
Koha::Libraries->search_filtered will be called. This new method will
check if the logged in user is allowed to see other libraries or only
its library.
Note that this `GetBranches` subroutine also created a `category` key:
it allowed to get the list of groups (of libraries) where this library
existed. Thanks to a previous patch set (bug 15295), this value was
not used anymore (I may have missed something!).

Note that the only use of `GetBranch` was buggy (see bug 15746).

Test plan (for the whole patch set):
The best way to test this whole patch set is to test with 2 instances: 1
with the patch set applied, 1 using master, to be sure there is no
regression.
It would be good to test the same with `IndependentBranches` and the
without `IndependentBranches`.
No difference should be found.
The tester must focus on the library dropdowns on as many forms as
possible.
You will notice changes in the order of the options: the libraries will
now be ordered by branchname (instead of branchcode in some places).
A special attention will be given to the following page:
- acqui/neworderempty.pl
- catalogue/search.pl
- members/members-home.pl (header?)
- opac/opac-topissues.pl
- tools/holidays.pl
- admin/branch_transfer_limits.pl
- admin/item_circulation_alerts.pl
- rotating_collections/transferCollection.pl
- suggestion/suggestion.pl
- tools/export.pl

Notes for QA:
- There are 2 FIXMEs in the patch set, I have kept the existing behavior,
but I am not sure it's the good one. Feel free to open a bug report and
I will fill a patch if you think it's not correct. Otherwise, remove the
FIXME lines in a follow-up patch.
- The whole patch set is huge and makes a lot of changes.
But it finally will tremendously reduce the number of lines:
716 insertions for 1910 deletions

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-08 14:36:01 +00:00
658f603511 Bug 17189: Replace occurrences of 'use Koha::Cache'
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

https://bugs.koha-community.org/show_bug.cgi?id=11921

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-08 10:24:47 +00:00
f753220701 Bug 17189: Add the ability to define several memcached namespaces - replace existing occurrences
s/Koha::Cache->get_instance/Koha::Caches->get_instance

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

https://bugs.koha-community.org/show_bug.cgi?id=11921

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-08 10:24:46 +00:00
f2fe433cf9 Bug 16508: Updating a syspref requires parameters_remaining_permissions
And not all of parameters flags.

Test plan:
1/ Create a staff user.
2/ Go to details, select more->set permissions.
3/ Set catalogue, Manage Koha system settings (Administration panel),
manage circulation rules, and Remaining system parameters permissions.
4/ Log in as the new staff user, go to administration > system
preferences. Change a syspref and save it... it will save correctly.
5/ Log back in as superlibrarian
6/ On the 'set permissions' screen, un-check 'manage circulation rules'
and save.
7/ Log back in to the new staff user, and try to change the same
systemprefrence and save.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-06-06 17:33:18 +00:00
7f3feacfe3 Bug 16259: Replace CGI->param with CGI->multi_param in list context - part 2
This patch is a follow-up of bug 16154.

It removes the warning "CGI::param called in list context" in the
following scripts:
admin/branches.pl
admin/categories.pl
admin/patron-attr-types.pl
admin/preferences.pl
catalogue/image.pl
circ/circulation.pl
patroncards/add_user_search.pl
serials/add_user_search.pl
tools/marc_modification_templates.pl
virtualshelves/shelves.pl

Note that the warning from catalogue/itemsearch.pl still exists (the
call to CGI->param is done from the template).

Test plan:
- Add/modify a library, patron category, patron attr type
- Update a syspref
- Set localcoverimage and call catalogue/image.pl?biblionumber=XXX
- Search for patrons in the patron cards or serials module
- Add a marc modification templates
- Add a list (shelves)

You should not get the warning in the log after all these actions.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-16 17:28:06 +00:00
70498b1566 Bug 16476: Do not call CGI->param in list context, some more
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-16 17:11:46 +00:00
b9625bbc8b Bug 15533 [QA Followup] - Itemtype limit missing from tables
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 10:26:04 +00:00
c133bedf54 Bug 16154: Fix some other occurrences
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 23:16:44 +00:00
ac5a1bfece Bug 16154: CGI->multi_param - Manual changes
This patch does the same as the previous one, but affects lines which
have not been caught by the regex.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
2016-04-26 23:16:43 +00:00
9820f9dfbd Bug 11998: Use Koha::Cache to cache sysprefs
At the moment, the sysprefs are only cache in the thread memory
executing the processus
When using Plack, that means we need to clear the syspref cache on each
page.
To avoid that, we can use Koha::Cache to cache the sysprefs correctly.

A big part of the authorship of this patch goes to Robin Sheat.

Test plan:
1/ Add/Update/Delete local use prefs
2/ Update pref values and confirm that the changes are correctly taken
into account

Signed-off-by: Chris <chrisc@catalyst.net.nz>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Tested with plack with syspref cache enabled, there is some time between setting the syspref and applying it, but it takes just one reload of page, it shouldn't be problem, should it?
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Tested with CGI and CGI + memcache; some small issues still remain,
but it would be better to deal with them in separate bug reports
if necessary

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-03-15 07:08:28 +00:00
d967abbe98 Bug 14310 [QA Followup] - Use output_with_http_headers, return 403s
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-01-27 06:20:19 +00:00
0b60dcbeac Bug 14310 [QA Followup] - Deal with error conditions
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-01-27 06:20:19 +00:00
ed3c44b627 Bug 14310 [QA Followup] - Enable translations, set svc script to be executable
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-01-27 06:20:18 +00:00
c60c8f0821 Bug 14310 - Suspend and resume indvidual holds from patron holds table
This enhancment adds the ability to suspend and resume individual holds
from the holds table on circulation.pl and moremember.pl.

The interface is inspired/cribbed from the same feature already
available in the opac.

Test Plan:
1) Apply this patch
2) Find a patron with holds
3) Suspend a hold with no resume date
4) Resume the suspended hold
5) Suspend a hold with a resume date
6) Resume the suspended hold

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@bugs.koha-community.org>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-01-27 06:20:17 +00:00
e706cd18f0 Bug 15477: (follow-up) Bug 14100: Better errors handling
On bug 14100, the patch "Better errors handling" introduced an ...
error.
The user always get "An error occurred when updating this translation"
although it has been updated in DB.

Test plan:
Edit translations for an item type: you should not get an error when
everything went fine.

Tested on top of 15487, error message does no longer appear.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-01-12 16:13:41 +00:00
7fdb4d21d6 Bug 15487: Fix encoding issue on localization
It has been introduced
  commit ed0ff59152
    Bug 11559: Supporting changes for Rancor

Pushed at the same time as bug 14100.

Test plan:
Add/update translations for item types, confirm there is no encoding
issues.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-01-12 16:10:36 +00:00
03c89fa02e Bug 15380: Move Koha::Authority to Koha::MetadataRecord::Authority
The existing Koha::Authority does not use Koha::Objects and does not
exclusively deal with DB objects.
It makes much sense to move it to let the space free for a
Koha::Authority and Koha::Authorities modules based on Koha::Object.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2015-12-31 18:50:41 +00:00
Alex Arnaud
eb5fca30aa Bug 15289 - borrowers permission allows to see patron's loans
Test plan:

 - log with a user that have "borrowers" permission but not "Remaining circulation permissions"
 - go to a borrower's detail page (who has at least a loan) and click on "show checkouts"
 - check that you see loan(s) and that you can't renew and checkin

 - Do the same with a borrower that have "Remaining circulation permissions"
 - check that you see loan(s) and that you can renew and checkin

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2015-12-30 02:51:50 +00:00
Blou
c6f7496422 Bug 14846 - Items with no holdingbranch causes svc/holds to crash
When trying to display the holds for a user, if an item has no
holdingbranch, it causes the svc/holds service to crash and the display
to freeze.

Tentative steps to reproduce on any DB:
1) put 1 or more items on hold for a given user.
2) go into the database and set the item.holdingbranch to NULL
3) In the user's page, in checkouts (circulation.pl), click the tab that
   should be written 1 Hold(s)
4) It will be "Processing" indefinitely.

The cause is the svc/holds code that crashes.  The fix will validate
that there's an holdingbranch before proceding with the code.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2015-12-11 16:20:39 +00:00
717878982f Bug 13024 - Nonpublic note not appearing in the staff client
The nonpublic note for items is not displayed in the staff client. It
should be displayed in the following areas:
1) Checkouts (circulation.pl)
2) Checkins (returns.pl)
3) Record details ( moredetail.pl )

Test Plan:
1) Ensure your non-public note field is mapped to the
   items.itemnotes_nonpublic database column
2) Edit an item, add a test nonpublic note
3) Check out the item, verify the note is visible in the checkouts table
4) Check in the item, verify the note is visible in the checkins table
5) View the item details, verify the note is visible and editable
   if your account has the rights to edit items

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>
2015-12-04 14:47:57 +00:00
0f0aaf82f4 Bug 14100: Better errors handling
This patch mainly improves the errors handling.
It's now not possible to add several translations for the same entity-code-lang
combination.

It also:
- wording: Translate for other languages => into
- fixes encoding issues on add/update (was just display)
- add entity and code to the title of the pop-up window

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

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
Jonathan Druart
0f63f89f66 Bug 14100: Generic solution for language overlay - Item types
Test plan:
1/ update the Schema (misc/devel/update_dbix_class_files.pl)
2/ Translate templates for some languages (es-DE, de-DE for instance)
3/ Enable them in the pref (search for 'lang') for the staff interface
4/ Go on the item type admin page (admin/itemtypes.pl)
5/ Edit one
6/ Click on the 'translate for other languages' link
7/ You are now on the interface to translate the item type's description
in the languages you want. So translate some :)
8/ Go back on the item type list view (admin/itemtypes.pl)
9/ You should see the original description (non translated)
10/ Switch the language
11/ You should see the translated description in the correct language.
If the description is non translated, the original description is
displayed.

12/ On the different page where the item type is displayed, confirm that
the translated description appears.

Think further / Todo:
1/ Update all occurrences of the item type's description (DONE)
2/ Implement for authorised values
3/ Implement for syspref value (at least textarea)
4/ Implement for branch names
5/ Centralize all the translation on a single page in the admin area
...
N/ Implement a webservice to centralize all the translations and give
the ability to sync the item types/authorised values description with
the rest of the world (push and pull).

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 12:34:06 -03:00
Jesse Weaver
53274025e4 Bug 11559: (QA followup) fix several small issues
This fixes the following:
  * Remove unneeded year on use Modern::Perl
  * Fix occasional freeze when reloading existing record
  * Fix encoding for returned record on first save to catalog

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
2015-10-27 12:25:01 -03:00
Jesse Weaver
edd64d3018 Bug 11559: Rancor: advanced cataloging interface
Full test plan is posted on bug. Test plan for system preference:

  1. Apply patch, clear cookies.
  2. Go to "Cataloging."
  3. Add new record, verify that basic editor is used.
  4. Navigate to existing record, click on "Edit record", verify that
     basic editor is used.
  5. Inside basic editor, verify that no button appears to switch to the
     advanced editor.
  6. Enable the "EnableAdvancedCatalogingEditor" syspref.
  7. Repeat above steps, should still go to basic editor, but button
     should appear to switch to the advanced editor; click it.
  8. Now, adding new records and editing existing records should go to
     the advanced editor.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-27 12:17:39 -03:00
Jesse Weaver
ed0ff59152 Bug 11559: Supporting changes for Rancor
* Extends login screen to pass along #hash
  * Adds JSONP support to C4::Service
  * Extends humanmsg to allow per-message classes
  * Adds proper charset to results of svc/bib

Test plan:

  1. C4/Auth.pm and .../intranet/.../auth.tt: verify that login/usage
     works as expected, despite the change to pass on the fragment (...#blah)
     from the URL.
  2. C4/Service.pm and humanmsg.js: verify that editing system
     preferences (the main user of these modules) works correctly despite
     updates.
  3. svc/bib: verify that records can be correctly downloaded with the
     change of character set. This can be done in a Firebug/Chrome Devtools
     console by running `$.get('/cgi-bin/koha/svc/bib/1')` and inspecting the
     results (possibly replacing 1 with a different valid biblionumber).

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>
2015-10-27 12:16:05 -03:00
a011cbd2e2 Bug 11298: Don't force the renew time to 23:59
If you try to renew an item using the "Renewal due date" at the bottom
of the checkouts table, the time will be hardcoded to 23:59 no matter
what the user has chosen.

Test plan:
Check an item out to a patron
renew the item and specify a due date using the datetime picker plugin
at the bottom of the table
Confirm the time you have chosen is correctly used.

Followed test plan. It works as advertised.
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-19 11:51:28 -03:00
122d41816b Bug 14528: Inconsistency in permissions check when listing shelves
The svc script needed borrowers when the shelves.pl needed catalogue.
There is no sense to have different permissions here.

Test plan:
1/ Remove the borrowers permission to a user
2/ Use this user to log in
3/ Go on the shelf list
4/ Without this patch, you should get an endless "Processing..." which
is fixed if you apply it.

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>
2015-10-05 12:26:19 -03:00
Marc Véron
a71cc14a52 Bug 14782: Add possibility to search patrons using the username (userid)
This patch makes it possible to search for users using the username (userid / login name).

To test:

- Apply patch
- Do searches from Home > Patrons
- Search after a full username or parts of a username with Search fields = Standard and Search fields = Userid
- Perform the searches from the top bar (expand with [+]) and from the "Filters" part at the left
- Make sure that other searches behave as before

Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-09-16 10:36:56 -03:00
47be5cafef 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>
2015-08-11 14:48:35 -03:00
8e9f89e92b Bug 14299: Today's checkouts not always sorting correctly
Sometimes the today's checkouts do not sort correctly. This is due to a
simple typo in the comparison line where the bad key 'timstamp' is
compared against the correct key 'timestamp'.

Test Plan:
1) Check out a decent number of items in a row ( 5+ )
2) Hopefully you will see they are sorted incorrectly
3) Apply this patch
4) Reload the page
5) Note they are now sorted correctly

Followed test plan. Works as expected.
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@gmail.com>
2015-06-05 12:53:03 -03:00
93c875f603 Bug 9528: Add delivery branch to the place hold display
When viewing the list of a patron's holds from the circulation or patron
detail page the pickup library is not listed. This patch adds a column
to the table of holds which shows the pickup branch.

This patch also removes some unnecessary markup from the generation of
the table and corrects an instance where the term "reserve" was used
instead of "hold."

This patch also modifies the language describing an item which is marked
waiting at the current library: "Item is waiting here" instead of "Item
waiting."

To test, add several holds to a patron's account with various pickup
locations.

- Confirm that those pickup locations are correctly displayed
  under the Holds tab in Circulation.

- Check in and confirm a hold which is to be picked up at the current
  branch. Confirm that the revised language appears.

- Confirm that table sorting works correctly.

Signed-off-by: Nick <Nick@quechelibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-30 16:45:26 -03:00
Jonathan Druart
d7cfdb45e5 Bug 13492: Add the location column to the checkouts tables
Test plan:
1/ Verify that the location column is correctly displayed on the
checkouts tables (circ/circulation.pl and members/moremember.pl).
2/ Verify that you can hide/show this column (using the admin page
and/or the ColVis DT plugin).

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-24 09:41:23 -03:00
Jonathan Druart
87b6d46fec Bug 13419: Add server-side processing for lists
This patch adds DataTables using a server-side processing to display
lists (virtual shelves).

Test plan:
1/ Go on virtualshelves/shelves.p
2/ Play with the table functions (sort, filter, pagination, etc.)
3/ Go with the Public lists tab and verify the table is correctly
filtered.

Tested together with patch #2, works as expected.
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-22 14:59:02 -03:00
551fca629f Bug 13880 - Allow svc/report to be passed sql parameters
The same feature added to the opac svc/report in bug 9915 should be
added to the staff side.

Test Plan:
1) Apply this patch
2) Create this report:
   SELECT * FROM biblio WHERE biblionumber = <<biblionumber>>
3) Note the id of the report
4) Go to the Staff URL
/cgi-bin/koha/svc/report?id=YOUR_REPORT_ID&sql_params=SOME_VALID_BIBLIONUMBER
5) Note you recieve a json response

NOTE: without applying the patch you get an empty JSON response.

ALSO: running koha qa tools does not verify the changes.
      $ perlcritic -4 svc/report
      (my perlcritic rc points to the koha qa tool one)
      No issues.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-22 11:48:40 -03:00
Jonathan Druart
a6c9bd0eb5 Bug 9978: Replace license header with the correct license (GPLv3+)
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-20 09:59:38 -03:00
Jonathan Druart
2639357767 Bug 13891: DataTables server-side processing - budget users
This first patch remove the previous way to search for users to link to
budgets.

Test plan:
1/ Edit or create a fund
2/ Edit the owner of this fund a select a patron
3/ Add 1+ users to the user lists of this fund

Tested together with other patches.
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-13 10:55:13 -03:00
Jonathan Druart
4fb73b9abf Bug 13923: The prefetch used on existing constraint
The belongs_to constraint has been removed by bug 13713.
Not sure if it was a good idea, but atm the easy and quick way is to
remove the prefetch.

Test plan:
Go on the circulation page, holds tab
Confirm that there is no regression
(Same on the patron details page > Holds tab)

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 10:52:10 -03:00
c76fbbe191 Bug 13908 - Checkouts table sorting is not honoring default sort preferences
The checkouts table no longer honors the system preferences
todaysIssuesDefaultSortOrder and previousIssuesDefaultSortOrder.

This causes much frustration for librarians who prefer a different sort
order. In particular, many librarians prefer to see the oldest previous
issues at the top of the list so those overdue items are visible "above
the fold".

Test Plan:
1) Apply this patch
2) Find a patron with many previous checkouts due on different days
3) Try all 4 combinations of todaysIssuesDefaultSortOrder and previousIssuesDefaultSortOrder
4) Note they all sort correctly

Signed-off-by: Sean McGarvey <seanm@pascolibraries.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 10:09:04 -03:00