koha.git
7 years agoBug 15801: Koha::BiblioFrameworks - Remove C4::Koha::GetFrameworksLoop
Jonathan Druart [Wed, 10 Feb 2016 16:06:14 +0000 (16:06 +0000)]
Bug 15801: Koha::BiblioFrameworks - Remove C4::Koha::GetFrameworksLoop

The C4::Koha::GetFrameworksLoop retrieves biblio frameworks and returns
them ordered by the description (frameworktext). If a parameter is
passed, a selected flag is set. The selection of the options should be
done on the template side.
These 2 calls can be replaced with
  Koha::BiblioFrameworks->search({}, { order_by => ['frameworktext'] });

Test plan:
1/ Go on a Labeled MARC biblio view (catalogue/labeledMARCdetail.pl)
You should see a dropdown list with the biblio frameworks. The framework
of the record should be selected by default
2/ Create a sql report using the biblio_framework parameter, something
like:
  SELECT COUNT(*) FROM biblio WHERE frameworkcode=<<framework|biblio_framework>>
Save and execute the report.
You should get a dropdown list with the framework list.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Both dropdowns Ok
No errors

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14629 - DBRev 16.06.00.041
Kyle M Hall [Fri, 28 Oct 2016 11:59:55 +0000 (11:59 +0000)]
Bug 14629 - DBRev 16.06.00.041

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14629: [QA Follow-up] Small tidy up
Marcel de Rooy [Fri, 28 Oct 2016 10:30:23 +0000 (12:30 +0200)]
Bug 14629: [QA Follow-up] Small tidy up

Some cosmetic changes as to whitespace and one call less to Normalize.

Test plan:
Run t/Koha.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14629 - (QA Followup) sysprefs.sql changes
Nick Clemens [Wed, 10 Aug 2016 18:53:48 +0000 (18:53 +0000)]
Bug 14629 - (QA Followup) sysprefs.sql changes

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14629 - [QA Followup] Pass invalid ISSN through GetVariationsOfISSN
Nick Clemens [Thu, 31 Dec 2015 16:00:10 +0000 (16:00 +0000)]
Bug 14629 - [QA Followup] Pass invalid ISSN through GetVariationsOfISSN

This is an optional follow up depending on community opinion.

While copying over the code form the ISBN portion I noticed that with
aggressive matching enabled invalid ISBNs (and hence ISSNs) were being
stripped from the record.

I think in the case of a library exporting records, making changes, and
reimporting they would expect to get a match on ISSN or ISBN whether or
not the number is valid.

This patch changes the subroutine to return the original ISSN in the
case of it being invalid.

To test:
With first patch only export a record with an invalid ISSN and reimport
with AggressiveMatchOnISSN enabled and match on ISSN - you should not get a match
Apply this patch
reimport the file and you should find a match.

Signed-off-by: Chad Roseburg <croseburg@ncrl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14629 - Add aggressive ISSN matching feature equivalent to the aggressive ISBN...
Nick Clemens [Wed, 30 Dec 2015 23:14:37 +0000 (23:14 +0000)]
Bug 14629 - Add aggressive ISSN matching feature equivalent to the aggressive ISBN matcher

This patch adds a syspref "AggressiveMatchOnISSN" allowing for a match
of ISSNs with or without hyphens. It uses Business::ISSN in order to
follow the use of Business::ISBN and allow for validation of ISSNs

To test:
1 - Find a record in your system with an ISSN (or add one)
2 - Stage a record containing the same ISSN but lacking a hyphen
3 - Matching on ISSN should find 0 matches
4 - Repeat with no hyphen ISSN in system and hyphen ISSN in import
5 - Matching should find 0
6 - Apply patch
7 - Update datbase and install Business::ISSN
8 - Leave AggressiveMatchOnISSN as don't and repeat original tests- no
change
9 - Set AggressiveMatchOnISSN as do and repeat original test
10 - You should find a match
11 - prove t/Koha.t - all tests pass

Sponsored by North Central Regional Library System (NCRL) www.ncrl.org

Signed-off-by: Chad Roseburg <croseburg@ncrl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7679: Follow-up to fix group by hour
Katrin Fischer [Wed, 26 Oct 2016 16:31:06 +0000 (18:31 +0200)]
Bug 7679: Follow-up to fix group by hour

Grouping by hour does not work with the collates.
This patch removes them after talking to Julian on IRC.

This partially reverts one of the earlier patches:
Bug 7679: Display all table headers (case and accent
 sensitive)

One could argue that this is more of a data problem,
than something we should fix/'hide' with code.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7679 - Follow-up for terminology
Katrin Fischer [Wed, 26 Oct 2016 15:41:49 +0000 (17:41 +0200)]
Bug 7679 - Follow-up for terminology

Patch changes "Library" to "Issuing library" and
"Patron branch" to "Patron library".

It also changes the text of the filters to match
the terms and spelling on the form itself.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7679: Display all table headers (case and accent sensitive)
Julian Maurice [Mon, 1 Sep 2014 15:22:00 +0000 (17:22 +0200)]
Bug 7679: Display all table headers (case and accent sensitive)

It appears that we can't assume that a lowercase word is equivalent to
the same word in uppercase (or a mix of lowercase and uppercase
letters). And this is also true about accented words.
So display all values even if they differ only by case or by their
accents.
This means that:
- "foobar" and "Foobar" will be in two separate rows/columns
- "Etudiant" and "Étudiant" (french) will be in two separate
  rows/columns too

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7679: Various fixes for circulation statistics wizard
Julian Maurice [Mon, 24 Mar 2014 10:56:58 +0000 (11:56 +0100)]
Bug 7679: Various fixes for circulation statistics wizard

