]> git.koha-community.org Git - koha.git/log
koha.git
8 years agoBug 15303 Followup: Fix apt-cache show breaking koha-create
Mirko Tietgen [Fri, 15 Apr 2016 16:03:55 +0000 (18:03 +0200)]
Bug 15303 Followup: Fix apt-cache show breaking koha-create

Temporarely set +e so the test for the LE package does not break
koha-create

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15303 Followup for koha-remove
Mirko Tietgen [Fri, 15 Apr 2016 11:35:16 +0000 (13:35 +0200)]
Bug 15303 Followup for koha-remove

This patch makes koha-remove take care of

/etc/letsencrypt/renewal/$opacdomain.conf
/var/lib/koha/$site/letsencrypt.enabled

It also adds a few helper functions.

To test
- create a koha instance with LE
- observe you got both files mentioned above
- remove that instance
- verify the files are gone

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15303 LE production server
Mirko Tietgen [Sat, 16 Jan 2016 23:15:30 +0000 (00:15 +0100)]
Bug 15303 LE production server

Deletes the --staging option of the letsencrypt command to get
real certificates. Rate limits apply.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15303 Letsencrypt option for Debian package installations
Mirko Tietgen [Fri, 4 Dec 2015 00:11:17 +0000 (01:11 +0100)]
Bug 15303 Letsencrypt option for Debian package installations

New option koha-create --letsencrypt

- installs the letsencrypt package if needed
- creates <instance>
- generates letsencrypt certificates for <instance>
- sets up a https-only website for <instance>
- redirects http to https for <instance>

! you need to enable jessie backports to install letsencrypt: add
deb http://http.debian.net/debian jessie-backports main contrib non-free
to your /etc/apt/sources.list

! this patch uses the letsencrypt staging server
to create real certificates, apply thy "LE production server" patch

Test plan:
- build a debian package with patch applied
- use apache mod_ssl
  sudo a2enmod ssl
- make sure the machine is accessible on 80 (needed for letsencrypt) and 443 from the internet
- install koha with your new package
- Put your (existing) domain options in /etc/koha/koha-sites.conf
- use koha-create with the new options:
  sudo koha-create --create-db --letsencrypt <instance>
- if you do not have the letsencrypt package installed, you will be prompted to do that
  [
    if there is no package available, a symlink to the git checkout will work:

    on your test server, get letsencrypt via git
    git clone https://github.com/letsencrypt/letsencrypt

    create a symlink from /usr/bin/letsencrypt to letsencrypt-auto
    sudo ln -s /path/to/letsencrypt/letsencrypt-auto /usr/bin/letsencrypt
  ]

- wait until setup is finished, check that you got a working OPAC and staff client with certificates
- check that http redirects to https

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15009 [QA Followup] - Update number of tests run
Kyle M Hall [Fri, 29 Apr 2016 13:01:07 +0000 (13:01 +0000)]
Bug 15009 [QA Followup] - Update number of tests run

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15009: QA follow-up
Jonathan Druart [Mon, 18 Apr 2016 09:37:18 +0000 (10:37 +0100)]
Bug 15009: QA follow-up

This patch adds a test to check the unicity of auth cats, simplify
the GetBudgetAuthCats subroutine and make it return an arrayref of scalar
instead of an arrayref of hashref with only 1 key.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15009: Correctly populate planning filter
Jonathan Druart [Mon, 18 Apr 2016 09:36:51 +0000 (10:36 +0100)]
Bug 15009: Correctly populate planning filter

The filter for planning values was populated with empty strings.
Note that it's not caused by previous patches.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15009 - Adds unit tests for C4::Budget::GetBudgetAuthCats
charles [Fri, 25 Mar 2016 21:09:24 +0000 (17:09 -0400)]
Bug 15009 - Adds unit tests for C4::Budget::GetBudgetAuthCats

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15009 - Planning dropdown button in aqbudget can have empty line
Blou [Tue, 13 Oct 2015 20:12:49 +0000 (16:12 -0400)]
Bug 15009 - Planning dropdown button in aqbudget can have empty line

When displaying a budget, the Planning button in the admin toolbar displays

Plan by months
Plan by libraries
Plan by item types
Plan by

The last one is empty, due to C4::Budgets::GetBudgetAuthCats returning an empty field if the budget has no sort defined.
This prevents returning an array with empty element(s)

TEST:
1) Admin -> Budgets
2) Select a budget
   a) you must have '' (empty) in your aqbudgets.sort1_authcat field.
   b) edit the budget (direct DB or interface) to get that.
3) Click on Planning dropdown, see the "Plan by <nothing> " entry.
4) apply the patch, revalidate.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No more empty option
No errors

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14377 [QA Followup] - Add supression message to NORMARC XSLT
Kyle M Hall [Fri, 29 Apr 2016 12:57:01 +0000 (12:57 +0000)]
Bug 14377 [QA Followup] - Add supression message to NORMARC XSLT

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14377: [QA Follow-up] Correct typo and comment
Marcel de Rooy [Thu, 28 Apr 2016 08:19:16 +0000 (10:19 +0200)]
Bug 14377: [QA Follow-up] Correct typo and comment

[1] Remove a vim inserted i from XSLT.pm: IdRefi => IdRef.
[2] The comment about UNIMARC is somewhat confusing. Rephrased it.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14377 [QA Followup] - Fix conditional
Kyle M Hall [Wed, 27 Apr 2016 17:36:29 +0000 (17:36 +0000)]
Bug 14377 [QA Followup] - Fix conditional

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14377 [QA Followup] - Remove biblionumber from messages
Kyle M Hall [Wed, 27 Apr 2016 17:28:54 +0000 (17:28 +0000)]
Bug 14377 [QA Followup] - Remove biblionumber from messages

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14377 - Don't replace 942$n with authorised value except when using UNIMARC
Kyle M Hall [Mon, 18 Apr 2016 17:28:36 +0000 (17:28 +0000)]
Bug 14377 - Don't replace 942$n with authorised value except when using UNIMARC

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug #14377 Show "BIBNO - Suppressed in OPAC" for records with 942$n=1.
Winona Salesky [Fri, 18 Sep 2015 14:57:33 +0000 (10:57 -0400)]
Bug #14377 Show "BIBNO - Suppressed in OPAC" for records with 942$n=1.

