koha.git
10 years agoBug 11237: Update explanation for pref AcqItemSetSubfieldsWhenReceived
Jonathan Druart [Tue, 12 Nov 2013 09:27:17 +0000 (10:27 +0100)]
Bug 11237: Update explanation for pref AcqItemSetSubfieldsWhenReceived

This patch improves the description of the AcqItemSetSubfieldsWhenReceived
system preferences to clarify that it applies to updating items
during order receipt, if those items where created when the order was
placed.

Test plan:
Update the updatedb entry and search the pref in the admin module.
The explanation should have been updated.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11363: make units in label printer profile form translatable
Roman Amor [Thu, 16 Jan 2014 02:55:03 +0000 (15:55 +1300)]
Bug 11363: make units in label printer profile form translatable

Changed the unit names form an import to a switch case so that it is in
the .tt so that it can be translated

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11477: (follow-up) improve display of user/patrons in logs tool
Galen Charlton [Fri, 17 Jan 2014 05:54:09 +0000 (05:54 +0000)]
Bug 11477: (follow-up) improve display of user/patrons in logs tool

This patch tweaks the display of patron and user names in the logs
tool so that if a name is present, the patron/user ID that follows
it is enclosed in parentheses.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11477 - Add names for librarian and borrowers in the logs
David Cook [Mon, 6 Jan 2014 04:19:21 +0000 (15:19 +1100)]
Bug 11477 - Add names for librarian and borrowers in the logs

This patch adds the first name and surname of the librarian and the
user involved in a transaction log, if available.

If neither the firstname or the surname is available, then the 'object'
number will be prefaced with the 'Member' qualifier.

_TEST PLAN_

0) This patch depends on Bug 11473, so you must apply it first

Before applying this patch (11477):
1) View the logs.
2) Note that the Librarian column just has a number
3) Note that the Object column will just say Member X (where X is a
number), in the circulation, fines, and patron/member modules.

Apply the patch.

4) Reload the logs (you don't need to make new ones)
5) Note that the Librarian and Object columns mentioned above now
have firstname and surname appearing (where available)

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11473: (follow-up) ensure link to item is construct correctly
Galen Charlton [Fri, 17 Jan 2014 06:04:37 +0000 (06:04 +0000)]
Bug 11473: (follow-up) ensure link to item is construct correctly

This patch adjusts the check on action_logs.info to better detect
if the event concerns an item.  This fixes a problem where the links
from log entries on item modifications would, if followed, result
in internal server errors.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11473 - add 'biblio' and 'item' to cataloguing logging info
David Cook [Mon, 6 Jan 2014 04:01:10 +0000 (15:01 +1100)]
Bug 11473 - add 'biblio' and 'item' to cataloguing logging info

This patch adds the words 'biblio' and 'item' to the 'info'
of the cataloguing logs which were missing them (such as biblio
delete, biblio mod, item mod, upload cover image).

This patch also adds 'authority' for authority mod.

_TEST PLAN_

Before applying:
1) Create/view mods for items, biblios, and authorities.
2) Create/view biblio deletion
3) Create/view upload cover image log
4) Note that none of these contain the words 'biblio','item',or
'authority' in their "Info" columns.

Apply patch.

5) Repeat steps 1-3
6) Note that the new logs contain 'biblio','item', and 'authority'
in their "Info" column, while the past ones don't.
7) Note also that 'biblio' and 'item' will have 'Biblio' and 'Item'
appear in their "Object" column for the new logs

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11473 - Improve wording in log viewer template
David Cook [Mon, 6 Jan 2014 03:49:01 +0000 (14:49 +1100)]
Bug 11473 - Improve wording in log viewer template

This patch capitalizes 'member' and 'biblio' as object labels in the
log viewer.

It also adds a "Subscription" label, and changes "auth" to "Authority".

_TEST PLAN_

Before applying patch:

1) View logs for patrons, new biblio, serials, and authorities.

Apply the patch:

1) Notice the capitalization and new/modified labels.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11473 - Remove boilerplate in log viewer template
David Cook [Mon, 6 Jan 2014 03:43:53 +0000 (14:43 +1100)]
Bug 11473 - Remove boilerplate in log viewer template

This patch eliminates unnecessary conditions and boilerplate.

_TEST PLAN_

Apply the patch.

1) Try viewing logs for circulation, patrons, fines,
cataloguines, serials, authorities, etc.
2) Note that everything should look exactly the same as before,
with one exception: FINES
3) Fines will now show "member X" for the user associated with
the fine.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11473 - Fix log viewer template conditions
David Cook [Mon, 6 Jan 2014 03:32:31 +0000 (14:32 +1100)]
Bug 11473 - Fix log viewer template conditions

This patch adds the 'loopro' key to the 'module' value, so that
conditions are actually triggered in the template logic.

(Note: loopro.CIRCULATION is valid, but I changed it for the sake
of consistency across the different conditions.)

This patch also adds substr checks to the 'info' column when
using the cataloguing module. This will check for 'item' and 'biblio',
so that the appropriate label qualifer can be shown in the log viewer.
If either term is absent, the unqualified number will be shown instead
(this will be the majority of action logs at this point).

_TEST PLAN_

Before applying:

1) Access log viewer from Tools (or wherever really)
2) Look up logs for circulation, patrons, cataloguing, serial,
authorities, etc.
3) Note that the "Object" will always just be a number without qualification.

After applying the patch:

1) Look at those same logs
2) Note that the object number for borrowers will usually be prefaced
by 'member' (notwithstanding FINES which aren't taken into account in
this template yet); new bibs and new items should say 'Item X' or
'Biblio X'. Serials should have a link. Authorities should have a link
and an 'auth' preface.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Works as advertised

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11476: remove extra empty option from title pull-down in OPAC self-registration
Owen Leonard [Fri, 10 Jan 2014 16:56:15 +0000 (11:56 -0500)]
Bug 11476: remove extra empty option from title pull-down in OPAC self-registration

If you have patron titles enabled, the OPAC patron details form lists 2
empty spaces instead of 1. An empty option is passed by the script, so
the template does not need to include one.

To test you must have at least one patron title set in BorrowersTitles
system preference and OPACPatronDetails must be set to "allow."

1. Apply the patch
2. Log in to the OPAC
3. Click the "personal details" tab.
4. Click the "salutation" dropdown. There should be only one blank line
   preceding the existing titles.

Test in both prog and bootstrap.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described for existing and creating new accounts.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11018: allow adding order from a reverted MARC batch
Jonathan Druart [Tue, 8 Oct 2013 15:17:45 +0000 (17:17 +0200)]
Bug 11018: allow adding order from a reverted MARC batch

Weird behavior:
When an import is undone into catalog, the status is set to "reverted".
But if you open the add orders from iso2709, the status is automatically
set to "imported" and does not appear in the list.
So it is not possible to import a reverted batch.

