Kyle M Hall [Wed, 11 May 2016 14:19:41 +0000 (14:19 +0000)]
Bug 16493: acq matching on title and author
When you order from a staged file you're getting duplicate warnings that
are inaccurate. For example, when you order a file of 50 DVDs for
example and they don't have ISBNs they're matching on the books. And
then you have to order them one by one.
This patch replaces the use of FindDuplicates with Koha's match point
system. This means you can select from the same match points defined
and used in the batch record importer, or you can opt to skip matching
altogether!
Test Plan:
1) Import a record with a title, isbn and author.
2) Delete the from the record and stage it again
3) Attempt to add it to a basket via the staged record
4) You should note the gives you the "No records imported" message
5) Apply this patch
6) Create a matcher for ISBN
7) Create a matcher for Author/Title
8) Attempt to add the record to your basket using the ISBN matcher
8) Koha should find no match and import the record to the basket
9) Stage the record again
10) Attempt to add the record to your basket using the Title/Author matcher
11) You should recieve the "No records imported" message.
Signed-off-by: Barbara Fondren <bfondren@roundrocktexas.gov> Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
To test:
1. Set patron category "S" with enrolmentfee 1
2. perl t/db_dependent/Reserves.t
3. Observe following errors:
not ok 59 - Bug 14464 - No fines at beginning
ok 60 - Bug 14464 - 1st reserve correctly created
ok 61 - Bug 14968 - Keep found column from reserve
not ok 62 - Bug 14464 - No fines after cancelling reserve with no charge configured
ok 63 - Bug 14464 - 2nd reserve correctly created
not ok 64 - Bug 14464 - No fines after cancelling reserve with no charge desired
ok 65 - Bug 14464 - 1st reserve correctly created
not ok 66 - Bug 14464 - Fine applied after cancelling reserve with charge desired and configured
4. Apply patch
5. perl t/db_dependent/Reserves.t
6. Observe test pass
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Lari Taskula [Wed, 2 Nov 2016 13:05:28 +0000 (15:05 +0200)]
Bug 17539: Fix Already in a transaction error
perl t/db_dependent/Reserves.t
1..72
ok 1 - use C4::Reserves;
ok 2 - CheckReserves Test 1
...
ok 52 - Reserve in waiting status cant be canceled
ok 53 - Reserving an ageRestricted Biblio without a borrower dateofbirth succeeds
DBD::mysql::db begin_work failed: Already in a transaction at
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1489.
DBD::mysql::db begin_work failed: Already in a transaction at
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1489.
at /usr/share/perl5/DBIx/Class/Schema.pm line 1080.
...
Koha::Object::store('Koha::Patron=HASH(0x9e43b20)') called at
/home/ubuntu/kohaclone/C4/Members.pm line 542
C4::Members::ModMember('borrowernumber', 658535, 'dateofbirth', '2001-11-02')
called at t/db_dependent/Reserves.t line 516
This patch fixes this issue by replacing dbh autocommit=0 with
txn_begin.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
1..72
ok 1 - use C4::Reserves;
ok 2 - CheckReserves Test 1
ok 3 - CheckReserves() include reserve_id in its response
ok 4 - CheckReserves Test 2
ok 5 - CheckReserves Test 3
ok 6 - GetReservesControlBranch returns item home branch when set to ItemHomeLibrary
ok 7 - GetReservesControlBranch returns patron home branch when set to PatronLibrary
ok 8 - Item is correctly waiting
ok 9 - Item is correctly priority 1
ok 10 - Item is correctly priority 2
ok 11 - GetWaiting got only the waiting reserve
ok 12 - GetWaiting got the reserve for the correct borrower
Undefined subroutine &C4::Circulation::GetItem called at /home/ubuntu/kohaclone/C4/Circulation.pm line 1853.
This patch fixes this error. The solution was to use C4::Reserves before C4::Items.
Also due to this edit, change use_ok to require_ok
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Hector Castro [Tue, 21 Jun 2016 19:24:20 +0000 (13:24 -0600)]
Bug 16792: Add Font Awesome Icon and mini button to Keyword to MARC mapping section
Improve Admin > Keyword to MARC mapping to fit with others interfaces in Koha.
This bug change "Delete" link with a mini-button and introduce the trash icon.
To test:
-Apply patch
-Goto Admin > Keyword to MARC mapping
-Select one framework
-Add some mappings
-Notice about the new button with trash icon
Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 17544 - : Remove t::lib::Mocks dependency from populate_db.pl
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Wed, 2 Nov 2016 11:54:12 +0000 (11:54 +0000)]
Bug 17540: (Bug 7216 followup) Fix tests for auth_values_input_www.t
This is caused by bug 17216 which modified the structure of the AV admin
page
Test plan:
prove t/db_dependent/www/auth_values_input_www.t
should return green
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
The insert into authorised_values failed because of the missing FK
Test plan:
prove t/db_dependent/Upload.t
should return green
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Wed, 2 Nov 2016 10:50:54 +0000 (10:50 +0000)]
Bug 17537: Fix valid-templates.t for some include files
3 include files do not pass the template validation tests:
- koha-tmpl/intranet-tmpl/prog/en/includes/admin-items-search-field-form.inc
- koha-tmpl/intranet-tmpl/prog/en/includes/subscriptions-search.inc
- koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-topissues.inc
This is because they process a block which has not been declared before.
As they are include files, they cannot stand on their own.
We could have added them to the exclude file list of xt/author/valid-templates.t
but I think it's better to keep them into the validation loop.
Test plan:
prove xt/author/valid-templates.t
should return green
And the library dropdown list should be correctly populated on the pages these files are included
(opac-topissues for instance)
Signed-off-by: Claire Gravely <claire_gravely@hotmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Josef Moravec [Wed, 26 Oct 2016 22:53:04 +0000 (22:53 +0000)]
Bug 17518: Displayed language name for Czech is wrong
It's "Ceština" and should be "Čeština"
Test plan:
1) apply the patch
1.1) update database
2) install Czech translation for Koha
3) note the language name in language switcher (in staff client and
opac) is right: "Čeština"
Signed-off-by: radiuscz <radek.siman@centrum.cz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 17504: Make the installer show the right dmbs help if wrong permissions
This patch changes the installer template for step 2 (DB rights check)
so it correctly displays MySQL-related message.
The previous code was doing the wrong comparisson, thus yielding
PostgreSQL documentation.
To test:
- Run:
$ sudo koha-mysql kohadev
> DROP DATABASE koha_kohadev ; CREATE DATABASE koha_kohadev;
> REVOKE INSERT ON koha_kohadev.* FROM 'koha_kohadev'@'localhost';
> FLUSH PRIVILEGES; \q
- Run the webinstaller through step 2
=> FAIL: You get the message in the attached screenshot
- Apply the patch, reload
=> SUCCESS: You are displayed a different warning message, with a link
to up-to-date MySQL docs on GRANT
- Fix permissions for the user:
$ sudo koha-mysql kohadev
> GRANT ALL PRIVILEGES on koha_kohadev.* TO 'koha_kohadev'@'localhost';
> FLUSH PRIVILEGES; \q
- Reload
=> SUCCESS: All checks are correct and you can move on
- Sign off :-D
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Mon, 31 Oct 2016 14:40:51 +0000 (14:40 +0000)]
Bug 17524: Fix datepicker check for iso dates
Iso dates are yyyy-mm-dd, the is_valid JS function
expects \d{2}-\d{2}-\d{4} when it should be \d{4}-\d{2}-\d{2}
Test plan:
Switch DateFormat to iso
Set a due date using the datepicker
=> Should work as expected
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Mon, 4 Jul 2016 12:38:45 +0000 (13:38 +0100)]
Bug 16852: Remove GetBorrowerCategorycode
And use Koha::Patron->categorycode instead
Test plan:
- Restrict a patron attribute to a patron category
- Use the batch patron modification tool to update a patron of this
category
You should not see the the patron attribute
Signed-off-by: Claire Gravely <claire_gravely@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Thu, 8 Sep 2016 09:26:34 +0000 (10:26 +0100)]
Bug 17274: Display the place where the memcached is picked
The memcached config can be read from ENV or koha-conf.xml
In order to remove any ambiguity, let's inform the user which config is
used.
Test plan:
1/ Define the memcached config in ENV and $KOHA_CONF
=> Go on about page, you should get a warning
2/ Define the memcached config in ENV and not in $KOHA_CONF
=> Go on about page, you should get a warning
3/ Do not defined the memcached config in ENV or $KOHA_CONF
=> Go on about page, you should get a warning
4/ Define the memcached config in $KOHA_CONF and not in ENV
=> Go on about page, you should not get a warning, this is the expected
config
Followed test plan, works as expected. Signed-off-by: Marc <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 17261: (followup) Mention the need to start memcached before plack
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Thu, 8 Sep 2016 09:04:13 +0000 (10:04 +0100)]
Bug 17261: Memcached may not longer be running
If plack is started with memcached, memcached will be considered as
running, even if it has been stopped (or crashed).
This case should be highlighted on the about page.
Note that I am not sure about the consequences of this specific case!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Thu, 8 Sep 2016 08:24:00 +0000 (09:24 +0100)]
Bug 17261: The default memcached namespace is "koha"
If no namespace is defined in ENV or the config, "koha" is used as the
default memcached namespace (See Koha::Cache->new)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 17261: (followup) Rebase against 17189 and 11921
This patch adjusts the original one so it works on top of 17189
and 11921. It adds an 'Effective caching method' text which can
be useful, when memcached is not available.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 17261: Add memcached configuration info to about.pl
This patch adds a row in the About > System information tab, showing
the current configuration for memcached.
To test:
- Apply this patch, have memcached configured for the current instance (this is the
default in kohadevbox)
- Make sure you have the memcached server running:
$ sudo service memcached start
- Open the about page in the browser
=> SUCCESS: You get something like:
Memcached: Servers: 127.0.0.1:11211 | Namespace: koha_kohadev | Status: running
- Stop the memcached server:
$ sudo service memcached stop
- Reload the about page
=> SUCCESS: You get something like
Memcached: Servers: 127.0.0.1:11211 | Namespace: koha_kohadev | Status: not running
- Set both MEMCACHED_* variables in the apache config for intranet the empty string:
$ sudo vim /etc/apache2/sites-enabled/kohadev.conf
..
SetEnv MEMCACHED_SERVERS ""
#"127.0.0.1:11211"
SetEnv MEMCACHED_NAMESPACE ""
#"koha_kohadev"
..
- Restart apache:
$ sudo service apache2 restart
- Reload the about page
=> SUCCESS: You get something like:
Memcached: Servers: undefined| Namespace: undefined | Status: unknown
- Sign off :-D
Sponsored-by: ByWater Solutions Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Katrin Fischer [Tue, 1 Nov 2016 14:53:05 +0000 (15:53 +0100)]
Bug 15581: Follow-up - suggested change to the OPAC message
Instead of showing "Automatic renewal" to the user, this
changes it to show "No longer renewable" when the
automatic renewal won't happen any longer because of the
days the item has already been checked out.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Mon, 18 Apr 2016 15:33:42 +0000 (16:33 +0100)]
Bug 15581: Display the generic "schedule for auto renew" message on the checkouts table
Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Thu, 14 Jan 2016 14:38:23 +0000 (14:38 +0000)]
Bug 15581: Display the latest auto renew date possible when renewing manually
If an issue marked as auto_renew is renewed manually, we want to display
the latest auto renew date possible.
Test plan:
1/ Define circ rules as in the previous patch.
2/ Check a item out, mark it as an auto renewal
3/ Back date the issuedate and make sure it will be too late to renew it
4/ Use the Circulation > renew page (circ/renew.pl) to manually renew
this issue.
You should get a warning "You barcode has been scheduled for automatic renewal
and cannot be renewed anymore since DATE."
If the pref AllowRenewalLimitOverride is set, you will be allowed to
renew it anyway.
Sponsored-by: University of the Arts London Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Wed, 13 Jan 2016 19:17:49 +0000 (19:17 +0000)]
Bug 15581: Add a circ rule to limit the auto renewals given a delay
This patch adds a new circulation rule (no_auto_renewal_after) to block/allow
auto renewals after a given delay.
For instance, if the issue date is 10 days before today, and
no_auto_renewal_after is set to 10, tomorrow the issue won't be auto
renewed.
Test plan:
0/ Execute the update DB entry
Note: You will have to manually change data in your DB, make sure you
have access to the sql cli.
1/ Define a rule with no_auto_renewal_after (10 for instance) and
norenewalbefore (5 for instance).
(This new rule will behave the same as norenewalbefore: the unit depends
on the lengthunit value).
The automatic renewals will be done from 5 to 10 days ahead.
2/ Modify the issues.issuedate, to simulate a checkout in the past:
UPDATE issues
SET issuedate = "yyyy-mm-dd hh:mm:ss"
WHERE itemnumber = YOUR_ITEMNUMBER;
with issuedate = 2 days before for instance
3/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has not been renewed (too soon)
4/ Repeat step 2 with a due date set as 11 days before
5/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has not been renewed (too late)
6/ Repeat step 2 with a due date set as 7 days before
7/ Execute the automatic renewals cronjob script (misc/cronjobs/automatic_renewals.pl)
Confirm that the issue has been renewed (issues.renewals has been
incremented and date_due has been updated according your circ rules).
Sponsored-by: University of the Arts London Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Josef Moravec [Wed, 5 Oct 2016 10:42:41 +0000 (12:42 +0200)]
Bug 17402 Enhance the actions button on serials-search.pl
Test plan:
1) Apply the patch
2) Go to serials home page
3) Search for a subscription
4) Ensure you have permission to receive serials
5) In the most right column of table you should see "Receive serial" button with
caret button, that should work as trigger form dropdown menu with other options
6) Ensure that all actions work as expected
7) Login with user without permission to receive serials
8) repeat 2-3
9) In the most right column of table you should see normal dropdown mane with label "Actions" and all applicable options
10) Ensure that all actions work as expected
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Chris Cormack [Tue, 18 Oct 2016 19:53:26 +0000 (08:53 +1300)]
Bug 17459: Follow up
Adding POD and --userid and --password options
1/ To test, use the same routine as before, with no options.
2/ You should have a user with koha/koha as userid and passwords
3/ Delete that user
4/ Run the script with --userid <userid> --password <password>
5/ You should have a user in koha with userid/password set
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Mon, 17 Oct 2016 17:01:07 +0000 (18:01 +0100)]
Bug 17459: Add a script to create a superlibrarian user
This is for developers: it's quite long (many clics) to create a new
superlibrarian user.
This new script creates a new user with superlibrarian permissions with
the easy to remember credential koha/koha
Test plan:
perl misc/devel/create_superlibrarian.pl
Log in to Koha using koha/koha
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Josef Moravec [Thu, 13 Oct 2016 12:21:48 +0000 (14:21 +0200)]
Bug 17443: Make possible to renew patron by later of expiry and current date
Test plan
1) Apply the patch
2) Go to system preferences and find the BorrowerRenewalPeriodBase and note there is new option "the later of current and expiry date"
3) Try all three options and confirm they work as expected
3.1) The new options should be tested et least with two patrons - one with expiry date in past and one with expiry date in future
Signed-off-by: radiuscz <radek.siman@centrum.cz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 4880: Make koha-remove stop all instance's services
This patch makes koha-remove stop all instance's services before
attempting to remove the system user,
Before this patch, only zebra was stopped.
To test:
- Run:
$ sudo koha-create --created-db favourite_name
- Run:
$ sudo koha-remove favourite_name
=> FAIL: koha-indexer is still running for user favourite_name-koha
- Run:
$ sudo koha-create --created-db another_name
$ sudo koha-plack --enable another_name
$ sudo koha-plack --start another_name
$ sudo koha-indexer --stop another_name
$ sudo koha-remove another_name
=> FAIL: koha-plack is still running for user another_name-koha
- Apply the patch
- Repeat the previous tests, with new names
=> SUCCESS: Everything works as expected :-D
- Sign off :-D
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>
The subroutine C4::Koha::GetAuthorisedValueCategories just retrieves all
the authorised value categories.
We already have a method in the Koha::AuthorisedValues module to do this
job, let's use it!
Technical explanations:
The new subroutine of the AuthorisedValues TT plugin will allow to get
the authorised value categories from the templates.
The new html_helpers include file will get rid of the if selected else
end statements. Bug 15758 already uses this file, see the commit
description for more informations.
Test plan:
1/ Create or edit a new fund (aqbudgets.pl), the fields "statistic 1"
and "statistic 2" should be correctly filled with the list of authorised
value categories
2/ Edit subfields for a biblio and authority framework.
The "Authorized value" dropdown list should be correctly filled on both
pages
3/ Create new items search fields (from the administration area), same
as previously, the authorised value category dropdown list should be
correctly filled
4/ Add and edit patron attribute types, check the authorised value
category list.
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Andreas Roussos [Sat, 10 Sep 2016 11:41:54 +0000 (14:41 +0300)]
Bug 7039 - Link to existing record from result list in acquisition search
In the Staff client -> Acquisitions, when creating orders from
existing records the result list should link to the existing
records so that it's possible to check for existing items.
This patch adds that functionality.
Test plan:
1) In the Staff client, go to Acquisitions and try to add an order
from existing records.
2) Observe that the titles in the Summary column are not hyperlinks.
3) Apply the patch.
4) Repeat step 1), and confirm that the titles are now links
pointing to each biblio's details page.
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>
Josef Moravec [Tue, 4 Oct 2016 11:57:03 +0000 (13:57 +0200)]
Bug 17397: Show name of librarian who created circulation message
Test plan:
1) Apply the patch
2) Update DB structure
3) Run update_dbix_class_files.pl
4) Select patron for checking out
5) Try to add some circulation and opac messages
6) Note that now there is creator (you ;) ) shown by every message added (with link to creator profile)
7) Try to delete messages to confirm that everything works as expected
Signed-off-by: Sonia Bouis <koha@univ-lyon3.fr> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Josef Moravec [Thu, 21 Jul 2016 05:46:23 +0000 (07:46 +0200)]
Bug 16952: Czech language definitions for sorting in Zebra
Test plan:
1) Apply patch
2) Create new instance with parameter --zebralang cs
3) Insert some record with basic latin characters and some with "czech" characters (for example: "č" - should be sorted after "c", "š" - should be sorted after "s")
4) Try to search in katalog (staff and opac) and sort by other field then relevance - title or author for instance
5) Records should be sorted correctly by Czech rules
6) Look at code and confirm it is ok
Signed-off-by: radiuscz <radek.siman@centrum.cz> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I did not test this patch, but trust in the author and signoffer
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Wed, 24 Aug 2016 08:13:07 +0000 (09:13 +0100)]
Bug 16912: Update patron category enrolment fees
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Tue, 12 Jul 2016 07:31:01 +0000 (08:31 +0100)]
Bug 16912: Koha::Patrons - Move and rewrite tests for AddEnrolmentFeeIfNeeded
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Tue, 12 Jul 2016 07:30:13 +0000 (08:30 +0100)]
Bug 16912: Koha::Patrons - Move AddEnrolmentFeeIfNeeded to ->add_enrolment_fee_if_needed
This patch moves the code of the C4::Members::AddEnrolmentFeeIfNeeded
subroutine to the Koha::Patron->add_enrolment_fee_if_needed method.
The behavior should be unchanged.
Test plan:
1/ Define enrolment fee for 2 patron categories
2/ Create a patron using the first category
=> The patron should be charged
3/ Change the patron category to the other one
=> The patron should be charged again
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Nick Clemens [Fri, 3 Jun 2016 01:24:06 +0000 (21:24 -0400)]
Bug 16641: Update Novelist in OPAC to use updated call to fetch content
To test:
1 - Enable novelistselect content in the opac
2 - Find a record with novelist content, confirm it displays in tabs ro
above or below accoring to pref
3 - Find a record without novelist content, note you get an empty tab
4 - Apply patch
5 - Ensure results have not changed for items with content
6 - Ensure tab does not display for item with no content
Sponsored by:
Walla Walla Public Library (http://www.wallawallapubliclibrary.org/)
Los Gatos Library (http://www.losgatosca.gov/42/Los-Gatos-Library)
Bouzid Fergani [Wed, 12 Oct 2016 19:52:25 +0000 (15:52 -0400)]
Bug 16123 - Add unit tests
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Blou [Thu, 20 Aug 2015 15:52:03 +0000 (11:52 -0400)]
Bug 16123 - Display budget hierarchy in the budget dropdown menu used when placing a new order
When placing a new order, the budget dropdown will display the budget hierarchy.
TEST PLAN :
1. Go to the Administration module
2. Add a new budget (ie : Budget 2016)
3. Add a fund to this budget (ie : Book)
4. Add a child fund (ie : Adult fiction)
You will have this hierarchy :
Budget 2016
|____ Book
|_____ Adult fiction
5. Go to the Acquisition module
6. Select a vendor and create a new basket
7. Place an order
8. Check the budget dropdown menu
BEFORE PATCH
Book
Adult fiction
AFTER PATCH
Book
Adult fiction
Dropbown menu is hierarchical as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Marcel de Rooy [Fri, 14 Oct 2016 06:38:10 +0000 (08:38 +0200)]
Bug 17356: [QA Follow-up] Minor changes to skeleton.perl
Due to the way the snippet is run, there is no need to add a use for
C4::Installer or define $dbh (just like $DBVersion).
The suggested code is commented (column_exists is not defined).
Just as in updatedatabase, CheckVersion is called. The version number
does not need to contain 16.06; if we do so, we should update this
number each release. The XXX's work just fine.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Tue, 27 Sep 2016 07:30:12 +0000 (08:30 +0100)]
Bug 17356: Add atomic update .perl skeleton file
To show devs how it should be written.
Test plan:
% cp installer/data/mysql/atomicupdate/skeleton.perl
installer/data/mysql/atomicupdate/bug_XXXXX.perl
% perl installer/data/mysql/updatedatabase.pl
You should see:
DEV atomic update: bug_xxxxx.perl
Upgrade to 16.06.00.XXX done (Bug XXXXX - description)
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Very good. I'll submit a patch for the readme to make the instructions better.
Signed-off-by: Liz Rea <liz@catalyst.net.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Jonathan Druart [Mon, 24 Oct 2016 15:04:11 +0000 (17:04 +0200)]
Bug 17428: (QA followup) Remove warning
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Martin Renvoize [Wed, 12 Oct 2016 21:31:30 +0000 (21:31 +0000)]
Bug 17428: [REST] best practice followup
This followup alters a few area's to be aligned more closely with
RESTfull best practices:
* PUT should always be full objects, and not partial updates (use PATCH
for partials)
* Validate query parameters instead of blindly passing them to the model
* Functional Change: Convert filter params from 'equality' to 'starts with'
matching
* Update tests to check for swagger validation errors instead of koha exceptions
* Mark 'id' as readOnly so swagger may prevent, via validation, id
changes.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch introduces full CRUD for Koha::Cit(ies|y) classes through
the REST api. To test, point your browser to /api/v1/cities to use
HTTPRequester/Postman (or the like).
And of course, run the unit tests:
- Apply the patches
- Update your minified swagger file:
$ cd kohaclone/
$ misc/devel/minifySwagger.pl -s api/v1/swagger/swagger.json \
-d api/v1/swagger/swagger.min.json
- Run:
$ prove t/db_dependent/api/v1/cities.t
=> SUCCESS: Tests should return green, and no warnings.
- Sign off :-D
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Claire Gravely <claire_gravely@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch adds the swagger definitions for the /cities endpoint
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch introduces unit tests for the cities endpoint.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Julian Maurice [Thu, 13 Oct 2016 12:48:38 +0000 (14:48 +0200)]
Bug 13323: 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>
Julian Maurice [Mon, 1 Feb 2016 10:47:17 +0000 (11:47 +0100)]
Bug 13323: QA fix (trailing whitespace)
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, 18 Nov 2014 16:07:45 +0000 (17:07 +0100)]
Bug 13324: The fund values should be based on tax included values
Now we have a column in DB to easily retrieve the tax included values.
So the sum must be done this the _tax_included DB field and not on the
"old" field.
The old field can be tax excluded or tax included depending the supplier
configuration.
Test plan:
Verify that the values in the acqui home and budgets page are the tax
included values.
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>
Julian Maurice [Thu, 13 Oct 2016 14:05:16 +0000 (16:05 +0200)]
Bug 13321: Fix table display in invoice page
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 [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>