- use SQL TRIM functions to avoid having '' and ' ' considered as
  different values
- use Text::Unaccent to remove accents from columns or rows values when
  accessing %table. This is required as MySQL consider as equals two
  strings that differ only by their accents when using GROUP BY clause.
- Exclude '' values from the list of columns or rows. Otherwise we could
  have a row 'UNKNOWN VALUE' and a row 'NULL' which both have the same
  values in their cells.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7679: Fix two SQL queries when using patron attributes
Julian Maurice [Wed, 19 Feb 2014 11:44:29 +0000 (12:44 +0100)]
Bug 7679: Fix two SQL queries when using patron attributes

and remove some Perl warnings

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7679: Fix several bugs in circulation statistics wizard
Julian Maurice [Wed, 5 Feb 2014 14:40:34 +0000 (15:40 +0100)]
Bug 7679: Fix several bugs in circulation statistics wizard

- Display values in NULL columns/rows
- Display columns/rows that contain values only in NULL rows/columns
- "To" filter in period row should be inclusive (YYYY-MM-DD should be
  YYYY-MM-DD 23:59:59)
- Make it possible to use only the "To" filter in period row (actually
  it results in DBI error (2 bind variables instead of 1))

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7679: Group different case values in the same row/column
Julian Maurice [Wed, 6 Nov 2013 07:47:13 +0000 (08:47 +0100)]
Bug 7679: Group different case values in the same row/column

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7679: Fix criteria display
Julian Maurice [Mon, 29 Apr 2013 15:07:49 +0000 (15:07 +0000)]
Bug 7679: Fix criteria display

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7679: Followup: circulation statistics wizard improvements
Jonathan Druart [Mon, 29 Oct 2012 15:20:36 +0000 (16:20 +0100)]
Bug 7679: Followup: circulation statistics wizard improvements

Signed-off-by: Brendan <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 7679: circulation statistics wizard improvements
Julian Maurice [Wed, 8 Aug 2012 15:02:19 +0000 (17:02 +0200)]
Bug 7679: circulation statistics wizard improvements

- Add patron branch to the list of possible rows, columns, and filters
- Add extended patron attributes to the list of possible rows, columns,
  and filters
- Allow to group period by hour
- Allow to translate filter names

NOTE: Removed signed off, since I believe I have dealt with the conflicts.
      Retesting required. Found some comments C4::Date that I missed.
      line prepatch 194/ postpatch 233 seems to be where the major
      conflict is.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5260 - DBRev 16.06.00.040
Kyle M Hall [Fri, 28 Oct 2016 11:54:58 +0000 (11:54 +0000)]
Bug 5260 - DBRev 16.06.00.040

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5260: Use post params instead of get to avoid putting op=email in the browser...
Jonathan Druart [Thu, 20 Oct 2016 08:07:34 +0000 (09:07 +0100)]
Bug 5260: Use post params instead of get to avoid putting op=email in the browser history

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5260: simplify script and error handling
Jonathan Druart [Thu, 20 Oct 2016 07:58:05 +0000 (08:58 +0100)]
Bug 5260: simplify script and error handling

No need to redirect, just sent the params to the template directly

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5260: Insert the new letter for existing installs
Jonathan Druart [Thu, 20 Oct 2016 07:54:50 +0000 (08:54 +0100)]
Bug 5260: Insert the new letter for existing installs

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5260: make tests pass even without patron cat 'PT'
Jonathan Druart [Thu, 20 Oct 2016 07:54:21 +0000 (08:54 +0100)]
Bug 5260: make tests pass even without patron cat 'PT'

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5260: QA follow-up - Add sample ACQORDER notice to sample notices
Katrin Fischer [Wed, 19 Oct 2016 21:52:21 +0000 (23:52 +0200)]
Bug 5260: QA follow-up - Add sample ACQORDER notice to sample notices

Adds the new notice ACQORDER to all web installers.

Verify by testing the SQL contains no errors and by running:
perl xt/sample_notices.t

NOTE:
- de-DE is already translated, others are in English.
- xt/sample_notices.t doesn't check fr-CA yet. I didn't fix this here
  as the file is missing other notices as well which should be fixed
  separately.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5260: QA follow-up: Fix error when no notice template is defined
Katrin Fischer [Wed, 19 Oct 2016 21:26:22 +0000 (23:26 +0200)]
Bug 5260: QA follow-up: Fix error when no notice template is defined

When no notice template ACQORDER was defined, you'r receive a false
positive "email sent" message. Now it will display a specific
error message instead.

Also includes 2 unit tests to test for the warn and new error code.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5260: Follow-up - Reindenting POD of SendAlerts
Katrin Fischer [Sun, 16 Oct 2016 10:56:48 +0000 (12:56 +0200)]
Bug 5260: Follow-up - Reindenting POD of SendAlerts

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5260 - Schema changes
Katrin Fischer [Fri, 14 Oct 2016 07:19:40 +0000 (07:19 +0000)]
Bug 5260 - Schema changes

Schema changes for new column in the aqcontacts table.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5260: Unit tests for new functionality in SendAlert
Katrin Fischer [Fri, 14 Oct 2016 10:02:33 +0000 (12:02 +0200)]
Bug 5260: Unit tests for new functionality in SendAlert

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5260 - Add option to send an order by e-mail to the acquisition module
Katrin Fischer [Mon, 15 Jun 2015 22:44:44 +0000 (00:44 +0200)]
Bug 5260 - Add option to send an order by e-mail to the acquisition module