[RM note: since a reverted batch is nonetheless a staged batch, and
could be reused, allowing orders to be placed by taking bibs
from a reverted batch is not as odd as it might sound.  It *can* look
odd for a staged or reverted batch to contain records that are
imported, but that's a long-standing oddity.]

Test plan:
- verify you reproduce the weird behavior
- apply this patch
- import a file and the batch into the catalog
- verify (in the your mysql/MariaDB cli) the status is "imported"
- verify it does not appears in the add orders from iso2809 page
- undo the import
- verify (in the your mysql/MariaDB cli) the status is "reverted"
- verify it appears in the add orders from iso2809 page and the status
  is always "reverted"
- finish the order

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9788: (follow-up) update the bootstrap theme
Galen Charlton [Fri, 17 Jan 2014 05:21:07 +0000 (05:21 +0000)]
Bug 9788: (follow-up) update the bootstrap theme

This patch applies the change made in the QA follow-up
to the Bootstrap theme.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9788: (follow-up) Unit tests for changed routine GetReservesFromItemnumber
Marcel de Rooy [Thu, 26 Sep 2013 10:22:51 +0000 (12:22 +0200)]
Bug 9788: (follow-up) Unit tests for changed routine GetReservesFromItemnumber

Adds three tests to Reserves.t for GetReservesFromItemnumber.
We test if this routine does not return a future next available hold,
a future item level hold. And if it does return a future wait (that is:
a confirmed future hold, using ConfirmFutureHolds).

Note that Holds.t does also contains some basic tests for this routine,
but the additional tests seem to better located in the direct context of
tests for bug 9761 for ConfirmFutureHolds.

Test plan:
Run both t/db_dependent/Holds.t and t/db_dependent/Reserves.t.
Verify if both tests do not fail.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9788: QA followup
Jonathan Druart [Mon, 4 Nov 2013 10:55:57 +0000 (11:55 +0100)]
Bug 9788: QA followup

1/ CURRENT_DATE() is a MySQLism and should be replaced with CAST(now() AS
DATE).
2/ The date formatting should be done in the template (using the TT
plugin).

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9788: (follow-up) for expirationdate in Letter.pm
Marcel de Rooy [Fri, 21 Jun 2013 16:43:59 +0000 (18:43 +0200)]
Bug 9788: (follow-up) for expirationdate in Letter.pm

Pasting comment from the Bugzilla report:

Looking bit longer at this code, it is kind of strange to find it
there in the first place. Adding maxpickupdelay in Letters.pm should
not be there, but it is..

Also this date is not used normally in the default HOLD Available for
Pickup notice (that we are generating in this case). And if it would be
undef, the expiration date should imo be empty instead of today+0.
(before adding maxreservespickupdelay, you should test the allowexpire
pref first) So it is an (invisible) bug on its own.

Test plan:
See former patch. Kyle just discovered this bug, apparently by
deleting the maxpickupdelay pref..

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9788: (follow-up) removing the alldates parameter from GetReservesFromItemnumber
Marcel de Rooy [Thu, 26 Sep 2013 08:33:46 +0000 (10:33 +0200)]
Bug 9788: (follow-up) removing the alldates parameter from GetReservesFromItemnumber

Before bug 9788 the alldates parameter of GetReservesFromItemnumber was
actually not used in the codebase.
The first patch of bug 9788 did change that and passed true by default.

But a closer look revealed that we do not really need it.

The parameter is removed by this patch; the SQL statement is slightly
adjusted: if reservedate<=now or a waitingdate is filled for the
requested itemnumber, GetReservesFromItemnumber will return the reserve.

This includes so-called future waits: a future hold that has been confirmed
ahead of time with pref ConfirmFutureHolds > 0 days.

Note that future item-level holds are not really interesting to return; this
just corresponds to original behavior. Future next-available holds are not
in view at all; they do not contain an item number.

Test plan:
Actually, the test plan of the first patch is valid. But for completeness I
repeat it here:

[1] Enable future holds and set ConfirmFutureHolds to 2 days.
[2] Place a future next-available hold for 2 days ahead.
[3] Check item status on catalogue detail. Available? That is fine.
[4] Confirm the future hold by checking it in. ('future wait')
[5] Look at item status again on catalogue detail. Must be Waiting now.
[6] Switch to OPAC and login as another opac user. Goto Place a hold.
[7] Check item status with item level hold info. Is it waiting?
[8] Try to place hold in staff, check item level status again. Waiting?
[9] Make a transfer for the item. Switch branch. Check hold status on
    Transfers to receive.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9788: Improvements when calling GetReservesFromItemnumber
Marcel de Rooy [Mon, 11 Mar 2013 13:28:57 +0000 (14:28 +0100)]
Bug 9788: Improvements when calling GetReservesFromItemnumber

This patch makes GetReservesFromItemnumber also returns the waiting
date and removes some repeated code.

Improves item status display on catalogue detail, when placing a hold at
opac-reserve and in staff, and on transfers to receive form.

This patch builds on work from reports 9367 and 9761.

Test plan:

Place a future next-av. hold (enable future holds prefs), say 2 days ahead.
Check item status on catalogue detail. Nothing to see.
Enable ConfirmFutureHolds by inserting a number of days, say 2.
Confirm earlier hold by checking it in. Look at item status again on detail.
Switch to other opac user. Try to place a hold again. Check item status with
item level hold info. Try to place hold in staff, check item level status.
Make a transfer for that item. Switch branch. Look at transfers to receive.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10987: (follow-up) fix display of authorities containing only one see from or...
Galen Charlton [Thu, 16 Jan 2014 23:07:09 +0000 (23:07 +0000)]
Bug 10987: (follow-up) fix display of authorities containing only one see from or see also lnik

This patch fixes an incorrect test on the number of see from and
see also links in the authority record, as otherwise if a record
had only one 4XX or 5XX, the linked headings weren't displayed at
all.  This patch also makes the test consistent across the staff
theme and the two OPAC themes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10987: remove duplicate 'see also' and 'see from' labels from authority search...
Tomas Cohen Arazi [Wed, 2 Oct 2013 18:42:13 +0000 (15:42 -0300)]
Bug 10987: remove duplicate 'see also' and 'see from' labels from authority search results

If an authority record has more than one 4xx$a (or 5xx$a) entries the
corresponding labels 'see also' and 'used for/see from' werwe repeated.
This patch removes duplicate instances of the labels, improving
readability.

To test:
- Have authority records with more than one entry on the 4xx (or 5xx)
  fields.
- Do a search, check "see also:" (or 'used for/see from') appear more
  than once.
- Apply the patch
- Reload and check it looks nicer :-D
- Repeat for: staff auth search, OPAC using ccsr, OPAC using prog
- Signoff

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as decribed. No koha-qa errors
Nice view on staff and both opac

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10691: (follow-up) replace HTML comments with TT contents
Galen Charlton [Thu, 16 Jan 2014 22:44:25 +0000 (22:44 +0000)]
Bug 10691: (follow-up) replace HTML comments with TT contents

Comments on the usage of Template Toolkit blocks don't need
to appear in the rendered HTML, so this patch converts HTML
comments to TT comments and thereby saves a tiny amount of
bandwidth.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10691: (follow-up) restore behaviour for control field ($w)
Tomas Cohen Arazi [Wed, 11 Dec 2013 14:14:47 +0000 (11:14 -0300)]
Bug 10691: (follow-up) restore behaviour for control field ($w)

As noted by Jared, in the presence of 4XX$w or 5XX$w the display
got broken by this refactoring. This patch restores the previous
behaviour in that front.

The OPAC themes get fixed too, and the Bootstrap one gets this
fix too.

Applied the fix that Galen proposed on comment #30 regarding
Zeno's fix in bug 11174.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10691: use authority ID in see-also links in authority search results (OPAC)
Tomas Cohen Arazi [Wed, 18 Sep 2013 14:33:07 +0000 (11:33 -0300)]
Bug 10691: use authority ID in see-also links in authority search results (OPAC)

This patch changes the URL and data used to show the 'see also' links
on the OPAC's authority search results page.

Bonus points: makes some strings translatable.

To test:
- On your dev setup (master) create some authority records (I created
  personal name authorities).
- Pick one of them and link 400$a to another one, do the same with 500$a
- Add some other 400$a and 500$a without linking (i.e. plain text)
- Make sure zebra is running and changes got indexed.
- In the OPAC search for the authority that is linked to the others.
- Check the 'see also:' link points to an authority search
- Apply the patch
- Reload/re-do the search
- Check the 'see also:' link points to the authority id in the case
  of linked authorities, and to an authority search in the case of
  plain text headings.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No errors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10691: use authority ID in see-also links in authority search results (staff)
Tomas Cohen Arazi [Wed, 18 Sep 2013 15:18:20 +0000 (12:18 -0300)]
Bug 10691: use authority ID in see-also links in authority search results (staff)

This patch changes the URL and data used to show the 'see also' links
on the Staff's authority search results page.

Bonus points: makes some strings translatable.

To test:
- On your dev setup (master) create some authority records (I created
  personal name authorities).
- Pick one of them and link 400$a to another one, do the same with 500$a
- Add some other 400$a and 500$a entries with plain text (i.e. no
  linking)
- Make sure zebra is running and changes got indexed.
- In the staff interface search for the authority that is linked to the
  others.
- Check the 'see also:' link points to an authority search
- Apply the patch
- Reload/re-do the search
- Check the 'see also:' link points to the authority id for linked
  authorities,
  and to an authority search result in the case of plain text entries.
- Check that the authority search from the cataloguing interface still
  works as usual.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No errors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7143: add another name to the about page
Galen Charlton [Thu, 16 Jan 2014 15:30:43 +0000 (15:30 +0000)]
Bug 7143: add another name to the about page

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7143: Updating about page and history
Chris Cormack [Sun, 12 Jan 2014 07:11:40 +0000 (20:11 +1300)]
Bug 7143: Updating about page and history

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11543: (followup) add one more test
Jonathan Druart [Wed, 15 Jan 2014 17:47:59 +0000 (18:47 +0100)]
Bug 11543: (followup) add one more test

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11543: Increasing test coverage for Category.pm
Roman Amor [Tue, 14 Jan 2014 01:17:06 +0000 (14:17 +1300)]
Bug 11543: Increasing test coverage for Category.pm

To test:
1. Run prove t/Category.t
2. Apply patch
3. Run prove t/db_dependent/Category.t - Notice 2 tests were run

Signed-off-by: daniel <daniel.barker.nz@gmail.com>
Made the requested changes.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11522: improve formating of self-registration form
Francesca Moore [Tue, 14 Jan 2014 22:43:00 +0000 (11:43 +1300)]
Bug 11522: improve formating of self-registration form

1. in prog theme, enable opac self-registration and inspect clear date
   with firebug; note that there are empty paragraph tags
2. add date of birth as a requirment in self-registration
3. apply patch
4. refresh page and notice that empty paragraph tags have been deleted,
   so that required lines up with clear date
5. repeat the above steps for bootstrap theme

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 9210: wrap long lines in printed hold notices
Sophie Meynieux [Tue, 4 Dec 2012 17:05:36 +0000 (18:05 +0100)]
Bug 9210: wrap long lines in printed hold notices

This commit adds wrapping styles to print-notices.tt template

Test plan:
  * place a hold on a title with a very very long title or author
  * mark it as "waiting for pickup" by doing a checkin
  * go to command line interface, and run
  * misc/cronjobs/gather_print_notices.pl /tmp
  * misc/cronjobs/printoverdues.sh /tmp
  * if your title/author is long enough, it's split on 2 lines
    with this patch (it is not before this patch)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11554: Capitalization fix in patron account on fines tab
Holger Meißner [Wed, 15 Jan 2014 09:16:08 +0000 (10:16 +0100)]
Bug 11554: Capitalization fix in patron account on fines tab

Works as described.

To test: Create patron account with outstanding fines. Open "Fines" tab.
Confirm that capitalization is correct.

Sponsored-by: Hochschule für Gesundheit (hsg), Germany
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
String patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agobug 11544: increasing test coverage for Installer_PerlModules.pm
alex_h [Tue, 14 Jan 2014 01:18:46 +0000 (14:18 +1300)]
bug 11544: increasing test coverage for Installer_PerlModules.pm

To test
1. run prove t/Installer_PerlModules.t
2. apply patch
3. run prove t/Installer_PerlModules.t
   notices more tests are run

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Adds another passing test.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tests pass :)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11541: (follow-up) move Installer.t to t/db_dependent
Galen Charlton [Tue, 14 Jan 2014 21:43:56 +0000 (21:43 +0000)]
Bug 11541: (follow-up) move Installer.t to t/db_dependent

