Julian Maurice [Fri, 9 Sep 2016 11:45:36 +0000 (13:45 +0200)]
Bug 13321: Update DBIx::Class schema files
Signed-off-by: Sonia Bouis <koha@univ-lyon3.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Julian Maurice [Mon, 5 Sep 2016 09:11:44 +0000 (11:11 +0200)]
Bug 13321: Recalculate tax_value for partially received orders
Test plan:
1. Create an order with at least 2 items
2. Receive only 1 item
3. Check that the tax value of the received order line is correct on
the parcel and invoice pages
4. Check that the tax value of the original order line is correct (on
the basket page for example)
5. Cancel the receipt
6. Check that the tax value of the original order line is correct
Signed-off-by: Sonia Bouis <koha@univ-lyon3.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Alex Arnaud [Sat, 4 Jun 2016 11:46:44 +0000 (13:46 +0200)]
Bug 13321: Add missing Price TT plugin in orderreceive.tt
Signed-off-by: Sonia Bouis <koha@univ-lyon3.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Alex Arnaud [Fri, 20 May 2016 12:25:44 +0000 (14:25 +0200)]
Bug 13321: Adds renaming of gstrate column in kohastructure.sql
Signed-off-by: Sonia Bouis <koha@univ-lyon3.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Tue, 13 Jan 2015 16:03:04 +0000 (17:03 +0100)]
Bug 13321: Fix unitprice rounding
We need to display the rounded value, but insert the exact value.
The unit price can be change on receiving, so the input value can be
modified.
But if it's not, we must insert the exact (not rounded) unit price,
which is the ecost value.
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Francois Charbonnier <francois.charbonnier@inlibro.com> Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr> Signed-off-by: Sonia Bouis <koha@univ-lyon3.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Mon, 17 Nov 2014 11:06:09 +0000 (12:06 +0100)]
Bug 13321: Fix the prices calculation method
Well, we have finally arrived here \o/
The method where the prices are calculated uses the equations listed on
the wiki page (http://wiki.koha-community.org/wiki/GST_Rewrite_RFC).
The ecost is calculated from the rrp (using the discount and the tax
rate). That's why we removed the ability to edit this value.
That's why we remove the ability to edit the ecost on ordering in a
previous commit (bug 12840).
The total is now calculated in the scripts. That's why this patch
removes lines in the test file.
In C4::Acquisition::populate_order_with_prices, the calculation on
receiving must depend on the 'invoiceincgst' supplier parameter, and not
listincgst (which is used on ordering).
It also removes the rounding errors, now we store "exact" values in DB
(10^-6).
The values will be displayed using the Price TT plugin it will round the
values for us.
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Francois Charbonnier <francois.charbonnier@inlibro.com> Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr> Signed-off-by: Sonia Bouis <koha@univ-lyon3.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Fri, 14 Nov 2014 15:10:52 +0000 (16:10 +0100)]
Bug 13321: Rename variables
This patch renames the variable according to the new DB column names
* gste => tax_excluded
* gsti => tax_included
* gstrate => tax_rate
* gstvalue => tax_value
This patch also modify the ModReceiveOrder subroutine:
* Edit vendor note on receiving is not possible, so the code should not
permit that.
* Update ModReceiveOrder to pass a hashref
And that's all!
git grep on gste, gsti, gstrate and gstvalue should not return any code
that can be executed.
Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> Signed-off-by: Francois Charbonnier <francois.charbonnier@inlibro.com> Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr> Signed-off-by: Sonia Bouis <koha@univ-lyon3.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This was the "Get" subroutine for the framework, it can be easily
replaced with a call to the Koha::BiblioFrameworks->find method.
This patch also replaces some confusing wordings (framework vs frameworkcode).
Test plan:
On the circulation home page, you should see a "Fast cataloguing" link
if the FA framework exists.
Note that the admin/marctagstructure.pl has already been tested in the
previous patch.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Link pops Ok
No errors
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4::Koha::getframeworks returned a hashref of biblio frameworks.
It was mainly used to generate the dropdown list of frameworks.
The scripts modified in this patch did not necessary order the element
by description (frameworktext), the displays were not consistent from
one screen to another.
Using the same search method everywhere:
Koha::BiblioFrameworks->search({}, { order_by => ['frameworktext'] });
We will know always get the framework in the same order.
Test plan:
Following the different pages modified by this patch, and make sure the
frameworks are displayed correctly in the dropdown list:
1/ acqui/z3950_search.pl - Create an order from an external source.
2/ admin/fieldmapping.pl - Define some mappings keyword / MARC field
3/ admin/marctagstructure.pl - On the MARC frameworks admin page, select
another framework than the default one and click on the 'Search' button
4/ catalogue/MARCdetail.pl - On the MARC defail page, change the
framework you want to use to display the record
5/ cataloguing/addbiblio.pl - Add or edit a biblio record, change its
framework. When editing, the framework of the record should be selected
by default
6/ cataloguing/addbooks.pl - Go on the cataloguing home page and click
on the "New record" button. You should see all the frameworks
7/ cataloguing/merge.pl - Select 2 biblio records to merge. On the first
step (select the merge reference), you should be allowed to select the
framework to use.
8/ tools/inventory.pl - On the inventory page, the "Item statuses" part
should be populated as before this patch
9/ tools/manage-marc-import.pl - Stage records for import. Before
importing them into the catalog, you should see the framework dropdown
list.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works Ok.
No errors
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>