With this patch it will be possible to send order information
to the vendor by e-mail. For now this feature can be triggered
manually with a button before closing the basket.
The order e-mail is based on the acquisition claim feature, but
uses a new notice template.

Test plan:

1) Vendors
A new checkbox "Contact when ordering?" was added to the vendor
page.
- Add a vendor and/or edit an existing vendor
- Verify the new option is saved correctly
- Verify the new option displays on the vendor summary page
  after saving

2) Notices
The feature works with a new notice template: ACQORDER
It works with the same formatting/fields etc. as the acq claim
notice.
- Add a new notice template ACQORDER in module
  'Claim/order aquisition'
- Make sure to use fields from the various offered tables
  in your notice
- Verify it is saved correctly

3) Basket
- Turn on LetterLog system preference
- Create multiple order lines
- Click the 'Send order' button in the toolbar
- Verify error or success message
- Verify you received the e-mail
- Verify there is a new entry with about the sent
  notice in your action_logs table

4) Regression testing...
- Verify order claims still work
- Verify serial claims still work
- Verify new serial issue notices still work
...
(I can provide additional test plans if needed)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 6934: Fix tiny capitalization issue missed before
Katrin Fischer [Mon, 24 Oct 2016 12:45:18 +0000 (14:45 +0200)]
Bug 6934: Fix tiny capitalization issue missed before

Account Management Fee

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 6934 - Fix problem C4::Branch::GetBranchesLoop not exist
Bouzid Fergani [Thu, 29 Sep 2016 16:43:39 +0000 (12:43 -0400)]
Bug 6934 - Fix problem C4::Branch::GetBranchesLoop not exist

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 6934: rename active transaction with All payments to the library and grouping...
Bouzid Fergani [Thu, 4 Aug 2016 18:56:33 +0000 (14:56 -0400)]
Bug 6934: rename active transaction with All payments to the library and grouping in it the relevant account types 'Pay' 'C'

    rename Patron carnumber on Patron card number
    fix src databales.js

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 6934: fix errors pointed out by the QA script
Bouzid Fergani [Thu, 28 Jul 2016 13:38:01 +0000 (09:38 -0400)]
Bug 6934: fix errors pointed out by the QA script

Also fix forbidden patterns in koha-tmpl/intranet-tmpl/prog/en/modules/reports/reports-home.tt

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 6934: Fix the href for datables in link rel stylesheet
Hector Castro [Fri, 22 Jul 2016 15:12:47 +0000 (09:12 -0600)]
Bug 6934: Fix the href for datables in link rel stylesheet

Fix the new path for 'datatables.css'

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 6934: Make CSV header column translatable and add total amounts in csv file
Bouzid Fergani [Tue, 19 Jul 2016 18:56:41 +0000 (14:56 -0400)]
Bug 6934: Make CSV header column translatable and add total amounts in csv file

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 6934: fix problem when export it open in LibreOffice - show values of itype and...
Bouzid Fergani [Tue, 19 Jul 2016 16:05:14 +0000 (12:05 -0400)]
Bug 6934: fix problem when export it open in LibreOffice - show values of itype and use TT plugin

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 6934: QA follow-up
Katrin Fischer [Thu, 28 Apr 2016 17:58:32 +0000 (19:58 +0200)]
Bug 6934: QA follow-up

- fixed tabs
- fixed capitalization on reports start page

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 6934: fixed encoding issue
remi [Tue, 19 Apr 2016 16:11:50 +0000 (12:11 -0400)]
Bug 6934: fixed encoding issue

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 6934: second fix to calendars
remi [Fri, 4 Mar 2016 21:13:14 +0000 (16:13 -0500)]
Bug 6934: second fix to calendars

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 6934: Fixed Calendar and removed used of unexisting and unused C4::Budgets getCur...
remi [Fri, 4 Mar 2016 20:10:57 +0000 (15:10 -0500)]
Bug 6934: Fixed Calendar and removed used of unexisting and unused C4::Budgets getCurrency

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 6934: QA Follow-up
remi [Thu, 3 Mar 2016 16:14:12 +0000 (11:14 -0500)]
Bug 6934: QA Follow-up

Tried to address every single thing that QA mentioned :
1)Removed isNull function
2)Changed datepicker properly
3)We have to fill in two dates not to be flooded with old entries if we don't want to.
4)The first two fieldsets are now in one bigger field set
5)Removed the use of $fullreportname variable
6)Removed the use of dt_from_string when it already recieved a DT.
7)Removed comments starting with "###" in cash_register_stats.pl
8)Used Text::CSV::Encoded to generate the CSV file (used guided_reports.pl as an example)
9)I am not sure if using C4::Reports::Guided is the right choice here. I instead used the same column names as the one recieved by the query in cash_register_stats because this report uses columns from 5 different tables in addition of using both firstname and surname twice.

For the ninth point, I would like to know more about C4::Reports::Guided if you still think using it would be a better solution. Thank you!

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 6934: New features, note added to transaction information, total caculated for...
genevieve [Fri, 13 Nov 2015 16:50:01 +0000 (11:50 -0500)]
Bug 6934: New features, note added to transaction information, total caculated for negative types of transaction