Includes class="suppressed_opac" for library specific styles.
Suggested css: .suppressed_opac { color:red; font-size:1.25em; font-weight:bold; float:right; margin-right:2em; clear:none; }

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14305: RSS message correction follow-up
Mark Tompsett [Tue, 5 Apr 2016 15:52:22 +0000 (11:52 -0400)]
Bug 14305: RSS message correction follow-up

If a user is not logged in but requests a specific branch,
the RSS feed message fails to mention the branch.

TEST PLAN
---------
1) Apply first patch
2) go to OPAC's opac-main.pl?branch={some branch with specific news}
   -- notice bad RSS message
3) Apply this patch
4) Repeat step 2
   -- notice branch is properly shown.
5) koha qa test tools

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14305: View arbitrary branch's news
Martin Persson [Wed, 5 Aug 2015 14:16:50 +0000 (16:16 +0200)]
Bug 14305: View arbitrary branch's news

This patch adds an input named 'branch' to opac-main.pl that
allows overriding the home library to view news from any branch.

This is part of the 'Use Koha as a CMS' development.

To reviewers: Does this create any security implications?
              The column is text; it is possbile to push SQL
              statemens into the DB via the opac-membership.pl
              page, but all the code there seems to use DBIx::Class
              and prepared statements. When attemped, accepting the
              changes were rejected because of the foreign key
              constraint placed on the main borrowers table.

It is recommended to use this patch in conjunction with 11584
which adds a WYSIWYG editor to System Preferences.

Test plan:
* Make sure your Koha installation has multiple branches:
  * Log in to the Staff interface and select 'Koha administration'
  * Select 'Libraries and groups', the first item in the list
  * Add an extra branch named 'BRANCH1':
    * Press the 'New library' button
    * Set 'Library code' to 'BRANCH1'
    * Enter an arbitrary name
    * Press 'Submit'

* Add at least two news items with different branches:
  * Log in to the Staff interface and select 'Tools'
  * Under 'Additional tools' select 'News'
  * On the 'Koha news' page, create a news item for all libraries:
    * Press the 'New entry' button
    * Set 'Library' to 'All libraries' and enter a title.
    * Press 'Submit'
  * On the 'Koha news' page, create a news item for one library:
    * Press the 'New entry' button
    * Set 'Library' to 'BRANCH1' and enter a title
    * Press 'Submit'

* Add links to OPAC to select branch:
  * Select 'System preferences' and then the 'OPAC' tab
  * Scroll down to the 'OpacNav' preference and click 'Click to Edit'
  * Create two hyperlinks with a parameter named 'branch':
    * '<a href="?branch=BRANCH1">BRANCH1</a>'
    * '<a href="?branch=">none</a>'
  * Click 'Save all OPAC preferences'

* Test OPAC:
  * By default, global news and news for home branch should show.
  * When clicking the 'BRANCH1' link, you should see global news
    plus news for the BRANCH1 branch.
  * When the parameter 'branch' is set but has no value,
    news from the home branch should be shown.

Issues: Tricky to create a link to the same page
        which removes existing paramters.

The user normally has a home branch set.
We can override it with the parameter.
If undefined, the home branch should be shown.

Sponsored-by: Halland County Library
http://bugs.koha-community.org/show_bug.cgi?id=14305

Changed 2015-12-14: Whitespace fix

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14305: View arbitrary branch's news, RSS fix
Martin Persson [Tue, 18 Aug 2015 21:03:54 +0000 (23:03 +0200)]
Bug 14305: View arbitrary branch's news, RSS fix

This fix changes the RSS link to reflect the URL paramter override.

This is less elegant than the existing solution which uses the
Branches TT module, perhaps there is a better way?

Sponsored-By: Halland County Library
Test plan:
* Follow instructions in the original patch but also check the
  URLs and contents of the RSS link at the bottom the OPAC page.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14144: Clean ups and refactors
Mark Tompsett [Mon, 4 Apr 2016 22:59:33 +0000 (18:59 -0400)]
Bug 14144: Clean ups and refactors

perltidy
old new calls to new call format
attrType -> attr_type (perlcritic friendlier)
double quotes to single quotes
'' combinations to q{} (perlcritic friendlier)
refactored parameters to mock_net_ldap_search into a HASH

This piece is not necessary, but I think it is nicer.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as expected. No koha-qa erros

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14144: Silence warnings t/db_dependent/Auth_with_ldap.t
Mark Tompsett [Mon, 4 Apr 2016 22:07:26 +0000 (18:07 -0400)]
Bug 14144: Silence warnings t/db_dependent/Auth_with_ldap.t

Revisiting this bug, I noticed that C4::Context->config() was mocked
poorly. I expanded the mock function a little and have quieted the
test which seemed to be working in a broken manner before.

TEST PLAN
---------
1) prove t/db_dependend/Auth_with_ldap.t
   -- shibboleth noise
2) apply this patch
3) prove t/db_dependend/Auth_with_ldap.t
   -- no noise
4) run koha qa test tools

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14050: Default framework for authorities should not be deletable
Marc Véron [Mon, 25 Apr 2016 13:02:36 +0000 (15:02 +0200)]
Bug 14050: Default framework for authorities should not be deletable

To test:
- Apply patch
- In staff client, go to Home > Administration > Authority types
- Verify that the Actions for the Default type do not contain the delete
  action
- Verify that other types have a delete action

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Delete action was eliminated

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 11371 - Add a new report : Orders by fund with more options
Bouzid Fergani [Thu, 5 Mar 2015 15:56:14 +0000 (10:56 -0500)]
Bug 11371 - Add a new report : Orders by fund with more options

 Add option show or no inactive budget and more options
 Use subroutine GetBudgetHierarchy for return all budgets
 Delete subroutine GetBudgetPeriodDescription and theire tests
 Use Price TT plugin
 Correct name of column and capitalization the first letter
 Add  checkbox for show inactive budgets, default the drop down list containt a active budget
 Not use [i] for inactive budgets, i add (inactive) at the end of inactive budget
 Add vendor note in the list of show attribute

 Test case:
    Go to Home > Reports > Orders by fund
    Select one or all budgets
    You can show the inactive budget, default the drop down list containt a active budget
    Choose output to screen ou csv file