This test requires a valid Koha context, so this patch
moves it to t/db_dependent.

To test:

[1] Verify that prove -v t/db_dependent/Installer.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11541: (follow-up) update tests
Galen Charlton [Tue, 14 Jan 2014 21:42:45 +0000 (21:42 +0000)]
Bug 11541: (follow-up) update tests

This patch updates some of the tests to more clearly
check that fields in the C4::Installer object are getting
set correctly from the context.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11541: (follow-up) repair some warnings
Kyle M Hall [Tue, 14 Jan 2014 20:04:27 +0000 (15:04 -0500)]
Bug 11541: (follow-up) repair some warnings

Tests succeed, but cause many warnings:

prove t/Installer.t
t/Installer.t .. 1/9 "my" variable $self masks earlier declaration in
same scope at t/Installer.t line 19.
"my" variable $self masks earlier declaration in same scope at
t/Installer.t line 20.
"my" variable $self masks earlier declaration in same scope at
t/Installer.t line 21.
"my" variable $self masks earlier declaration in same scope at
t/Installer.t line 22.
"my" variable $self masks earlier declaration in same scope at
t/Installer.t line 23.
Odd number of elements in anonymous hash at t/Installer.t line 17.
Use of uninitialized value within @ARGV in anonymous hash ({}) at
t/Installer.t line 17.

The patch remedies that.

Test Plan:
1) Apply first patch on this bug
2) Run "prove t/Installer.t"
3) Note the warnings
4) Apply this patch
5) Repeat step 2
6) Note the warnings are gone

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11541: increase test coverage of Installer.pm
Aleisha Amohia [Tue, 14 Jan 2014 01:18:36 +0000 (14:18 +1300)]
Bug 11541: increase test coverage of Installer.pm

To test
1. Run prove t/Installer.t
2. Apply patch
3. Run prove t/Installer.t
   Notice more tests are run

Signed-off-by: Francesca Moore <francescalamoore@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass :)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11540: (follow-up) add a couple of tests more
Tomas Cohen Arazi [Tue, 14 Jan 2014 14:35:31 +0000 (11:35 -0300)]
Bug 11540: (follow-up) add a couple of tests more

This patch makes sure all scenarios are covered for SetUTF8Flag.

Signed-off-by: Emma Heath <emmaheath.student@wegc.school.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11540: increase test coverage of Charset.pm
Emma Heath [Tue, 14 Jan 2014 01:18:47 +0000 (14:18 +1300)]
Bug 11540: increase test coverage of Charset.pm

To test
1. run prove t/Charset.t
2. apply patch
3. run prove t/Charset.t
 notice more tests are run

Signed-off-by: Tom Houlker <thomas.houlker@hibs.school.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tests pass!

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11539: removing 2 unused files
Tom Houlker [Tue, 14 Jan 2014 01:24:11 +0000 (14:24 +1300)]
Bug 11539: removing 2 unused files

This patch removes C4::Barcodes::PrinterConfig, which is
used by no other code in the database.

Signed-off-by: Emma Heath <emmaheath.student@wegc.school.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
No instances of PrinterConfig found in the codebase

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Couldn't find any reference to those files in Koha.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11545: (follow-up) move Languages.t to t/db_dependent
Galen Charlton [Tue, 14 Jan 2014 20:48:33 +0000 (20:48 +0000)]
Bug 11545: (follow-up) move Languages.t to t/db_dependent

This patch moves t/Languages.t to t/db_dependent/Languages.t,
as the new get for getAllLanguages() works best if there's
a database available.

To test:

[1] Run prove -v t/db_dependent/Languages.t
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11545: Increasing test coverage for Languages.pm
merllissia [Tue, 14 Jan 2014 01:18:35 +0000 (14:18 +1300)]
Bug 11545: Increasing test coverage for Languages.pm

To test
1. Run prove t/Languages.t
2. Apply patch
2. Run prove t/Languages.t again and notice: More tests are run