To be more specific, the column note from accountlines is now displayed in the table of the transactions.
The grand total is now calculated for neagtive types like Credit or Payment and isn't counted for Write off types.
Credit (return item) 'CR' has been added to drop down of transaction type

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>
7 years agoBug 6934: Fix code in CashRegisterStats (dataTables pagination, more accurate descrip...
genevieve [Tue, 15 Sep 2015 15:18:49 +0000 (11:18 -0400)]
Bug 6934: Fix code in CashRegisterStats (dataTables pagination, more accurate descriptions, add a delimiter pull down, change C4::Dates to Koha::DateUtils)

I cleaned up the code according to comment #23. I got rid of DHTMLcalendar_dateformat,
beacause it wasn't use in cash_register_stats.tt. C4::Dates is deprecated,
Koha::DateUtils is now used.
Some column names are changed and the pagination for the dataTables is fixed.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 6934: New report Cash Register Statistics
simith [Wed, 27 Aug 2014 18:36:13 +0000 (14:36 -0400)]
Bug 6934: New report Cash Register Statistics

This patch creates a new report that outputs cash register stats for a specific period.

Changes:

koha-tmpl/intranet-tmpl/prog/en/includes/reports-menu.inc               - Added cash register report link
koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash-register_stats.tt  - new file
koha-tmpl/intranet-tmpl/prog/en/modules/reports/reports-home.tt         - Added cash register report link
reports/cash-register_stats.pl                                          - new file

Testing:

I Apply the patch

0) Go to reports home page (Home › Reports);
1) Validate link << Cash Register >> under Statistics wizards;
2) Click link;
3) Validate page with three fieldsets;
4) Chose a date interval, a transaction type, a library and an output;
5) Validade the result.

Signed-off-by: Nicole <nicole@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17435: Gives ability to display stocknumber in search results
kohamaster [Wed, 12 Oct 2016 14:17:04 +0000 (16:17 +0200)]
Bug 17435: Gives ability to display stocknumber in search results

Adds stocknumber to data provided for xslt transformation

Test plan :
1) go to Administration module, MARC default frameworks and add, if not already done, a stocknumber subfield (a priori under the 995 tag). It will be linked to items.stocknumber in the koha.link zone of Advanced constraints section.
2) edit an item in staff interface and add a number in the stocknumber field.
3) Edit the xslt opac Results file that you are using and customize it. For a basic test, you can just replace "itemcallnumber" occurrences by "stocknumber".
4) make a search in a way to get several results including the title from which you modified an item.
5) You will see the added stocknumber displayed (between square brackets in the default xslt).

Same can be done through staff interface and staff xslt files.

Olivier Crouzet

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17434: Moremember displaying primary and secondary phone number twice
Josef Moravec [Tue, 18 Oct 2016 00:03:08 +0000 (00:03 +0000)]
Bug 17434: Moremember displaying primary and secondary phone number twice

Test plan:
1) Create patron category with category code "P" and create a patron
with this category
2) Fill in either the primary or other phone number
3) Go to patron details page (moremember.pl)
=> without patch you see primary/other phone duplicated
=> with patch you should see the number only once as expected

Signed-off-by: Lucio Moraes <lmoraes@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17417 [Revised] Correct invalid markup around news on the staff client home page
Owen Leonard [Mon, 10 Oct 2016 12:10:29 +0000 (08:10 -0400)]
Bug 17417 [Revised] Correct invalid markup around news on the staff client home page

This patch fixes two minor errors in the markup around displaying news
on the staff client home page: Adding a missing "class" attribute, and
changing the container around news items from <p> to <div> (because news
items might contain <p> and nesting them is incorrect).

To test, apply the patch and view the staff client home page with news
items showing. Validate the page and confirm that there are no errors.

Signed-off-by: Marc <veron@veron.ch>
Revision for QA removes an extra </div> from elsewhere in the template
to make the validator return no errors.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16935 - launch export_records.pl with deleted_barcodes param fails
Fridolin Somers [Wed, 24 Aug 2016 09:44:55 +0000 (11:44 +0200)]
Bug 16935 - launch export_records.pl with deleted_barcodes param fails

When launching misc/export_records.pl with this command line :

 misc/export_records.pl --date=`date +%d/%m/%Y` --deleted_barcodes --filename=/tmp/koha.mrc

You get this error message :