Works as expected. QA tools OK with Bug 16104 applied.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
- changed 'Fund (budget):' back to 'Fund:', as the budget
  no longer shows in the pull down.
- Fixed number of tests in Budgets.t
- Removed &GetBudgetPeriodDescription

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9387 - Feedback message for FAILED check out items are not obvious for visually...
Owen Leonard [Wed, 6 Apr 2016 14:54:48 +0000 (10:54 -0400)]
Bug 9387 - Feedback message for FAILED check out items are not obvious for visually impaired

This patch adds a heading to the error dialg displayed when a barcode
has been submitted for checkout which doesn't exist. This patch also
modifies the markup of the error dialog in order to make error a little
more clear to sighted users.

To test, apply the patch and submit a barcode for checkout which does
not exist. The resulting error dialog should have a heading, "Barcode
not found."

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14497 [QA Followup] - Refactor code to have a single source for message
Kyle M Hall [Tue, 26 Apr 2016 14:29:40 +0000 (14:29 +0000)]
Bug 14497 [QA Followup] - Refactor code to have a single source for message

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14497 - Add warning to patron details page if patron's fines exceed noissuescharge
Kyle M Hall [Mon, 6 Jul 2015 13:43:34 +0000 (09:43 -0400)]
Bug 14497 - Add warning to patron details page if patron's fines exceed noissuescharge

Some librarians have requested that the same warning on the check out
page be placed on the patron details page if a patron's fines exceed the
system preference noissuescharge.

Test Plan:
1) Apply this patch
2) Find or create a patron who's fines exceed noissuescharge
3) Browse to that patron's details ( moremember.pl )
4) You should see a warning near the top of the page with links to the
   patron's account page and the pay fines page

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Patch ammended post sign-off

Signed-off-by: Sally Healey <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 11565 [QA Followup] - Only hide options when none are in use
Kyle M Hall [Wed, 27 Apr 2016 15:39:55 +0000 (15:39 +0000)]
Bug 11565 [QA Followup] - Only hide options when none are in use

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 11565 [QA Followup] - Hide checkout options when not in use
Owen Leonard [Tue, 22 Mar 2016 13:04:25 +0000 (09:04 -0400)]
Bug 11565 [QA Followup] - Hide checkout options when not in use

This follow-up reformats the checkout screen so that checkout settings
like specify due date, on-site checkout, and override high holds are
grouped in a panel which is hidden by default. Clicking a link shows all
the available settings.

Also modified in this patch: The default color for div.hint has been
made a little darker for readability.

To test, apply the patch and clear your browser cache if necessary.

- Check out to a patron who is not blocked from checking out.
- Click the "Checkout settings" link and confirm that the settings panel
  is displayed.
- Test that the settings in the panel behave as expected.
- Test with preferences on and off: decreaseLoanHighHolds,
  OnSiteCheckouts, SpecifyDueDate.

NOTE: This patch is a work in progress. It does not address the issue of
checkout setting being hidden even if they are active.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 11565: QA Follo-up: Improve translatability of 'not shortened' message
Katrin Fischer [Wed, 27 Apr 2016 12:49:36 +0000 (14:49 +0200)]
Bug 11565: QA Follo-up: Improve translatability of 'not shortened' message

Mark-up inside sentences splits them of up for translation, so it's better
to only highlight full sentences for easier translation.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 11565: (QA followup) add class to allow feature to be easily hidden
Jesse Weaver [Wed, 30 Sep 2015 15:48:14 +0000 (11:48 -0400)]
Bug 11565: (QA followup) add class to allow feature to be easily hidden

This wraps both checkboxes (in the confirmation dialog and checkout
interface) in a class of "circ-override-high-holds" so they can be
easily hidden.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 11565 - decreaseLoanHighHolds needs Override
Kyle M Hall [Wed, 30 Sep 2015 15:48:14 +0000 (11:48 -0400)]
Bug 11565 - decreaseLoanHighHolds needs Override

This patch allows the high holds loan length decrease to be overridden
either by a checkbox that remembers its setting during a series of
checkouts, or by a one time use override checkbox that will show
in the warning popup if a checkout is affected by high holds.

Test Plan:
1) Set up a checkout that will be affected by decreaseLoanHighHolds
2) Attempt to check out an item
3) Check the override checkbox
4) Note the checkout date is not reduced
5) Return the item
6) Start a new checkout for the patron
7) Check the "Don't decrease lean length based on holds" checkbox
8) Check out the item
9) Note you are not warned about the high holds decrease
   and that the checkout length is not reduced

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9004: Use Koha::Calendar instead of C4::Calendar
Jonathan Druart [Fri, 8 Apr 2016 14:51:22 +0000 (15:51 +0100)]
Bug 9004: Use Koha::Calendar instead of C4::Calendar

This patch tries to make the code more readable using Koha::Calendar
instead of deprecated C4::Calendar and Date::Calc

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9004 - Talking Tech doesn't account for holidays when calculating a holds last...
Kyle M Hall [Fri, 2 Nov 2012 12:30:46 +0000 (08:30 -0400)]
Bug 9004 - Talking Tech doesn't account for holidays when calculating a holds last pickup date - Add holidays check

Signed-off-by: Chris William <chrisw@pascolibraries.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9004 - Talking Tech doesn't account for holidays when calculating a holds last...
Kyle M Hall [Fri, 2 Nov 2012 12:23:37 +0000 (08:23 -0400)]
Bug 9004 - Talking Tech doesn't account for holidays when calculating a holds last pickup date - Perltidy script.

Signed-off-by: Chris William <chrisw@pascolibraries.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14577 - DBRev 3.23.00.056
Kyle M Hall [Fri, 29 Apr 2016 11:58:29 +0000 (11:58 +0000)]
Bug 14577 - DBRev 3.23.00.056

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9004: Use Koha::Calendar instead of C4::Calendar
Jonathan Druart [Fri, 8 Apr 2016 14:51:22 +0000 (15:51 +0100)]
Bug 9004: Use Koha::Calendar instead of C4::Calendar

This patch tries to make the code more readable using Koha::Calendar
instead of deprecated C4::Calendar and Date::Calc

8 years agoBug 9004: (QA followup) Fix pod
Nick Clemens [Fri, 8 Apr 2016 13:21:37 +0000 (13:21 +0000)]
Bug 9004: (QA followup) Fix pod