Signed-off-by: alex_h <dhorsman@xtra.co.nz>
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Adds another passing test. I took th liberty of moving the test plan
from the subject to the commit message. :-)

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tests pass :)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agobug 11542: Increase test coverage for Print.pm
daniel [Tue, 14 Jan 2014 01:19:39 +0000 (14:19 +1300)]
bug 11542: Increase test coverage for Print.pm

to test
1. run prove t/Print.t
2. apply patch
3. run prove t/Print.t
Notice more tests are done

Signed-off-by: Roman Amor <romanwilton@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
UT passes, also passes koha-qa.pl

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tests pass :)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11503: [Follow-up] fix another typo
Owen Leonard [Tue, 14 Jan 2014 13:50:09 +0000 (08:50 -0500)]
Bug 11503: [Follow-up] fix another typo

There is still a typo left to fix which I didn't catch because I was
doing a spell-check and didn't double-check the bug report:

Van der Griten -> Van der Grinten

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11537: (follow-up) mock C4::Context::preference
Galen Charlton [Tue, 14 Jan 2014 19:25:22 +0000 (19:25 +0000)]
Bug 11537: (follow-up) mock C4::Context::preference

This avoids turning t/Log.t into one that requires a valid
session context.

To test:

[1] Run the following and verify that the test passes.

unset KOHA_CONF
prove -v t/Log.t

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11502: make library filter in "Holds To Pull" more precise
David Cook [Thu, 9 Jan 2014 06:12:26 +0000 (17:12 +1100)]
Bug 11502: make library filter in "Holds To Pull" more precise

This patch uses regex checking via the DataTables fnFilter API method
to make the branch filter more precise on the "Holds to Pull" page.

The ability to use regex is built into DataTables so this just adds
the actual expression.

_TEST PLAN_

Before applying:

1) Add library (branches) with codes of NM, NMH, and NB
2) Add items (that can be placed on hold) at all these branches
3) Place a hold on an item that is only available at NM
4) Place a hold on an item that is only available at NMH
5) Place a hold on an item that is only available at NM and NB
6) Go to "Holds to Pull" in the Circulation module
7) Filter by these three different values
8) Note that filtering by "NM" will incorrectly bring up all three
holds, while "NMH" and "NB" will only pull up one (like they should).

Apply the patch.

9) Shift+refresh the page so that your Javascript refreshes
10) Repeat step 7 (filtering by the different branch values)
11) Note that filtering by "NM" will now only bring up the hold for "NM"
and the hold for "NM" and "NB", while the others still only bring up
one hold.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11537: Increasing test coverage for C4::Log
alex_h [Mon, 13 Jan 2014 22:52:04 +0000 (11:52 +1300)]
Bug 11537: Increasing test coverage for C4::Log

To test:
1. run prove t/Log.t
   Notice 1 test is run
2. apply patch
3. run prove t/Log.t
   Notice 3 tests are run

Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described.

I think there might be a typo in "Testing git log status". Should
this read "Testing get log status"? (Noticed while looking at the
code/running perl t/Log.t.)

In any case, thanks for the patch. Looks good!

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Fixed typo, thanks David

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described:
1..3
ok 1 - use C4::Log;
ok 2 - Testing GetLogStatus
ok 3 - Testing hash is non empty

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11535: sanitize input from patron self-registration form
Galen Charlton [Mon, 13 Jan 2014 21:51:56 +0000 (21:51 +0000)]
Bug 11535: sanitize input from patron self-registration form

This patch adds the use of C4::Scrubber to the processing of input
from the patron self-registration form, thereby closing off one
avenue for Javascript injection.

To test:

[1] Use the OPAC self-registration form to enter a new patron,
    and set its address to something like:

    <span style="color: red;">BAD</span>

[2] In the staff interface, bring up the new patron record.  The
    address will show up in red, indicating a successful HTML
    injection.
[3] Apply the patch and use self-registration to enter a new
    patron with a similar case of unwanted HTML coding.
[4] Bring up the second patron in the staff interface.  This time,
    the undesirable HTML tag should not be present.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Tags are not present on testing.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Confirmed bug and that the patch fixes it.
Passes all tests and QA script.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10318: Show primary email in patron search results
Ketan Kulkarni [Wed, 9 Oct 2013 14:37:27 +0000 (20:07 +0530)]
Bug 10318: Show primary email in patron search results

This patch makes the patron's primary email address be displayed (as
a mailto link) on the patron search results page.

Signed-off-by: Melissa Lefebvre <melissa@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, template only change.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11505: fix untranslatable table headers in Label batch manager
Owen Leonard [Fri, 10 Jan 2014 20:46:29 +0000 (15:46 -0500)]
Bug 11505: fix untranslatable table headers in Label batch manager

The label batch manager script hard-codes the table header cell labels
in order to pass them to an HTML-building function. This obviously isn't
the best solution for internationalization, but picking the whole scheme
apart would be very complicated.

Instead this patch uses a SWITCH statement to check for each possible
case and outputs the correct translatable string for each.

To test, apply the patch and run "perl translate update" for any
translation. Check the revised po file and confirm that the new strings
are present. View the label batch edit page and confirm that the table
headings look correct: Tools -> Labels -> Manage batches -> Edit batch.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes all tests.
Similar fixes are probably needed for other pages of the labels
modules.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11381: improve styling of IDreamBooks content in bootstrap theme
Owen Leonard [Fri, 10 Jan 2014 17:45:30 +0000 (12:45 -0500)]
Bug 11381: improve styling of IDreamBooks content in bootstrap theme

Styling of IDreamBooks elements is not correct in the bootstrap theme
because the relevant CSS was not transferred from the prog theme. This
patch adds it back.

To test, switch to the bootstrap theme and enable IDreamBooks system
preferences in the OPAC, particularly IDreamBooksReadometer. Find a book
in the OPAC which shows IDreamBooks review data and confirm that
everything looks correct.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described. Tested with "The help".

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10896: Add a --verbose option to koha-translate
Tomas Cohen Arazi [Mon, 6 Jan 2014 13:52:38 +0000 (10:52 -0300)]
Bug 10896: Add a --verbose option to koha-translate

The -v and --verbose option switches add the --verbose switch to the
misc/translator/translate script call in the packages' 'koha-translate'
command.

The docs are updated accordingly.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Works as expected with and without -v. Man page looks good.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11389: reenable Pg as a DB scheme that Koha can connect to
Galen Charlton [Thu, 12 Dec 2013 23:55:14 +0000 (23:55 +0000)]
Bug 11389: reenable Pg as a DB scheme that Koha can connect to

This patch restores the ability to request a DBI database handle
or a DBIx::Class schema object connected to a PostgreSQL database.

To address the concerns raised in bug 7188, only "mysql" and "Pg"
are recognized as valid DB schemes.  If anything else is passed
to C4::Context::db_scheme2dbi or set as the db_scheme in the Koha
configuration file, the DBD driver to load is assumed to be "mysql".

Note that this patch drops any pretense of Oracle support.

To test:

[1] Apply patch, and verify that the database-dependent tests
    pass when run against a MySQL Koha database.
[2] To test against PostgreSQL, create a Pg database and
    edit koha-conf.xml to set db_scheme to Pg (and adjust
    the other DB connection parameters appropriately).  The
    following tests should pass, at minimum:

    t/Context.t
    t/db_dependent/Koha_Database.t

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, some additional notes:

- Installed Postgres following
  http://wiki.ubuntuusers.de/PostgreSQL
- Created a database user koha
- Created a database koha
- Changed the koha-conf.xml file
    <db_scheme>Pg</db_scheme>
    <database>koha</database>
    <hostname>localhost</hostname>
    <port>5432</port>
    <user>koha</user>
    <pass>xxxx</pass>
- Installed libdbd-pg-perl
- Ran the web installer until step 3 everything looked ok
  Step 3 complains:
    Password for user koha: psql: fe_sendauth: no password supplied