DBD::mysql::db selectall_arrayref failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 4 [for Statement " (
            SELECT DISTINCT barcode
            FROM deleteditems
            WHERE deleteditems.biblionumber = ?
        "] at misc/export_records.pl line 189.

This is because of a '(' after 'q|', looks like a typo.
Also, this patch removes useless var $q.

Test plan :
- Delete an item with barcode
- Without patch, run : misc/export_records.pl --date=`date +%d/%m/%Y` --deleted_barcodes --filename=/tmp/koha.mrc
=> You get dirty MySQL
- Without patch, run the same command
=> No error and the file is generated

Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14598 - DBRev 16.06.00.039
Kyle M Hall [Fri, 28 Oct 2016 11:30:38 +0000 (11:30 +0000)]
Bug 14598 - DBRev 16.06.00.039

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14598: [QA Follow-up] Small changes
Marcel de Rooy [Fri, 28 Oct 2016 07:54:20 +0000 (09:54 +0200)]
Bug 14598: [QA Follow-up] Small changes

[1] Renames the dbrev version to XXX; adding a my for $sth, although
    not strictly necessary it feels better.
[2] Circulation.t stumbles over:
    Undefined subroutine &C4::Circulation::GetItem called at ... line 1283.
    Somehow this is related to use_ok instead of a regular use.
    Worked around this by require_ok and adding a regular use.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14598: Fix warning from effective_itemtype
Jonathan Druart [Thu, 7 Apr 2016 11:03:49 +0000 (12:03 +0100)]
Bug 14598: Fix warning from effective_itemtype

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14598: (QA followup) use deleted{items|biblioitems} during upgrade
Tomas Cohen Arazi [Wed, 6 Apr 2016 14:34:26 +0000 (11:34 -0300)]
Bug 14598: (QA followup) use deleted{items|biblioitems} during upgrade

If the 'statistics' table contains circulation information about items
that are no longer on the DB it will raise a warning. This patch
makes the updatedatabase.pl script use the deleteditems and deletedbiblioitems
tables to get information for those items on the statistics table.

To reproduce:
- Have your sample DB contain some circulation data on the statistics table
- Make sure some of them have NULL itemtype:
> UPDATE statistics SET itemtype = NULL WHERE type='return';
- Check the upgrade query catches them:
> SELECT s.itemnumber, i.itype, b.itemtype FROM  ( SELECT DISTINCT itemnumber    FROM statistics    WHERE ( type = "return" OR type = "localuse" ) AND itemtype IS NULL ) s  LEFT JOIN  ( SELECT itemnumber,biblionumber, itype      FROM items    UNION    SELECT itemnumber,biblionumber, itype      FROM deleteditems ) i  ON (s.itemnumber=i.itemnumber)  LEFT JOIN  ( SELECT biblionumber, itemtype      FROM biblioitems    UNION    SELECT biblionumber, itemtype      FROM deletedbiblioitems ) b  ON (i.biblionumber=b.biblionumber);
+------------+-------+----------+
| itemnumber | itype | itemtype |
+------------+-------+----------+
|        732 | BK    | BK       |
|        731 | BK    | BK       |
+------------+-------+----------+
2 rows in set (0.00 sec)

- Delete the items, and some biblio too.
- Re-run the query
=> SUCCESS: Same results
- Go reset to NULL the itemtypes
> UPDATE statistics SET itemtype = NULL WHERE type='return';
- Run the updatedatabase.pl script:
 $ sudo koha-shell koahdev ; cd kohaclone
 $ perl installer/data/mysql/updatedatabase.pl
=> SUCCESS: No warnings

Note: It is possible that on production sites, if the sysadmin is cleaning the
deleted{items|biblioitems|biblio} tables, there will be warnings. This is expected
as they need to know some data lacks information.

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14598: (followup) Remove unused and non-existent C4::ItemType include
Tomas Cohen Arazi [Fri, 1 Apr 2016 15:25:39 +0000 (12:25 -0300)]
Bug 14598: (followup) Remove unused and non-existent C4::ItemType include

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14598 [QA Followup] - Update localuse statistics also
Kyle M Hall [Tue, 19 Jan 2016 14:34:20 +0000 (14:34 +0000)]
Bug 14598 [QA Followup] - Update localuse statistics also

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14598 [QA Followup] - Make unit test pass
Kyle M Hall [Tue, 12 Jan 2016 16:04:55 +0000 (16:04 +0000)]
Bug 14598 [QA Followup] - Make unit test pass

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14598 [QA Followup] - Correct the behavior of GetItem
Kyle M Hall [Fri, 18 Dec 2015 14:59:02 +0000 (14:59 +0000)]
Bug 14598 [QA Followup] - Correct the behavior of GetItem

Currently GetItem sets itemtype to the biblio itemtype if no item level
itemtype exists. Instead, it should only do this if item_level-itypes
is not set.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14598 [QA Followup] - Only fetch bib data if needed
Kyle M Hall [Fri, 20 Nov 2015 14:23:22 +0000 (14:23 +0000)]
Bug 14598 [QA Followup] - Only fetch bib data if needed

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14598 - QA Followup touching CanBookBeIssued subroutine
Brendan A Gallagher [Thu, 19 Nov 2015 21:13:05 +0000 (21:13 +0000)]
Bug 14598 - QA Followup touching CanBookBeIssued subroutine

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14598: (DB update) fix NULL itemtypes in statistics on 'return' rows
Tomas Cohen Arazi [Tue, 1 Sep 2015 14:52:17 +0000 (11:52 -0300)]
Bug 14598: (DB update) fix NULL itemtypes in statistics on 'return' rows

This patch introduces an updatedatabase.pl entry that takes care of
updating existing statistics rows.

It does so by looping on the statistics rows, collecting itemnumber occurences
that are have NULL itemtypes.
It then chooses the right itemtype following what is proposed on bug 14651, and
then updates the rows in statistics using the calculated itemtype.

Regards

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14598: (QA followup) Don't die on bad barcode
Kyle M Hall [Mon, 27 Jul 2015 15:16:56 +0000 (11:16 -0400)]
Bug 14598: (QA followup) Don't die on bad barcode

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14598: Make C4::Circulation::AddReturn store the right itemtype
Tomas Cohen Arazi [Mon, 27 Jul 2015 14:40:38 +0000 (11:40 -0300)]
Bug 14598: Make C4::Circulation::AddReturn store the right itemtype

This patch makes C4::Circulation::AddReturn correctly store the itemtype
on the 'statistics' table.

To reproduce:
- Checkout master.
- Make a checkout.
- Check the 'statistics' table and notice the itemtype is correctly set
  > SELECT * FROM statistics;
- Check the item in.
- Check the 'statistics' table and notice the itemtype is not set
  > SELECT * FROM statistics WHERE type="return";
=> FAIL: itemtype is set to NULL

To test:
- Apply the regression tests patch
- Run the tests:
  $ prove t/db_dependent/Circulation/Returns.t
=> FAIL: Tests fail
- Apply this patch
- Run the regression tests:
  $ prove t/db_dependent/Circulation/Returns.t
=> SUCCESS: Tests now pass.
- Repeat the 'To reproduce' steps
=> SUCCESS: itemtype is now correctly set (in real life)
- Happily sign off :-D

Sponsored-by: Universidad Empresarial Siglo 21
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14598: (regression tests) AddReturn should store itemtype on 'statistics' table
Tomas Cohen Arazi [Sun, 26 Jul 2015 05:05:16 +0000 (02:05 -0300)]
Bug 14598: (regression tests) AddReturn should store itemtype on 'statistics' table

This patch adds tests for C4::Circulation::AddReturn(). Both tests are wrapped
inside a subtest, and look for AddReturn storing the right itemtype on the
'statistics' table.

Note: It also refactors the file a bit, to avoid side effects. And uses TestBuilder
to make it independent on already-present db data. It also removes warnings by mocking
C4::Context::userenv

To test:
- Apply the patch
- Run the tests:
  $ prove t/db_dependent/Circulation/Returns.t
=> FAIL: Tests fail bacause AddReturn is not storing the itemtype
- Sign off :-D

Sponsored-by: Universidad Empresarial Siglo 21
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17376 - rebuild_zebra.pl in daemon mode no database access kills the process
Fridolin Somers [Thu, 29 Sep 2016 14:19:48 +0000 (16:19 +0200)]
Bug 17376 - rebuild_zebra.pl in daemon mode no database access kills the process

When running rebuild_zebra.pl in daemon mode, a while loop runs the script for ever.
But if something crashes inside the rebuild process, the all daemon crashes.
For example when it can not access database.
This problem may be temporary so daemon should keep running.

This patch add eval around the rebuild process to allow a run to fail without killing the daemon.
Also moves the DB handler get inside daemon loop because it is broken is DB stoppes.

This is a big issue for indexer running in a systemd service.

Test plan :
- run rebuild_zebra.pl in daemon mode :
/home/koha/src/misc/migration_tools/rebuild_zebra.pl -daemon -z -a -b -x --sleep 30
- stop the database
- wait a minute
=> you see an error on database connexion
=> the daemon is still running
- restart the database
- test the indexer by creating a new record (wait for a minute)

Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17495: Fix 'method selected not covered by test' in reports/issues_stats.pl
Jonathan Druart [Tue, 25 Oct 2016 07:16:56 +0000 (09:16 +0200)]
Bug 17495: Fix 'method selected not covered by test' in reports/issues_stats.pl

If you access reports/issues_stats.pl, you will get
Template process failed: undef error - The method selected is not
covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121
http://localhost:8081/cgi-bin/koha/reports/reports-home.pl

Bug 15407 sent objects to the template and the selected method is not
defined.
The bug had been highlighted by bug 17425 which dies instead of hides the error.

Not that the "selected" code was not needed, the different elements of
the page never select a specific value.

Test plan:
Apply this patch and confirm that the error is no longuer displayed.

Reproduced. Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14874 - DBRev 16.06.00.038
Kyle M Hall [Thu, 27 Oct 2016 14:02:19 +0000 (14:02 +0000)]
Bug 14874 - DBRev 16.06.00.038

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14874: Set default DefaultPatronSearchFields
Jonathan Druart [Tue, 4 Oct 2016 11:57:13 +0000 (12:57 +0100)]
Bug 14874: Set default DefaultPatronSearchFields

just in case...

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14874 - Add ability to search for patrons by date of birth from checkout and...
Nick Clemens [Sun, 15 May 2016 14:44:48 +0000 (10:44 -0400)]
Bug 14874 - Add ability to search for patrons by date of birth from checkout and patron quick searches

This patch adds a new syspef 'DefaultPatronSearchFields' which defines
the fields that should be used when searching for a patron if none are
defined.

To test:
1 - Aply patch, updatedatabase
2 - Ensure patron search has not changed
3 - Add dateofbirth to new pref
4 - Ensure things work wll
5 - Experiment with adding and removing other fields from borrowers
table
6 - prove t/db_dependent/Utils/Datatables_Members.t

Tested together with followup. Works as described.
Signed-off-by: Marc Véron <veron@veron.ch>
Bug 14874 (QA Followup)

    Fix atomicupdate file name

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17375: Search by dateofbirth - handle invalid dates
Jonathan Druart [Tue, 4 Oct 2016 10:55:25 +0000 (11:55 +0100)]
Bug 17375: Search by dateofbirth - handle invalid dates

Prevent internal software error when searching patron with invalid birth date

To reproduce:

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

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

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

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Lucio Moraes <lmoraes@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 17375: Search by dateofbirth - Add tests
Jonathan Druart [Tue, 4 Oct 2016 10:55:02 +0000 (11:55 +0100)]
Bug 17375: Search by dateofbirth - Add tests

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14610 - DBRev 16.06.00.037
Kyle M Hall [Wed, 26 Oct 2016 12:21:58 +0000 (12:21 +0000)]
Bug 14610 - DBRev 16.06.00.037

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14610: Follow-up 2
Katrin Fischer [Wed, 26 Oct 2016 11:32:40 +0000 (13:32 +0200)]
Bug 14610: Follow-up 2

- Fixes typo "Recieve" in the sample notices
- Adds new notices to it-IT installer
- Turns off feature for existing installations, leaves it
  on for new installations
- Fixes typo "cancelation"
- Fixes ids in <body> of new pages
- Adds/fixes classes in th elements of tables

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14610 - Follow-up
Katrin Fischer [Fri, 21 Oct 2016 02:17:58 +0000 (02:17 +0000)]
Bug 14610 - Follow-up

Patch fixes some smaller problems:

- Adds new notices to the it-IT installer (xt/sample_notices.t)
- Renames one of the classes used in the table to avoid double up
- Fixes POD of Bilbio.pm by removing a doubled up line

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14610 - Update Schema files
Kyle M Hall [Mon, 24 Oct 2016 13:57:10 +0000 (13:57 +0000)]
Bug 14610 - Update Schema files

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14610 [QA Followup] - Fix publishercode issue
Kyle M Hall [Tue, 11 Oct 2016 08:46:14 +0000 (08:46 +0000)]
Bug 14610 [QA Followup] - Fix publishercode issue

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14610 [QA Followup] - Add classes to table headers
Kyle M Hall [Tue, 11 Oct 2016 08:15:37 +0000 (08:15 +0000)]
Bug 14610 [QA Followup] - Add classes to table headers

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14610 [QA Followup] - Add notices to all language files
Kyle M Hall [Tue, 11 Oct 2016 08:12:27 +0000 (08:12 +0000)]
Bug 14610 [QA Followup] - Add notices to all language files

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14610 [QA Followup] - Implement staff patron tab
Kyle M Hall [Wed, 14 Sep 2016 13:39:19 +0000 (13:39 +0000)]
Bug 14610 [QA Followup] - Implement staff patron tab

Also fixes a few other minor issues

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14610 - Update opac.css via less
Kyle M Hall [Mon, 16 May 2016 11:21:28 +0000 (11:21 +0000)]
Bug 14610 - Update opac.css via less

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14610 - Add unit tests
Kyle M Hall [Wed, 7 Oct 2015 16:26:37 +0000 (12:26 -0400)]
Bug 14610 - Add unit tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jennifer Schmidt <jschmidt@switchinc.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14610 - Add and update scripts
Kyle M Hall [Wed, 7 Oct 2015 16:26:14 +0000 (12:26 -0400)]
Bug 14610 - Add and update scripts

Signed-off-by: Jennifer Schmidt <jschmidt@switchinc.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14610 - Add and update modules
Kyle M Hall [Wed, 7 Oct 2015 16:23:24 +0000 (12:23 -0400)]
Bug 14610 - Add and update modules

Signed-off-by: Jennifer Schmidt <jschmidt@switchinc.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14610 - Add ability to place article requests in Koha - Update database
Kyle M Hall [Wed, 7 Oct 2015 16:22:12 +0000 (12:22 -0400)]
Bug 14610 - Add ability to place article requests in Koha - Update database

Article Requests are somewhat similar to holds, but are not requests for
an item to check out. Instead, article requests are requests for a
photocopy of a particular section of a book ( most often ). This is very
common in academic libraries where researchers may request a copy of a
single article found in a journal.

This patch set adds the ability to place article requests in Koha. It
allows the control of what can be requested via the circulation rules.
Since article requests of electronic resources are not outside the realm
of possibility, the feature will check not only the items for
requstability, but the record itself as well ( i.e. both items.itype and
biblio.itemtype ).

Article requests can be placed for patrons from the opac and staff
intranet and can be viewed in most areas where holds are viewed ( e.g.
patron details, record details, etc ).

There is a script to view article requests in progress within the
circulation module. Article requests can be Open ( i.e. new ), In
Processing, Completed, or Canceled. The status of a given request can be
updated from this script.

Test Plan:
1) Apply the patch set
2) Run updatedatabase.pl
3) Enable the system preference ArticleRequests
4) Set up some required fields in:
    ArticleRequestsMandatoryFields
    ArticleRequestsMandatoryFieldsItemsOnly
    ArticleRequestsMandatoryFieldsRecordOnly