8 years agoBug 9004 - Talking Tech doesn't account for holidays when calculating a holds last...
Kyle M Hall [Fri, 2 Nov 2012 12:30:46 +0000 (08:30 -0400)]
Bug 9004 - Talking Tech doesn't account for holidays when calculating a holds last pickup date - Add holidays check

Signed-off-by: Chris William <chrisw@pascolibraries.org>
8 years agoBug 9004 - Talking Tech doesn't account for holidays when calculating a holds last...
Kyle M Hall [Fri, 2 Nov 2012 12:23:37 +0000 (08:23 -0400)]
Bug 9004 - Talking Tech doesn't account for holidays when calculating a holds last pickup date - Perltidy script.

Signed-off-by: Chris William <chrisw@pascolibraries.org>
8 years agoBug 16283: [QA Follow-up] Remove case sensitive message
Marcel de Rooy [Fri, 22 Apr 2016 08:04:49 +0000 (10:04 +0200)]
Bug 16283: [QA Follow-up] Remove case sensitive message

The message on opac-memberentry does no longer apply.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16283 - Make OPAC registration captcha case insensitive
Kyle M Hall [Tue, 18 Dec 2012 15:55:25 +0000 (10:55 -0500)]
Bug 16283 - Make OPAC registration captcha case insensitive

The OPAC registration captcha should not be case sensitive. This patch
was moved here from bug 9393.

Test Plan:
1) Enable patron self registration
2) Test the captcha by typing in the captcha in lower case. Registration
should still succeed.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14577 [QA Followup]
Kyle M Hall [Wed, 16 Mar 2016 18:00:20 +0000 (18:00 +0000)]
Bug 14577 [QA Followup]

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 14577 - Allow restriction of checkouts based on fines of guarantor's guarantees
Kyle M Hall [Thu, 11 Feb 2016 01:23:09 +0000 (01:23 +0000)]
Bug 14577 - Allow restriction of checkouts based on fines of guarantor's guarantees

This enhancment allows a library to prevent patrons from checking out
items if his or her guarantees own too much.

Test Plan:
1) Apply this patch
2) Find or create a patron with a guarantor
3) Add a fine to the patron's account
4) Set the new system preference NoIssuesChargeGuarantees to be less
   than the amount owed by the patron
4) Attempt to check out an item to the guarantor, you will either
   be warned or prevented from checking out based on your system
   settings.

Signed-off-by: Cathi Wiggin <CWIGGINS@arcadiaca.gov>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9393 [QA Followup] - Don't display link if librarian cannot view the modification
Kyle M Hall [Tue, 19 Apr 2016 11:55:28 +0000 (11:55 +0000)]
Bug 9393 [QA Followup] - Don't display link if librarian cannot view the modification

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 9393 - Add note to circulation.pl if borrower has pending modifications
Kyle M Hall [Tue, 18 Dec 2012 19:18:16 +0000 (14:18 -0500)]
Bug 9393 - Add note to circulation.pl if borrower has pending modifications

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
New link "patron modifications" (if there are) on the checkout page.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 11203 - Datatables in acqusitions do not ignore "stopwords" in titles
Kyle M Hall [Tue, 5 Nov 2013 16:31:20 +0000 (11:31 -0500)]
Bug 11203 - Datatables in acqusitions do not ignore "stopwords" in titles

Sorting by the "summary" column does not produce the preferred results.
Title beginning with 'a', 'an', or 'the' are sorted using those
articles.

Test plan:
1) Place an order for 2 items with the titles "Alpha" and "The Alpha",
   along with some other records with titles starting with something
   between 'a' and 't', and 't' and 'z'
2) Sort the "pending orders" table, note the incorrect sorting
3) Receive all the items
4) Sort the "already received" table, note the incorrect sorting
5) Apply the patch
6) Repeat steps 1-4, note the corrected sorting
7) Check acqui/basket.pl for correct sorting
8) Check acqui/invoice.pl for correct sorting

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>
8 years agoBug 12333: Acquisitions toolbar and removing Add to basket section at bottom
Aleisha [Tue, 26 Apr 2016 02:52:59 +0000 (02:52 +0000)]
Bug 12333: Acquisitions toolbar and removing Add to basket section at bottom

To test:
1) Go to Acqui -> do a vendor search -> view a basket
2) Confirm that the Add Order to basket section at the bottom is gone.
   Confirm the add to basket button in the toolbar still works as
   expected
3) Confirm that when you make your browser shorter, the toolbar follows
   the page down as you scroll

Sponsored-by: Catalyst IT
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>
8 years agoBug 11088 [QA Followup] - Add action icon for consistency
Kyle M Hall [Fri, 29 Apr 2016 11:45:28 +0000 (11:45 +0000)]
Bug 11088 [QA Followup] - Add action icon for consistency

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 11088: (QA followup) don't let language chooser obscure toolbar
Jesse Weaver [Thu, 28 Apr 2016 13:29:06 +0000 (13:29 +0000)]
Bug 11088: (QA followup) don't let language chooser obscure toolbar

This uses a similar JS trick to the cataloging interface to change the
location of the toolbar if the language picker is shown.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 11088 [Follow up] - Patron entry page should use floating toolbar like cataloging...
Arslan Farooq [Thu, 28 Apr 2016 13:29:06 +0000 (13:29 +0000)]
Bug 11088 [Follow up] - Patron entry page should use floating toolbar like cataloging interface

To test:
1) Go to add a new patron
2) Confirm floating 'Save' button stays fixed at bottom right corner of
   the page as you scroll the page up/down
3) Resize the browser window to s smaller size, and see the 'Save'
   button stays fixed in place
3) Go to edit an existing patron
4) Repeat Step 2 and 3

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>
8 years agoBug 11088: Floating Save div for Patron entry page
Aleisha [Thu, 28 Apr 2016 08:05:03 +0000 (08:05 +0000)]
Bug 11088: Floating Save div for Patron entry page

To test:
1) Go to add a new patron
2) Confirm floating save div scrolls down page with you and works as
   expected
3) Go to edit an existing patron
4) Repeat Step 2

Sponsored-by: Catalyst IT
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>
8 years agoBug 16263: making authority tags and subfields actions buttons
Aleisha [Thu, 14 Apr 2016 22:02:47 +0000 (22:02 +0000)]
Bug 16263: making authority tags and subfields actions buttons