- Both t/Context.t and t/db_dependent/Koha_Database.t pass

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11509: (follow-up) fix a couple typos
Galen Charlton [Mon, 13 Jan 2014 20:54:37 +0000 (20:54 +0000)]
Bug 11509: (follow-up) fix a couple typos

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11509: improve usage information printed by koha-create
Tomas Cohen Arazi [Thu, 9 Jan 2014 13:56:56 +0000 (10:56 -0300)]
Bug 11509: improve usage information printed by koha-create

This patch makes koha-create print better and more descriptive usage
information. Also adds the --help and -h switches.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Removed trailing " from:
  $scriptname [db usage mode] [options] instancename"

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11510: koha-translate usage message fixes
Tomas Cohen Arazi [Thu, 9 Jan 2014 15:37:20 +0000 (12:37 -0300)]
Bug 11510: koha-translate usage message fixes

The koha-translate's usage message has a couple of inconsistencies:

'--all' should be '--available'
and '--help' is missing from the usage examples.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, tested using instructions on
http://wiki.koha-community.org/wiki/Testing_man_pages

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11503: fix several typos
Owen Leonard [Fri, 10 Jan 2014 16:00:22 +0000 (11:00 -0500)]
Bug 11503: fix several typos

This patch corrects several typos: Some reported in Bug 11503, others
found during a systematic spell check of the help files.

To test, examine the changes and confirm that the spelling changes are
correct.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10952: (follow-up) remove mention of KohaOpacRecentSearches cookie
Galen Charlton [Fri, 10 Jan 2014 16:55:37 +0000 (16:55 +0000)]
Bug 10952: (follow-up) remove mention of KohaOpacRecentSearches cookie

Now that this cookie no longer exists, remove mention of it
from a test case.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10952: (follow-up) clear seach history from session after saving it to DB
Galen Charlton [Fri, 10 Jan 2014 16:49:01 +0000 (16:49 +0000)]
Bug 10952: (follow-up) clear seach history from session after saving it to DB

This patch makes sure that the search history from an
anonymous session is cleared from the session after a user
logs in (and the session history is saved to that user's
record in the database).  This fixes a problem where the
search history from the session got repeatedly added to the
database each time the user did something while logged
into the OPAC.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10952: (follow-up) Always flush session after deletion
Julian Maurice [Mon, 6 Jan 2014 09:00:41 +0000 (10:00 +0100)]
Bug 10952: (follow-up) Always flush session after deletion

This is recommended in CGI::Session documentation.

Signed-off-by: Charlene Criton <charlene.criton@univ-lyon2.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10952: (follow-up) comments fixes and unit tests
Julian Maurice [Wed, 18 Dec 2013 09:58:36 +0000 (10:58 +0100)]
Bug 10952: (follow-up) comments fixes and unit tests

- Remove unit tests for ParseSearchHistoryCookie, which doesn't exist
  anymore
- Add unit tests for ParseSearchHistorySession and
  SetSearchHistorySession
- Remove/Modify comments about search history cookie

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Tests fixed and moved, and comments tidied up

Signed-off-by: Charlene Criton <charlene.criton@univ-lyon2.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10952: Store anonymous search history in session
Julian Maurice [Thu, 26 Sep 2013 09:22:26 +0000 (11:22 +0200)]
Bug 10952: Store anonymous search history in session

Storing search history into cookie can cause problems, due to the size
limitation of 4KB.

The solution here is to store search history into the CGI::Session
object, so there is no size limitation (but anonymous search history
still remember up to 15 requests max.)

Test plan:
- Go to OPAC in anonymous mode.
- Check that the "Search history" link is *not* shown in the top right
  corner of the page
- Make some searches on /cgi-bin/koha/opac-search.pl
- The "Search history" link should appear. Click.
- Your search history should be displayed.
- Try to log in with invalid username/password
- Go back to search history, it's still there
- Now log in with valid username/password
- Your anonymous search history should be saved into your own search
  history.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Restoring original sign offs and comments below

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described. No koha-qa errors

Well, search history saving is similar before and after patch.
i.e. anonmymous search is saved when user logs in, but cookie
KohaOpacRecentSearches is empty.
Shows current an previous session searches

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
All tests and QA script pass, works as described.

Signed-off-by: Charlene Criton <charlene.criton@univ-lyon2.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11051: remove unneccessary SQL queries in GetBranches
Robin Sheat [Tue, 15 Oct 2013 02:01:31 +0000 (15:01 +1300)]
Bug 11051: remove unneccessary SQL queries in GetBranches

The way GetBranches was written, it will issue one query to get all
branches, and then one query per branch for the branch relations.
This patch pre-fetches the relations table (as we need it all anyway)
and so makes the whole process happen in two queries, rather than take
1+N, where N is the number of branches.

This might not seem like much, but when you do a search, GetBranches is
called once for each result, so 25. And you might have 10 branches. This
causes 275 database requests when you could get away with 50.

From profiling, when you run a search, this is the thing that calls
DBI::st::execute the most. Refer:
http://debian.koha-community.org/~robin/opac-search/usr-share-koha-lib-C4-Branch-pm-146-line.html#125