5) Edit your circ rules, set article requests to 'yes' for something
6) Test the ability to add an article request from the opac ( required fields enforced )
7) Test the ability to add an article request from the staff interface ( required fields no enforced )
8) Note you can choose item level or record level requests
9) Change the rule to "record only"
10) Repeat 6 and 7
11) Note you cannot choose items
12) Change the rule to "item only"
13) Repeat 6 and 7
14) Note you must choose an item
15) Note that the 'new request' message is queued for each new request
16) Browse to /cgi-bin/koha/circ/article-requests.pl
17) Note requests are split by pickup branch
18) Test slip printing via the "Print slip" action
19) Process request vai "Process request" action
20) Note an email notice is queued for patron
21) Refresh /cgi-bin/koha/circ/article-requests.pl
22) Note request has moved to "processing" tab.
23) Complete request with "Complete request" action
24) Note message is queued for patron
25) Cancel a request, add cancelation note.
26) Note message is queued for patron

Signed-off-by: Jennifer Schmidt <jschmidt@switchinc.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 16850: Adjust number of tests
Jonathan Druart [Mon, 24 Oct 2016 11:46:31 +0000 (11:46 +0000)]
Bug 16850: Adjust number of tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 14752 - Followup to fix error if barcode fields undefined
Nick Clemens [Wed, 19 Oct 2016 10:09:56 +0000 (10:09 +0000)]
Bug 14752 - Followup to fix error if barcode fields undefined

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5670 - DBRev 16.06.00.036
Kyle M Hall [Fri, 21 Oct 2016 17:44:59 +0000 (17:44 +0000)]
Bug 5670 - DBRev 16.06.00.036

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5670: Add a confirmation message on delete
Jonathan Druart [Mon, 17 Oct 2016 14:14:39 +0000 (15:14 +0100)]
Bug 5670: Add a confirmation message on delete

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5670: Use the fa icon for the save button
Jonathan Druart [Mon, 17 Oct 2016 13:58:09 +0000 (14:58 +0100)]
Bug 5670: Use the fa icon for the save button

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5670: Use Koha.Preference to retrieve syspref from templates
Jonathan Druart [Mon, 17 Oct 2016 13:49:48 +0000 (14:49 +0100)]
Bug 5670: Use Koha.Preference to retrieve syspref from templates

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5670: Does not return 0 in Koha::Patron->housebound_* methods
Jonathan Druart [Mon, 17 Oct 2016 13:47:30 +0000 (14:47 +0100)]
Bug 5670: Does not return 0 in Koha::Patron->housebound_* methods

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5670: Update constraint name to match with the one in updatedatabase
Jonathan Druart [Mon, 17 Oct 2016 13:47:02 +0000 (14:47 +0100)]
Bug 5670: Update constraint name to match with the one in updatedatabase

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5670: [Followup] Add 'step 4' edit button.
Alex Sassmannshausen [Thu, 13 Oct 2016 10:37:50 +0000 (12:37 +0200)]
Bug 5670: [Followup] Add 'step 4' edit button.

* koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt:
  Place housebound role form inside the 'step 4' section.
* koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt:
  Add 'step 4' edit button for housebound role.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5670: Add auth_val_cat to auth_val_cat.sql.
Alex Sassmannshausen [Thu, 13 Oct 2016 09:57:06 +0000 (11:57 +0200)]
Bug 5670: Add auth_val_cat to auth_val_cat.sql.

* installer/data/mysql/atomicupdate/housebound_tables.sql: Insert
  HSBND_FREQ in authorised value categories.
* installer/data/mysql/mandatory/auth_val_cat.sql: Add HSBND_FREQ.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoDO NOT PUSH: Moar Housebound Schema files.
Alex Sassmannshausen [Thu, 13 Oct 2016 08:05:46 +0000 (10:05 +0200)]
DO NOT PUSH: Moar Housebound Schema files.

* Koha/Schema/Result/Borrower.pm: New method.
* Koha/Schema/Result/HouseboundRole.pm: New file.

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

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5670: [QA Followup] HouseboundRole CRUD from UI.
Alex Sassmannshausen [Wed, 12 Oct 2016 15:26:02 +0000 (17:26 +0200)]
Bug 5670: [QA Followup] HouseboundRole CRUD from UI.

* koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt: Add
  HouseboundRole form.