EDIT: Subfields icon, 'i' to eye

To test:
1) Go to Admin -> Authority types
2) Click the dropdown for one of the frameworks and click MARC structure
3) Confirm the actions subfields, edit and delete all show in the dropdown and work as expected
4) Click subfields
5) Confirm the action delete on this page shows as a font awesome button and works as expected

Sponsored-by: Catalyst IT
Signed-off-by: Arslan Farooq <arslanone@gmail.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Another sign, pretty eye.
No errors.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 10171 [Follow-up] Add a header in Advanced Search (staff interface)
Owen Leonard [Thu, 28 Apr 2016 01:44:57 +0000 (21:44 -0400)]
Bug 10171 [Follow-up] Add a header in Advanced Search (staff interface)

This patch re-indents the new include file because it's not often you
get to help a new file come into the world, it should be indented
nicely.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 10171: Add a search box include on advanced search and item search pages
Aleisha [Wed, 27 Apr 2016 03:34:07 +0000 (03:34 +0000)]
Bug 10171: Add a search box include on advanced search and item search pages

This patch creates a new file: adv-search.inc. This search include has
no catalog search (as it makes no sense to have the catalog search tab
on the advanced search page).
The item search page uses home-search.inc (with catalog search) as the
catalog search is different to the item search.

To test:
1) Go to Search (advanced search)
2) Confirm search header is there with no catalog search tab and works
   as expected
3) Go to item search
4) Confirm search header is there with catalog search tab and works as
   expected

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Tested together with follow up patch, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15414: Silencing warns triggered by creating a new layout in patron card creator
Aleisha [Mon, 25 Apr 2016 23:08:49 +0000 (23:08 +0000)]
Bug 15414: Silencing warns triggered by creating a new layout in patron card creator

This patch assigns $field and $image values in the for loops

To test:
1) Go to Tools -> Patron Card Creator -> New layout
2) Notice warns
3) Apply patch and refresh page
4) Notice warns are gone and page still works as expected

Sponsored-by: Catalyst IT
NOTE: Trivial initialization in a loop issue.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16236: Whitespace followup
Mark Tompsett [Mon, 11 Apr 2016 03:22:11 +0000 (23:22 -0400)]
Bug 16236: Whitespace followup

tab to 4 spaces on line 255, as per koha qa test tool failure
without this patch.

TEST PLAN
---------
1) Apply first patch
2) Run koha qa test tools
   -- fails because of a tab
3) Apply this patch
4) Run koha qa test tools
   -- passes

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16236: Making authorised values actions buttons
Aleisha [Mon, 11 Apr 2016 02:18:13 +0000 (02:18 +0000)]
Bug 16236: Making authorised values actions buttons

To test:
1) Go to Admin -> Authorised values
2) Select a category
3) Confirm that Edit and Delete shows as buttons under 'Actions' column and work as expected

Sponsored-by: Catalyst IT
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16235: Making borrower account actions buttons
Aleisha [Mon, 11 Apr 2016 02:10:54 +0000 (02:10 +0000)]
Bug 16235: Making borrower account actions buttons

EDIT: Fixing some indenting and adding actions class to the cells so the buttons don't wrap
EDIT: Comment 6
EDIT: Moving the buttons into one column
EDIT: Fixing typo and js error
EDIT: removing tabs

To test:
1) Go to a borrower's account page who has paid fines before
a) Confirm column heading is now 'Actions' and covers both Reverse column and Print column
b) Confirm Reverse and Print show as buttons and work as expected
2) Go to a borrower's account page who has never paid fines (or create a new borrower)
a) Create a manual credit (just to put something in their account)
b) Go back to their account page
c) Confirm the Reverse column does not show as the column heading for Print is &nbsp; (since there is only one action in this column and it's written on every button)
d) Confirm Print shows as a button and works as expected

Sponsored-by: Catalyst IT
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Followed test plan. White spaces OK.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16234: Removing 'view link' text
Aleisha [Mon, 11 Apr 2016 01:45:55 +0000 (01:45 +0000)]
Bug 16234: Removing 'view link' text

To test:
1) Go to the Fines account of a borrower (i.e. members/boraccount.pl)
2) Notice 'View link' text is unnecessary and clutters description column
3) Apply patch and refresh page
4) Confirm 'view link' text is gone and the record title is now a link and works as expected

Sponsored-by: Catalyst IT
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16182: Make phone number clickable to call
Aleisha [Thu, 31 Mar 2016 21:24:21 +0000 (21:24 +0000)]
Bug 16182: Make phone number clickable to call

EDIT: fixing typo, changing sms number from tel: to sms:

To test:

1) Go to a patron detail page
2) Confirm that all available phone numbers can be clicked and allow you to call this number from your device
a) in the top left circ-menu.inc
b) primary/secondary/other/organisation/mobile phone numbers
c) alternate address phone number
d) alternate contact phone number
e) enable the EnhancedMessagingPreferences system preference. check the SMS number under Patron messaging preferences (back on the detail page) is clickable
3) Check to see if there are any phone numbers I have missed.

Sponsored-by: Catalyst IT
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16281: [Follow-up] Remove the use of "onclick" from Reports module
Owen Leonard [Fri, 22 Apr 2016 13:31:10 +0000 (09:31 -0400)]
Bug 16281: [Follow-up] Remove the use of "onclick" from Reports module

This minor follow-up adds a dummy href attribute to the "Return to the
previous page" link so that the link behaves like a link. A
"preventDefault()" is added to the goback() function to keep the "#"
link from triggering a page jump.

To test, apply the patch, create a report with an SQL error and run
it. Confirm that the 'Return to previous page' link works as expected.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16281: Remove the use of 'onclick' from Reports module
Aleisha [Sun, 17 Apr 2016 23:45:26 +0000 (23:45 +0000)]
Bug 16281: Remove the use of 'onclick' from Reports module

EDIT: Removing unnecessary functions

To test:

1) Go to Reports -> Dictionary
a) Attempt to delete a definition. Confirm the Ok and cancel
           buttons in confirm dialog work as expected
2) Go to Reports -> Build new
a) On each step of building a report, confirm the back button
           works as expected
b) Confirm add column and delete column on step 3 works as
           expected
3) Confirm deleting a report from the toolbar triggers confirm dialog
   and it works as expected