Test Plan:
* Have a database with branches and relationships between the branches.
  (these are 'Library groups' in the UI.
* Make sure the relationships show up correctly after applying the
  patch.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11475: fix return link after editing/deleting items in batch
Jonathan Druart [Tue, 7 Jan 2014 14:14:01 +0000 (15:14 +0100)]
Bug 11475: fix return link after editing/deleting items in batch

Bug introduced by bug 9044.

Test plan:
1- First we search for records with multiple items (books or serials,
does not matter)
2- We open this record we found with multiple items for editing
3- We chose "Edit items in batch" option from the "Edit" menu
4- We make corrections on the fields under the "Edit item"  (For example
we change the collection code as "fiction")
5- We save this using "Save button" at the bottom, after we are done.
6- Just after we save, there will be a button named "Done" available
just under the page, and when we click on "Done" we encounter the Error
screen.

Before the patch, the "Done" link points to
/cgi-bin/koha/tools/CATALOGUING.
After applying the patch, the "Done" link points to the biblio detail
page.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
All tests pass

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10646 - warn if mod_rewrite is not enabled
Robin Sheat [Tue, 19 Nov 2013 03:19:12 +0000 (16:19 +1300)]
Bug 10646 - warn if mod_rewrite is not enabled

Koha requires mod_rewrite. If it's not enabled in Apache, then
koha-create will now abort with a helpful error message. Also adds a
warning when not run as root to avoid confusing errors.

Test plan:
 * apply the patch
 * a2dismod rewrite
 * run koha-create without sudo, note the error about being root
 * run koha-create with sudo, note the error about rewrite
 * a2enmod rewrute
 * repeat test above, note that it works

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11452: Add unit tests for Koha::Template::Plugin::Cache
Chris Cormack [Fri, 27 Dec 2013 03:06:34 +0000 (16:06 +1300)]
Bug 11452: Add unit tests for Koha::Template::Plugin::Cache

To test

run prove t/Koha_Template_Plugin_Cache.t

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11499: UT: Make zebra_setup.pl correctly set indexing mode
Tomas Cohen Arazi [Wed, 8 Jan 2014 15:21:42 +0000 (12:21 -0300)]
Bug 11499: UT: Make zebra_setup.pl correctly set indexing mode

By adding the relevant environment variables to the script the generated
koha-conf.xml file for the unit tests is correct now.

Test plan:
- Verify that tests pass now:
  $ prove -v t/db_dependent/Search.t 2> /dev/null | grep 11499

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes unit test, koha-qa.pl

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11499: (regression tests) indexing modes not properly set on generated koha-conf.xml
Tomas Cohen Arazi [Wed, 8 Jan 2014 15:17:26 +0000 (12:17 -0300)]
Bug 11499: (regression tests) indexing modes not properly set on generated koha-conf.xml

t/db_dependent/Search.t creates its own temporary koha-conf.xml and
related files, and it fails to properly set indexing modes for
bibliographic and authority records.

This patch adds regression tests for that.

To test:

 $ prove -v t/db_dependent/Search.t 2> /dev/null | grep 11499

The test should fail unless the main page is applied.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11439: (follow up) add missing rollback call
Tomas Cohen Arazi [Thu, 9 Jan 2014 18:51:11 +0000 (15:51 -0300)]
Bug 11439: (follow up) add missing rollback call

This UT got wrapped inside a transaction with autocommit=0 but
the rollback call was inadvertedly ommited. Adding it.

[RM note: an explicit rollback is not required, as the
 transaction will roll back automatically at the end of
 the DB session. Nonetheless, it hurts nothing to have
 it be explicit.]

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11480: Fix invalid assumptions in JSONStream test
Colin Campbell [Mon, 6 Jan 2014 16:53:33 +0000 (16:53 +0000)]
Bug 11480: Fix invalid assumptions in JSONStream test

Tests for C4::Output::JSONStream made the invalid assumption
that the hash keys of the modules internal structure
will always be returned in the same sequence.
A hash is an unordered structure. as of perl 5.18
this has beem reinforced by random seeding of the
hashing function. See the info in perldelta and
the doc for JSON.

This patch changes the tests to be sequence-neutral
where the previous test was testing that a new element
was added and an existing one was untouched these have
been separated into individual tests.

Some typos in the messages have been corrected

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Test Plan

1/ Run t/Output_JSONStream.t , 8 tests should pass (or perhaps fail,
   but inconsistently under perl 5.18 or greater)
2/ Apply patch
3/ Run t/Output_JSONStream.t 10 tests should pass now

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7965: Silence warns in staff log
Chris Cormack [Fri, 27 Dec 2013 06:06:34 +0000 (19:06 +1300)]
Bug 7965: Silence warns in staff log

Silence warns in C4::Bookseller::GetBooksellersWithLateOrders()

to test
1/ run prove t/db_dependent/Bookseller.t
   Notice lots of Use of uninitialized value $delay in numeric lt (<) at /var/lib/jenkins/jobs/Koha_master/workspace/C4/Bookseller.pm line 134 type lines
2/ apply patch
3/ run prove t/db_dependent/Bookseller.t
   Notice warns are gone

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tiny change, positive consequences.
Passes QA script and all tests.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10774: (follow-up) tweak styling of buttons on Bootstrap theme
Galen Charlton [Fri, 10 Jan 2014 15:21:29 +0000 (15:21 +0000)]
Bug 10774: (follow-up) tweak styling of buttons on Bootstrap theme

Following a discussion with Kyle, this patch applies the
btn-mini style to the per-hold cancel and suspend/unsuspend
buttons to make them a bit smaller.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10774: (QA Followup) Add support for bootstrap opac theme
Kyle M Hall [Wed, 8 Jan 2014 16:21:37 +0000 (11:21 -0500)]
Bug 10774: (QA Followup) Add support for bootstrap opac theme

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10774: Allow individual holds to be suspended and resumed from the OPAC
Kyle M Hall [Wed, 21 Aug 2013 11:30:54 +0000 (07:30 -0400)]
Bug 10774: Allow individual holds to be suspended and resumed from the OPAC

Right now, holds can only be suspended and resumed from the OPAC as a
whole. It would be nice to be able to suspend and resume holds on a hold
by hold basis from the OPAC.

Test Plan:
1) Apply this patch
2) Log in to the OPAC
3) Place a number of holds
4) Browse to "my summary" and select the holds tab
5) From here, test the following actions
   a) Suspend a hold indefinitely ( no resume date )
   b) Suspend a hold with a date to automatically resume
   c) Manually resume a suspended hold
6) Disable AutoResumeSuspendedHolds, ensure the suspend until date field
   is no longer visible.
7) Disable SuspendHoldsOpac, ensure all suspension related fields are
   no longer visible.

Signed-off-by: Chris Rohde <crohde@roseville.ca.us>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11457: avoid spurious test failure in t/db_dependent/Bookseller.t
Chris Cormack [Thu, 2 Jan 2014 04:15:56 +0000 (17:15 +1300)]
Bug 11457: avoid spurious test failure in t/db_dependent/Bookseller.t

This patch clears the subscription table so tests pass correctly if
there happens to have been a subscription with an end date before
2013-08-01.

To test
1/ Add a subscription in the serials module, with an end date before
2013-08-01
2/ run prove -v t/db_dependent/Bookseller.t
   Notice tests 22 and 23 fail
3/ Apply patch
4/ run test again
5/ Notice tests succeed

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tests now clean the subscription table before running
the tests, so that the will always pass.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11483: (follow-up) fix typos
Galen Charlton [Wed, 8 Jan 2014 15:14:43 +0000 (15:14 +0000)]
Bug 11483: (follow-up) fix typos

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11483: Add missing serial help files
Nicole C. Engard [Mon, 6 Jan 2014 18:15:36 +0000 (12:15 -0600)]
Bug 11483: Add missing serial help files

The help files for the Serial Numbering Patterns and Frequencies pages
were missing.  This patch adds them.

To test:

* Visit the two new serial pages
* Click Help
* Confirm text and links are right

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11260: (follow-up) repair German sample_z3950_servers.sql
Galen Charlton [Wed, 8 Jan 2014 01:10:32 +0000 (01:10 +0000)]
Bug 11260: (follow-up) repair German sample_z3950_servers.sql

Without this patch, the sample Z39.50 servers for de-DE
would fail to load.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11260: (follow-up) remove inadvertant change to English sample_z3950_servers.sql
Galen Charlton [Wed, 8 Jan 2014 01:01:37 +0000 (01:01 +0000)]
Bug 11260: (follow-up) remove inadvertant change to English sample_z3950_servers.sql

Part of the patch for bug 11260 had the effect of undoing
commit 5aae737, thereby adding back two undesirable things:

- use of backticks in the SQL
- setting z3950servers.id explicitly

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11260: Follow up - normalizing frequencies in English sample file a bit
Katrin Fischer [Sun, 17 Nov 2013 21:58:52 +0000 (22:58 +0100)]
Bug 11260: Follow up - normalizing frequencies in English sample file a bit

After some discussion in IRC I am throwing in some changes for the
English sample frequencies:

- Change Vol to Vol.
- Change No to No.

We had both forms in the file, now it should be consistent.

To test:
- Run English web installer installing all sample files, especially
  frequencies
- Check installed frequencies
- Check available options creating a subscription

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11260: Update German web installer - frequencies and numberpatterns
Katrin Fischer [Sun, 17 Nov 2013 21:56:45 +0000 (22:56 +0100)]
Bug 11260: Update German web installer - frequencies and numberpatterns

Translates the new files for frequencies and numberpatterns

To test:
- Run the German web installer with all sample files
- Check all files import without errors, especially frequencies and
  numbering patterns
- Check frequencies in serials
- Check numbering patterns in serials
- Create a subscription, check possible choices

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11260: Update German web installer for 3.14
Katrin Fischer [Sun, 17 Nov 2013 20:05:45 +0000 (21:05 +0100)]
Bug 11260: Update German web installer for 3.14

Mandatory:
- adds auth_values.sql and .txt with YES_NO referenced in patron_attributes.sql
- updates sample notices with redone slip templates (ISSUESLIP, ISSUEQSLIP,
  RESERVSLIP, TRANSFERSLIP)
- adds German translations to subtag_registry.sql and copies updated file
  from en to de-DE
- adds translation for new course_reserves permission to userflags.sql
- adds translations for new permissions in userpermissions.sql
- Fixes typo IndependantBranches in English userpermissions.sql