* members/memberentry.pl: Handle HouseboundRole CRUD.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5670: [QA Followup] Display HouseboundRole info.
Alex Sassmannshausen [Wed, 12 Oct 2016 12:30:36 +0000 (14:30 +0200)]
Bug 5670: [QA Followup] Display HouseboundRole info.

* Koha/Patron.pm (housebound_role): New method.
* koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt: Add
  section for HouseboundRole information
* members/moremember.pl: Pass HouseboundRole info to template.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5670: [QA Followup] Correct housebound role search.
Alex Sassmannshausen [Mon, 10 Oct 2016 13:38:04 +0000 (15:38 +0200)]
Bug 5670: [QA Followup] Correct housebound role search.

* Koha/Patrons.pm (search_housebound_choosers)
  (search_housebound_deliverers): Use new table.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5670: [QA Followup] Create HouseboundRole objects.
Alex Sassmannshausen [Mon, 10 Oct 2016 13:31:19 +0000 (15:31 +0200)]
Bug 5670: [QA Followup] Create HouseboundRole objects.

* Koha/Patron/HouseboundRole.pm: New file.
* Koha/Patron/HouseboundRoles.pm: New file.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5670: [QA Followup] Create housebound roles table.
Alex Sassmannshausen [Mon, 10 Oct 2016 10:37:50 +0000 (12:37 +0200)]
Bug 5670: [QA Followup] Create housebound roles table.

* installer/data/mysql/atomicupdate/housebound_tables.sql (housebound_role):
  New table.
* installer/data/mysql/kohastructure.sql (housebound_role): New table.
* installer/data/mysql/en/mandatory/auth_values.sql: Remove HSBND_ROLE entries.
* installer/data/mysql/en/mandatory/patron_attributes.sql: Remove
  HSBND_ROLE entry.
* installer/data/mysql/en/mandatory/patron_attributes.txt: Remove
  explanatory text.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5670: [QA Followup] More "required" messages.
Alex Sassmannshausen [Wed, 28 Sep 2016 14:54:53 +0000 (16:54 +0200)]
Bug 5670: [QA Followup] More "required" messages.

* koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt: Mark
  houseboundvisit fields as required.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5670: [QA Followup] Improve template style.
Alex Sassmannshausen [Wed, 28 Sep 2016 14:33:47 +0000 (16:33 +0200)]
Bug 5670: [QA Followup] Improve template style.

* koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt: Remove
  toggler class from form, improve look and layout of action buttons.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5670: remove useless call to ->new when ->search is enought
Jonathan Druart [Wed, 28 Sep 2016 09:21:44 +0000 (10:21 +0100)]
Bug 5670: remove useless call to ->new when ->search is enought

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
7 years agoBug 5670: mv housebound_* to search_housebound_*
Jonathan Druart [Wed, 28 Sep 2016 09:17:46 +0000 (10:17 +0100)]
Bug 5670: mv housebound_* to search_housebound_*

I think it's better to prefix the subroutine names used to search with
'search_'.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>