4) Create a report with an SQL error and run it. Confirm that the
   'Return to previous page' link works as expected

Sponsored-by: Catalyst IT
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>
8 years agoBug 16268: Add confirm message for deleting circ and fines rules
Aleisha [Sun, 17 Apr 2016 22:35:19 +0000 (22:35 +0000)]
Bug 16268: Add confirm message for deleting circ and fines rules

EDIT: Removes unnecessary code and uses confirm message in staff-global.js

To test:
1) Apply 16267
2) Go to Admin -> Circ and fines rules
3) Try clicking on Delete and Unset buttons
4) Confirm a confirm message pops up and works as expected

Sponsored-by: Catalyst IT
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16267: Making circ and fines rules actions buttons
Aleisha [Thu, 14 Apr 2016 22:38:52 +0000 (22:38 +0000)]
Bug 16267: Making circ and fines rules actions buttons

EDIT: Comment 3

To test:
1) Go to Admin -> Circulation and fines rules
2) Fines rules
a) Confirm that buttons Edit, Delete, Save, and Clear all show as font awesome buttons and work as expected
2) Default checkout, hold and return policy
a) Confirm that column heading is now Actions
b) Confirm that actions Save and Unset show as font awesome buttons and work as expected
3) Checkout limit by patron category AND holds policy by item type
a) Confirm that buttons Add and Delete show as font awesome buttons and work as expected (you may need to add a rule to see the Delete button)
4) Confirm that none of the buttons wrap on a narrower browser

Sponsored-by: Catalyst IT
Signed-off-by: Arslan Farooq <arslanone@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16363: Add floating toolbar to advanced search
Aleisha [Wed, 27 Apr 2016 04:08:40 +0000 (04:08 +0000)]
Bug 16363: Add floating toolbar to advanced search

EDIT: Ah yes I was so sure it wasn't mini but couldn't remember what to
use! Thanks for that Owen

To test:
1) Go to advanced search
2) Confirm Save, More Options and Clear fields (notice change from New
search to Clear fields) are in toolbar and work as expected

Sponsored-by: Catalyst IT
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>
8 years agoBug 16360: Adding 'actions' class to column in tag review so buttons don't wrap
Aleisha [Wed, 27 Apr 2016 01:34:49 +0000 (01:34 +0000)]
Bug 16360: Adding 'actions' class to column in tag review so buttons don't wrap

EDIT: Comment 3

Note: the wrapping only happens when all tags have been approved (or all
rejected), i.e. column has a certain width. When testing, ensure all
tags have been approved or rejected and click the opposite
action to see the effect of the bug and the patch.

To test:
1) Go to Tools -> Tags
2) Click Reject for a tag
3) Notice buttons do not wrap

Sponsored-by: Catalyst IT
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>
8 years agoBug 16359: Changing size of text input fields so filter box doesn't cover parts of...
Aleisha [Wed, 27 Apr 2016 01:01:18 +0000 (01:01 +0000)]
Bug 16359: Changing size of text input fields so filter box doesn't cover parts of page

To test:
1) Go to Reports -> Saved reports
2) Notice how Filter covers parts of page
3) Apply patch and refresh page
4) Notice how Filter does not cover anything anymore

Sponsored-by: Catalyst IT
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
I couldn't see the problem in Firefox, but it is a problem in Chrome.
The fix works fine for both.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16351: Making invoice number a required field
Aleisha [Tue, 26 Apr 2016 01:27:19 +0000 (01:27 +0000)]
Bug 16351: Making invoice number a required field

EDIT: Added 'validated' class to form and removed 'Required' span (became unnecessary)

To test:
1) Go to Acqui -> Do a vendor search
2) Receive a shipment
3) Attempt to click 'Next' without specifying invoice number. Notice error.
4) Go back to vendor search then apply patch. Click Receive shipment
5) Notice you cannot click 'Next' until you put something in invoice number.

Sponsored-by: Catalyst IT
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16265: Making item types actions buttons
Aleisha [Thu, 14 Apr 2016 22:22:29 +0000 (22:22 +0000)]
Bug 16265: Making item types actions buttons

To test:
1) Go to Admin -> Item types
2) Confirm Edit and Delete show as font awesome buttons and work as expected
3) Confirm the buttons do not wrap with a narrower browser

Sponsored-by: Catalyst IT
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16221: follow-up for changes made by bug 16229
Jonathan Druart [Fri, 8 Apr 2016 12:37:46 +0000 (13:37 +0100)]
Bug 16221: follow-up for changes made by bug 16229

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 16221: Use Storable::dclone() instead of Clone::clone() for L1 cache deep-copying...
Jacek Ablewicz [Thu, 7 Apr 2016 08:26:31 +0000 (10:26 +0200)]
Bug 16221: Use Storable::dclone() instead of Clone::clone() for L1 cache deep-copying mode

Storable dclone() is over 3x faster then Clone::clone() when used for
creating a deep copies of the big, complex data structures like MARC
frameworks. See also Bug 16044 comments #18 & #20.

This is a trivial version of Bug 16166. Performance test
results (see Bug 16140 comment #23 for test setup description):

   master
   146.29 (14.64+14.53+14.51+14.57+14.72+14.56+14.53+15.06+14.56+14.61)

   master + Bug 16221
   96.5 (9.77+9.63+9.77+9.77+9.68+9.05+9.68+9.83+9.63+9.69)

   master + Bug 16166
   90.7 (9.15+9.10+9.16+8.41+9.19+9.19+9.11+9.19+9.02+9.18)

Bug 16166 is a bit faster and more comprehensive implementation, but
also more complex and harder to test/evaluate.

Test plan:

1) apply patch
2) profile GetMarcStructure() calls before / after patch, e.g. by
running some script which calls it often (like catalogue search
w/ XSLT processing turned on, etc.)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15534 [QA Followup] - Fix rule labels
Kyle M Hall [Wed, 27 Apr 2016 14:07:51 +0000 (14:07 +0000)]
Bug 15534 [QA Followup] - Fix rule labels

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15534 [QA Followup] - Use IsItemOnHoldAndFound instead of GetReserveStatus
Kyle M Hall [Wed, 27 Apr 2016 13:31:13 +0000 (13:31 +0000)]
Bug 15534 [QA Followup] - Use IsItemOnHoldAndFound instead of GetReserveStatus

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15534 [QA Followup] - Remove superfluous lines from unit tests
Kyle M Hall [Mon, 18 Apr 2016 13:21:12 +0000 (13:21 +0000)]
Bug 15534 [QA Followup] - Remove superfluous lines from unit tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15534 - Add the ability to prevent a patron from placing a hold on a record with...
Kyle M Hall [Sat, 6 Feb 2016 03:59:31 +0000 (03:59 +0000)]
Bug 15534 - Add the ability to prevent a patron from placing a hold on a record with available items