Optional:
- adds csv_profiles.sql and translation of the serial claims profile
- adds z39.50 servers for authorities to sample_z3950_servers.sql

To test:
- Run web installer in English
  - check all sample files, make sure they all install without SQL errors
  - check language list on advanced search displays correctly still
  - check area/language list on tools > news displays correctly still
  - check permissions for correct spelling of IndependentBranches

- Run web installer in German
  - repeat checks from above
  - also check: authorised values, especially existence of YES_NO
  - all permissions are translated now
  - slip notices are all there and look right
  - new z39.50 servers for authorities are available
  - csv profile for serial claims is available and works as expected

... and anything else you can think of.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10863: (follow-up) give limited circ operator way to proceed
Galen Charlton [Tue, 7 Jan 2014 04:33:05 +0000 (04:33 +0000)]
Bug 10863: (follow-up) give limited circ operator way to proceed

This patch tweaks the checkout form so that if a circ operator
doesn't have the circulate/force_checkout permission, they are
presented with a button to continue on if they ran into a restriction
on the loan.  Otherwise, there was no clear way to carry on, as the
item barcode field was disabled.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10863: (follow-up) set correct description for manage_restrictions permission...
Galen Charlton [Tue, 7 Jan 2014 04:06:17 +0000 (04:06 +0000)]
Bug 10863: (follow-up) set correct description for manage_restrictions permission during upgrade

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10863: DBRev 3.15.00.012
Galen Charlton [Tue, 7 Jan 2014 04:02:42 +0000 (04:02 +0000)]
Bug 10863: DBRev 3.15.00.012

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10863: Add 2 circulation permissions: force_checkout and lift_restriction
Jonathan Druart [Wed, 5 Jun 2013 12:37:38 +0000 (14:37 +0200)]
Bug 10863: Add 2 circulation permissions: force_checkout and lift_restriction

This patch adds 2 circulation permissions: force_checkout and
lift_restriction.

During upgrade, these two permission are added to existing staff
users that already have the base circulate permission.

force_checkout allows a librarian to force a checkout if a limitation
occurred.

lift_restriction allows a librarian to lift a restriction for a patron.

Test plan:
1/ Find a debarred patron and go on the checkout page. The "Lift
restriction" button should be present only if the logged librarian has
the lift_restriction permission.
2/ If the force_checkout permission is set, a librarian should be
allowed to check out in several cases:
- age restriction
- the item is issued to another patron
- the item is not for loan
- the patron has overdue items
- the item is lost
- the item is a high demand item
- the item is reserved
- another case ?

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Bug 10863: The force checkout permission should not affect high holds

- typo checkout => check out.
- the force checkout permission does not affect high holds.

Signed-off-by: Cedric Vita <cedric.vita@dracenie.com>
Bug 10863: Follow-up: Adding missing permissions to translated files

This patch adds the 2 new permissions to all remaining sample files.
If the permissions don't get installed, the problem is bigger than
having an English description.

Also adds back the question "Check out anyway?" for high demand items (HIGHHOLDS).

Test xt/permissions.t passes now.

Bug 10863: Rename lift_restriction with manage_restrictions

The pref manage_restrictions now takes into account "Lost card" and
"Gone no address" restrictions.

Test plan:
- log in with a user with manage_restrictions permission
- verify you can set/unset restrictions when editing a patron
- log in with a user without manage_restrictions permission
- verify you cannot set/unset restrictions when editing a patron

Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
Note: The AgeRestrictionOverride pref has to be set to "Allow" if you
want to override the age restriction, even if the new permission is set.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Passes koha-qa.pl, works as advertised

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 6886: (follow-up) remove redundant test for singleBranchMode
Galen Charlton [Mon, 6 Jan 2014 16:27:17 +0000 (16:27 +0000)]
Bug 6886: (follow-up) remove redundant test for singleBranchMode

This patch removes an unnecessary check of the singleBranchMode
preference that occurred in an <xsl:otherwise> clause where
we already know that singleBranchMode != 1.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 6886: (follow-up) replace needless <xsl:choose> with <xsl:if>
Kyle M Hall [Wed, 4 Dec 2013 17:24:38 +0000 (12:24 -0500)]
Bug 6886: (follow-up) replace needless <xsl:choose> with <xsl:if>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Switching SingleBranchMode:

Tested with MARC21 and UNIMARC:
- "Don't allow" - branch is not shown in result list
- "Allow" - branch is shown for available items in result list

Changes are consistent over all 3 MARC flavours.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 6886: ensure that singleBranchMode does not display library name for reference...
Kyle M Hall [Fri, 4 Jan 2013 18:40:33 +0000 (13:40 -0500)]
Bug 6886: ensure that singleBranchMode does not display library name for reference copies

Test plan: Enable singleBranchMode and  OPACXSLTResultsDisplay. Perform
a search in the OPAC which returns results containing not-for-loan
items. Before the patch these items will show their library in search
results loan items. After the patch there will be not be a library
listed, matching other items in results.

Signed-off-by jmbroust <jean-manuel.broust@univ-lyon2.fr>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on second patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11336: (follow-up) fix typo in previous follow-up
Galen Charlton [Mon, 6 Jan 2014 16:16:22 +0000 (16:16 +0000)]
Bug 11336: (follow-up) fix typo in previous follow-up

This patch corrects a typo that broken ModReserveFill().  This
patch also adds a unit test that (via two levels of indirection)
exercises ModReserveFill().

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 10429: improve display of library and library filter on serials claim page
Fridolyn SOMERS [Fri, 7 Jun 2013 12:55:18 +0000 (14:55 +0200)]
Bug 10429: improve display of library and library filter on serials claim page

In serial claims page, the library code is displayed in table instead
of library name and library filter does not work.

This patch adds the display of library name by using libraries template
plugin.  It changes the Javascript library filter to make it work.

Also sets "all" filter in template (like status filter) to allow
translation and sets "all" as selected by default. The staff user's
library was selected by default, but the table was not filtered
with it.

Test plan :
- Go to serials claim of a vendor with serials of multiple libraries
=> You see branch filter with "(All)" and table shows library's names
- Check that library  filter does its work

Signed-off-by: David Cook <dcook@prosentient.com.au>
Works as described.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Table now shows the branch name instead of the branchcode.
First option was named (All), matching the status pull down.
When opening the claims page, (All) is preselected and the
result list matches with the selection. Before the patch
the library was preselected, but the result list did show
late issues from all branches.

This patch is an improvement, but there is still more work to do.

- Filters are not cumulative, but when another filter is selected
  the first filter is not reset.
- It's not possible to combine
  2 or more filters.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11342: fix error in OPAC self registration form if BorrowersTitles is empty
Kyle M Hall [Thu, 5 Dec 2013 14:13:35 +0000 (09:13 -0500)]
Bug 11342: fix error in OPAC self registration form if BorrowersTitles is empty

If BorrowersTitles is empty, it causes the library pulldown on the self
registration page to be empty, and to have the "Saluation" field have
the option "branches".

This patch also fixes a minor string capitalization issue.

Test Plan:
1) Enable OPAC self registration
2) Set the system preference BorrowersTitles to be empty
3) View the self registration page
4) Note the lack of branches in the home library pulldown
5) Apply this patch
6) Note the branches now display in the pulldown

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested in bootstrap and prog OPAC, with BorrowersTitle configured
and emptied.
Passes all tests and QA script.

Note: The titles pull down has 2 empty entries in master with
and without the patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11468: Remove given/when from Koha::Dateutils
Colin Campbell [Thu, 2 Jan 2014 14:42:16 +0000 (14:42 +0000)]
Bug 11468: Remove given/when from Koha::Dateutils

given and when give warnings due to their experimental
status as of perl 5.18. Replace the construct with
an if/elsif to avoid the keywords

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, especially t/DateUtils.t.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11474: (follow-up) correct typos in POD
Galen Charlton [Mon, 6 Jan 2014 05:46:32 +0000 (05:46 +0000)]
Bug 11474: (follow-up) correct typos in POD

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11474: Remove errors caused by use of given/when statement
Colin Campbell [Fri, 3 Jan 2014 10:47:23 +0000 (10:47 +0000)]
Bug 11474: Remove errors caused by use of given/when statement

This patch replaces a given/when statement by an if so we
do not get warnings on compilation when using Perl 5.18 or later.

Note the perldoc for the subroutine was not correct;
code was not testing that paramater equalled the values
but that it contained them. Have amended accordingly

Have documented behaviour in case parameter contains
neither value.

Subroutine does not appear to me used elsewhere in
codebase

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, especially t/DateUtils.t.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11316 - plugin icon missing tooltip in addbiblio.pl
Mark Tompsett [Wed, 27 Nov 2013 18:16:56 +0000 (13:16 -0500)]
Bug 11316 - plugin icon missing tooltip in addbiblio.pl

By adding:
    title=\"Tag editor\"
into the HTML generated in addbiblio, a tooltip displaying
'Tag editor' appears when the mouse is hovered over the
plugin icon.

Test Plan:
1) Log into Staff client
2) Click the 'Search the catalog' tab
3) Type something which will generate results
4) Click the title of a result
5) Click the 'Edit' button
6) Scroll down and click the 'Edit Record'
7) Look through the various tabs and notice that all the plugin
   icons have no tooltip.
8) Apply the patch
9) Refresh the page
10) All the plugin icons should have the tooltip text of
    'Tag editor'.

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Adds a title attribute. Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 7002: fix some invalid superlibrarian permission checks
Galen Charlton [Mon, 30 Dec 2013 16:05:51 +0000 (16:05 +0000)]
Bug 7002: fix some invalid superlibrarian permission checks

This patch fixes a problem where if a staff user has superlibrarian
permissions, but also has module-specific permissions, they are
prevent from editing item records that they should be allowed to.

To test:

[1] Turn on IndependentBranches.
[2] Register a superlibrarian staff user at branch A.
[3] Give that new account at least one other module-level
    permission.  This cannot be done through the user interface,
    however, but can be done via SQL:

    UPDATE borrowers SET flags = 3 WHERE userid = 'XXX';

[4] Log in as that new superlibrarian.
[5] Bring up the item details (catalogue/moredetail.pl) page for
    an item at branch B.  Note that there is no 'Edit Item' link.
[6] Similarly, try editing that item (cataloging/additem.pl).  Note
    that the edit form forbids you from touching the item.
[7] Finally, try editing that item using the Tools | Batch item
    modification utility.  Note that it doesn't allow you to do so.
[8] Apply the patch.
[9] Repeat steps 5 through 7.  This time, the item actions should
    be allowed.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes QA script and test suite.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11470: fix occassional spurious test failure in Circulation_transfers.t
Galen Charlton [Thu, 2 Jan 2014 18:02:17 +0000 (18:02 +0000)]
Bug 11470: fix occassional spurious test failure in Circulation_transfers.t

This patch makes Circulation_transfers.t no longer be sensitive to
the exact time it runs, avoiding spurious test failures due
to datesent being a second off between the creation of the test
transfer and the comparison.

To test:

[1] To simulate the failure, add a "sleep(2);" after the
    "#Test GetTransfers" comment and run
    prove -v t/db_dependent/Circulation_transfers.t
[2] Remove the sleep and apply the patch.
[3] Verify that prove -v t/db_dependent/Circulation_transfers.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11336: (follow-up) improve POD for _FixPriority()
Galen Charlton [Sat, 4 Jan 2014 23:25:25 +0000 (23:25 +0000)]
Bug 11336: (follow-up) improve POD for _FixPriority()

This patch improves the POD for C4::Reserves::_FixPriority()
to (hopefully) describe its function thoroughly.  It also
adjusts the call of _FixPriority() by CancelReserve() to
omit passing reserve_id, since by that point no row in
the reserves table for that request still exists.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11336: (follow-up) correct change to POD for GetReserve()
Galen Charlton [Sat, 4 Jan 2014 22:45:29 +0000 (22:45 +0000)]
Bug 11336: (follow-up) correct change to POD for GetReserve()

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11336: (follow-up) fixing capitalization in templates
Katrin Fischer [Sun, 29 Dec 2013 12:57:33 +0000 (13:57 +0100)]
Bug 11336: (follow-up) fixing capitalization in templates

Fixes capitalization on the holds and check in page.

Changes are easy to spot using:
git diff HEAD^ --color-words=.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
10 years agoBug 11336: update hold queue priorities correctly when deleting holds
Jonathan Druart [Fri, 13 Dec 2013 16:42:55 +0000 (17:42 +0100)]
Bug 11336: update hold queue priorities correctly when deleting holds

In various places, deleting a hold request did not trigger recalculating
the priority of the other holds on the bib:

To reproduce the bug:
- select or create 2 users U1 and U2
- select or create an holdable item
- place on hold for both U1 and U2. U1 has priority 1 and U2 has
  priority 2.
- delete the hold for U1
- go on circ/circulation.pl?borrowernumber=XXXX for U2 (or in the DB
  directly) and verify the priority has not been set to 1

The issue is repeatable (at least) on these 2 pages:
 * circ/circulation.pl?borrowernumber=XXXX (tab 'Holds', select "yes"
  in the dropdown list and submit the form)
 * reserve/request.pl?biblionumber=XXXX (click on the red cross)

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Reran my tests:

Preparations:
- Create holds for different patrons on a record:
  * 1st - title level hold
  * 2nd - item level hold
  * 3rd - title level hold
  * 4th - title level hold
- AllowOnShelfHolds = On/Allow (items were not checked out)

Tests:
Deleted holds from various pages, confirming bugs first,
then testing with applied patches. Reloading database
after each test.

1) Cancel holds from OPAC patron account
  /cgi-bin/koha/opac-user.pl#opac-user-holds
- Cancel 4th - ok, before and after applying the patch
- Cancel 2nd - ok, after applying the patch

2) Cancel hold from holds tab on staff detail page
  /cgi-bin/koha/reserve/request.pl?biblionumber=7

  a) Setting priority to 'del', submitting with 'Update holds'
  - Cancel first (1st) - ok, before and after
  - Cancel hold in the middle (was 3rd) - ok, before and after
  - Cancel last (was 4th) -ok, before and after

  b) Using red X
  - Repeating tests from a) - before the patch is applied holds
    get totally 'out of order' - after applying the patch, it works
    correctly

Additional tests done on this page:
- Change priority using up, down, to top, to bottom icons
- Change priority with 'toggle to lowest'

3) Cancel hold from the patron's account

  a) Check out tab - Delete? Yes, 'Cancel marked holds'
    /cgi-bin/koha/circ/circulation.pl?borrowernumber=X
  - Cancel first (1st) - ok, after applying the patch
  - Cancel hold in the middle (was 3rd) - ok, after applying the patch
  - Cancel last (was 4th) - ok, after applying the patch

  b) Details tab - Delete? yes, 'Cancel marked holds'
    /cgi-bin/koha/members/moremember.pl?borrowernumber=X
  - Cancel first (1st) - ok, after applying the patch
  - Cancel hold in the middle (was 3rd) - ok, after applying the patch
  - Cancel last (was 4th) - ok, after applying the patch

  Without the patch, holds priorities get out of order.

Additional tests done:
- Check in one item to trigger first hold
- Check in one item to trigger second hold
- Check out first item
Priorities are kept while the item is waiting, when it's
checked out, priorities of remaining holds get reset correctly.

Conclusion:
Big improvement, no regressions found.

Passes all tests in t, xt and QA script.
Also: t/db_dependent/Holds.t
      t/db_dependent/HoldsQueue.t
      t/db_dependent/Reserves.t

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