Some libraries would like to prevent patrons from placing holds on
items where there are other items available for the patron to
check out.

Test Plan:
1) Apply this patch
2) Browse to the circulation rules
3) Note the new option for "On shelf holds allowed"
4) Set the rule to "If all unavailable", set "item level holds" to allow
5) Find a patron/branch/itemtype applicable to this rule
6) Ensure at least one item on the record is available for the
   patron to check out
7) Attempt to place a hold for the item
8) Note you cannot place the hold
9) Check the available item out to another patron
10) Note you can now place a hold for the first patron

Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se>
Works as intended!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15533 - DBRev - Update Schema Files to match current DB structure
Kyle M Hall [Fri, 29 Apr 2016 10:32:38 +0000 (10:32 +0000)]
Bug 15533 - DBRev - Update Schema Files to match current DB structure

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15533 - DBRev 3.23.00.055
Kyle M Hall [Fri, 29 Apr 2016 10:30:10 +0000 (10:30 +0000)]
Bug 15533 - DBRev 3.23.00.055

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15533 [QA Followup] - All itemtypes for all items showing in OPAC multi-hold
Kyle M Hall [Thu, 28 Apr 2016 18:54:59 +0000 (18:54 +0000)]
Bug 15533 [QA Followup] - All itemtypes for all items showing in OPAC multi-hold

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15533: QA follow-up - Formatting and improving translatability
Katrin Fischer [Thu, 28 Apr 2016 18:46:40 +0000 (20:46 +0200)]
Bug 15533: QA follow-up - Formatting and improving translatability

- Makes new message in the holds tables in the patron account
  translatable
- Unbolds the note in the holds table for the record

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15533 [QA Followup] - Itemtype limit missing from tables
Kyle M Hall [Thu, 28 Apr 2016 18:20:28 +0000 (18:20 +0000)]
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>
8 years agoBug 15533 [QA Followup] - Move tags for translatability
Kyle M Hall [Thu, 28 Apr 2016 15:33:48 +0000 (15:33 +0000)]
Bug 15533 [QA Followup] - Move tags for translatability

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15533 [QA Followup] - Add a system preference
Kyle M Hall [Thu, 28 Apr 2016 15:32:09 +0000 (15:32 +0000)]
Bug 15533 [QA Followup] - Add a system preference

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15533: Fix 'ambiguous' SQL query in CanItemBeReserved
Julian Maurice [Tue, 12 Apr 2016 13:18:20 +0000 (15:18 +0200)]
Bug 15533: Fix 'ambiguous' SQL query in CanItemBeReserved

Adding reserves.itemtype made a query to fail in CanItemBeReserved.
This patch prefixes the column names with the corresponding table names
to prevent that.

You can trigger the error by running
  prove t/db_dependent/Holds.t

You should see something like this:
  Column 'itemtype' in where clause is ambiguous

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15533 - Allow patrons and librarians to select itemtype when placing hold
Kyle M Hall [Fri, 25 Dec 2015 12:05:57 +0000 (12:05 +0000)]
Bug 15533 - Allow patrons and librarians to select itemtype when placing hold

Some libraries would like the ability to select the itemtype to request
when placing holds. For example, if a record has 3 copies of BookA and 3
copies of BookA in large print, this feature would allow a person to
place a hold on the record, but still be able to target only the Large
Print edition so that the first Large Print copy that becomes available
is targeted, rather than forcing the patron to select a particular copy
to hold.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Create a record with items of two or more itemtypes
4) Place a record level hold on the record while choosing one particular
   itemtype
5) Check in an item from the record that is not of that itemtype
6) Notee it is not trapped for the hold
7) Check in an item from the record that does match the selected itemtype
8) Note the item is trapped for the hold

Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 15532 - DBRev 3.23.00.054
Kyle M Hall [Fri, 29 Apr 2016 10:23:47 +0000 (10:23 +0000)]
Bug 15532 - DBRev 3.23.00.054

8 years agoBug 15532 [QA Followup] - Remove unused variable
Kyle M Hall [Wed, 27 Apr 2016 17:18:49 +0000 (17:18 +0000)]
Bug 15532 [QA Followup] - Remove unused variable

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
8 years agoBug 15532 [QA Followup] - Remove unecessary lines from unit test
Kyle M Hall [Mon, 18 Apr 2016 16:46:57 +0000 (16:46 +0000)]
Bug 15532 [QA Followup] - Remove unecessary lines from unit test

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
8 years agoBug 15532: Add ability to allow only items whose home/holding branch matches the...
Kyle M Hall [Sat, 19 Dec 2015 11:34:03 +0000 (11:34 +0000)]
Bug 15532: Add ability to allow only items whose home/holding branch matches the hold's pickup branch to fill a given hold

Some libraries would like to be able to limit hold filling to items that
match the pickup library for a hold based on the item's home or holding
library. The patron's home library should not affect whether a patron
can place the hold, instead the hold will only be fillable when an item
matching the pickup location becomes available.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Note the new "Hold pickup library match" rules for "checkout, hold,
   and return policy" and for "holds policy by item type"
4) Set the policy to "item's holding library"
5) Place a hold where the item's holding branch does not match
   the pickup branch
6) Check in the item
7) Note it is not trapped for the hold
8) Update the item's holding branch to match the pickup branch
8) Check in the item
9) Note the item is trapped for the hold
10) Repeat steps 4-9 but for home branch instead

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
8 years agoBug 16105: Do not initialize the memory cache if not needed
Jonathan Druart [Fri, 18 Mar 2016 13:39:27 +0000 (13:39 +0000)]
Bug 16105: Do not initialize the memory cache if not needed

Cache::Memory is loaded and Koha::Cache::_initialize_memory is called
even if a memcached cache has been correctly initialize, it does not
make sense.
It should only be initialize if needed.

Test plan:
Correctly configure a memcache server and confirm that the memory cache
is not initialize.
Do not configure correctly a memcache server and confirm that the cache
system default on Cache::Memory

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 12721: (followup) Replace mysqlism by DBIx::Class
Marc Véron [Wed, 27 Apr 2016 10:38:58 +0000 (12:38 +0200)]
Bug 12721: (followup) Replace mysqlism by DBIx::Class

This patch removes the mysqlism (see comment #18)

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Fixed QA tools complaints about missing lines before
and after =cut in POD.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 12721 - Prevent software error if incorrect fieldnames given in sypref Statistics...
Marc Véron [Sun, 18 Oct 2015 14:28:52 +0000 (16:28 +0200)]
Bug 12721 - Prevent software error if incorrect fieldnames given in sypref StatisticsFields

To reproduce issue:
See comment #1

To test:
- Apply patch
- Leave syspref StatisticsFields empty
- Display statistics for an author

  => Result: Table displays Shelving location, Collection code, Item type
           (as before)

- Change syspref to any combination of location|itype|ccode
  => Result: Table displays columns as appropriate

- Change syspref to some garbage
  => Result: Same as with empty syspref (was crashing without patch)

- Change syspref to valid combination with trailing |
  => Result: Table displays columns as appropriate (was crashing
     without patch)

- Change syspref to a combination of valid and invalid fields
  (location|blah|ccode)
  => Result: Table displays column of valid fields only (was crashing
     without patch)

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 12721 - Syspref StatisticsFields: Warning on About page and text change in System...
Marc Véron [Sun, 18 Oct 2015 16:27:58 +0000 (18:27 +0200)]
Bug 12721 - Syspref StatisticsFields: Warning on About page and text change in System preferences

This patch adds a warning to the about page if the syspref 'StatisticsFields' is misconfigured.
Additionally, the text on Home > Administration > SystemPreferences for 'Statistics Fields'
is changed.

To test:
- Apply patch
- Edit syspref 'StatisticsFields'. Verify that the explanation makes sense.
- Leave field empty
  => verify that no message appears on About page, tab System information
- Insert valid field names, e.g. location|itype
  => verify that no message appears on the About page
- Add trailing char
  => verify that the warning message appears on the About page
- Fill in some garbage or misspell a field name
  => verify that the warning message appears on the About page

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 13877 - Fix QA issues
Alex Arnaud [Fri, 22 Apr 2016 09:03:50 +0000 (11:03 +0200)]
Bug 13877 - Fix QA issues

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 13877 - Make serialseq season name translatable regardless its position in a...
Alex Arnaud [Tue, 15 Mar 2016 15:36:28 +0000 (16:36 +0100)]
Bug 13877 - Make serialseq season name translatable regardless its position in a string

Signed-off-by: Chris Cormack <chrisc@catalyst.net.z>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoDBRev Bug 16217 - Notice' names may have diverged
Brendan Gallagher [Fri, 29 Apr 2016 02:26:46 +0000 (02:26 +0000)]
DBRev Bug 16217 - Notice' names may have diverged

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 16217: Resync names of notices
Jonathan Druart [Wed, 6 Apr 2016 15:35:23 +0000 (16:35 +0100)]
Bug 16217: Resync names of notices

Bug 12752 has fixed a bug for installations upgrading from 3.14, but has
not fixed the problem for new installations.
Because of some wrong data manipulations, the names for a given letter
code may diverge.

In particular OVERDUE and PREDUE names of phone notices have been
wrongly modify by bug 11867: they have been set to the name of the first HOLD
notice.

Trying to be back on our feet, this update DB entry will try to guess
and set back up the correct name.

To know if your install is affected by this bug, the following SQL query
can help you:
  SELECT code, name, message_transport_type
  FROM letter
  WHERE code="PREDUE" OR code="OVERDUE";

If the names are different for the same code, something went wrong.
Executing this update DB entry should fix the divergence.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Fix the problem, see comment #6 for test.
No koha-qa errors

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 16377: Fix t/db_dependent/Members/Attributes.t
Marcel de Rooy [Thu, 28 Apr 2016 06:50:47 +0000 (08:50 +0200)]
Bug 16377: Fix t/db_dependent/Members/Attributes.t

This is a follow-up for bug 12267 fixing the test, still referring to
password fields.

Test plan:
Run the test.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Test now pass
No errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 12752: FIX letter names in 3.15.00.041
Jonathan Druart [Wed, 6 Apr 2016 14:59:02 +0000 (15:59 +0100)]
Bug 12752: FIX letter names in 3.15.00.041

3.15.00.041 was wrong, the name of the letter should not always been the
name of the first HOLD notice.
PREDUE_PHONE should be updated with the first name of the PREDUE notice,
same for OVERDUE_PHONE and OVERDUE

Signed-off-by: Chris Cormack <chrisc@catalyst.net.z>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 16373: merge.pl reports success but files are not merged
Jacek Ablewicz [Thu, 28 Apr 2016 07:35:51 +0000 (09:35 +0200)]
Bug 16373: merge.pl reports success but files are not merged

To recreate:

1) Select two biblios to merge
2) Merge them
3) Sucess reported but list of bibs contains only the reference record.
4) View the 'new' record, it won't have any additional items
5) View the 'merged' record, it is still there with its items

This happens because record IDs (biblionumbers) are not correctly
set up in the template on the 2nd merge stage, since Bug 15358.

To test:

1) apply patch
2) try to recreate this issue once again, confirm that a problem
is resolved

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 16378: Overdues.pm: Can't call method "store" without a package or object reference
Marc Véron [Thu, 28 Apr 2016 09:47:57 +0000 (11:47 +0200)]
Bug 16378: Overdues.pm: Can't call method "store" without a package or object reference

Overdues.pm line 588 tries to do an $accountline->set with column outstanding
instead of amountoutstanding.
This patch fixes it.

To test:
- Verify that code change is correct.
- Try to trigger a situation where an existing fine is updated
  (see comment in line 574 in C4/Overdues.pm)

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
8 years agoBug 14686 - DBRev fix - add missing call to SetVersion
Kyle M Hall [Wed, 27 Apr 2016 17:00:22 +0000 (17:00 +0000)]
Bug 14686 - DBRev fix - add missing call to SetVersion

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