koha.git
8 years agoBug 13696: Add support for Font Awesome icons in Koha
Kyle M Hall [Wed, 11 Feb 2015 12:24:24 +0000 (07:24 -0500)]
Bug 13696: Add support for Font Awesome icons in Koha

Font Awesome is similar to Glyphicons included in Twitter Bootstrap,
except better in every way and more Free.

Test Plan:
1) Apply this patch
2) Edit the template for a page, and add a Font Awesome tag to it,
   examples can be found here:
   http://fortawesome.github.io/Font-Awesome/examples/
3) Reload the page and verify the icon displays.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14982: Remove C4::Dates from guided report wizard and dictionary
Marc Véron [Thu, 8 Oct 2015 17:34:56 +0000 (19:34 +0200)]
Bug 14982: Remove C4::Dates from guided report wizard and dictionary

This patch removes C4::Dates from files:
- reports/guided_reports.pl
- reports/dictionary.pl
- C4/Reports/Guided.pm

To test:
- Go to Home > Reports > Guided reports wizard
- Then go to 'View Dictionary' (menue at teh left)
- Click 'New definition' and step through
- In step 2. select e.g. borrowers
- In step 3 select a date field
- In step 4, select date range and test start / end dates
- In step 5, verify that dates display properly
- Save and verify that dates are insertet properly in sql definition

- Go back to Home > Reports > Guided reports wizard
- Step through the wizard and verify that it works as before.

http://bugs.koha-community.org/show_bug.cgi?id=14982
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14961: Remove C4::Dates from files reports/*_stats.pl
Marc Véron [Mon, 5 Oct 2015 21:34:38 +0000 (23:34 +0200)]
Bug 14961: Remove C4::Dates from files reports/*_stats.pl

Remove C4::Dates from following files:

- reports/acquisitions_stats.pl
- reports/borrowers_stats.pl
- reports/reserves_stats.pl
- reports/serials_stats.pl
- reports/issues_avg_stats.pl
- reports/issues_stats.pl

To test:
- Go to Home > Reports
- Verify that following reports work as before:
  - Other > Average loan time
  - Statistic wizards
    - Acquisitions
    - Patrons
    - Circulation
    - Serials
    - Holds

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14824: Fix sorting of Norwegian vowels
Magnus Enger [Tue, 15 Sep 2015 08:24:44 +0000 (10:24 +0200)]
Bug 14824: Fix sorting of Norwegian vowels

Currently, Norwegian vowels are not sorted correctly, even when
you have chosen "nb" as the ZEBRA_LANGUAGE during installation.

To test:
- Make sure you have three records with titles that begin with ÆØÅ
  respectively
- Do a search that turns up those three records and some others, and
  sort the results by title, bot ascending and descending.
- Verify that ÆØÅ is shown in some weird order.
- Edit your sort-string-utf.chr* so it is in line with the current
  patch. It should include these two lines:
  lowercase {0-9}{a-z}æøå
  uppercase {0-9}{A-Z}ÆØÅ
- Restart Zebra and reindex all the records, e.g.:
  $ sudo koha-restart-zebra <instancename>
  $ sudo koha-rebuild-zebra -f -v <instancename>
- Do the search again, make sure you order by title and check that
  ÆØÅ are sorted in the order of 1. Æ 2. Ø 3. Å, and after all other
  characters

* = If you are on a gitified install, you need to edit this file:
/etc/koha/zebradb/lang_defs/<your ZEBRA_LANGUAGE>/sort-string-utf.chr
NOT the file in your git clone (yeah, i wasted some time there...)

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: (QA followup) remove warnings
Tomas Cohen Arazi [Mon, 26 Oct 2015 14:18:04 +0000 (11:18 -0300)]
Bug 14778: (QA followup) remove warnings

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Make Search.t pass - replace SHOW COLUMNS
Jonathan Druart [Mon, 26 Oct 2015 13:59:06 +0000 (13:59 +0000)]
Bug 14778: Make Search.t pass - replace SHOW COLUMNS

For an unkown reason, when executed from a test file, the 'SHOW COLUMNS'
statement does not return anything.
We need to retrieve the column list from the DBIx::Class resultset.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14106: (RM followup) sick of failing tests in Jessie
Tomas Cohen Arazi [Sat, 24 Oct 2015 01:58:05 +0000 (22:58 -0300)]
Bug 14106: (RM followup) sick of failing tests in Jessie

This patch adds the original fix for source installs too...

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Remove t/Acquisition/Invoices.t
Jonathan Druart [Tue, 20 Oct 2015 14:42:53 +0000 (15:42 +0100)]
Bug 14778: Remove t/Acquisition/Invoices.t

Using Test::DBIx::Class now, we cannot do what we did in this file with DBD::Mock.
Since the Invoice[s] subroutines are already tested in
t/db_dependent/Acquisition/Invoices.t there is no special needs to have
these ones.
Instead of loosing 2 hours on this file, I would prefer to remove it.
Feel free to provide a counter patch.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Mock the dbh for t/db_dependent/Search.t
Jonathan Druart [Tue, 20 Oct 2015 14:37:40 +0000 (15:37 +0100)]
Bug 14778: Mock the dbh for t/db_dependent/Search.t

No need to mock the items' columns (?)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Make Barcodes_ValueBuilder.t db dependent
Jonathan Druart [Tue, 20 Oct 2015 13:45:11 +0000 (14:45 +0100)]
Bug 14778: Make Barcodes_ValueBuilder.t db dependent

The get_barcode subroutines call very mysql specific functions and it's
not possible to easily use fixtures here.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Install fixtures for t/SocialData.t
Jonathan Druart [Tue, 20 Oct 2015 13:21:45 +0000 (14:21 +0100)]
Bug 14778: Install fixtures for t/SocialData.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Install fixtures for t/Members_AttributeTypes.t
Jonathan Druart [Tue, 20 Oct 2015 13:10:18 +0000 (14:10 +0100)]
Bug 14778: Install fixtures for t/Members_AttributeTypes.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Install fixtures for t/Matcher.t
Jonathan Druart [Tue, 20 Oct 2015 12:52:37 +0000 (13:52 +0100)]
Bug 14778: Install fixtures for t/Matcher.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Install fixtures for t/Letters.t
Jonathan Druart [Tue, 20 Oct 2015 12:46:46 +0000 (13:46 +0100)]
Bug 14778: Install fixtures for t/Letters.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Install fixtures for t/Koha.t
Jonathan Druart [Tue, 20 Oct 2015 12:02:15 +0000 (13:02 +0100)]
Bug 14778: Install fixtures for t/Koha.t

Warning: This patch modifies a module!
What's the need of the binary function here?
The data are case insensitive, so no need to use this mysql function.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Install fixtures for t/ItemType.t
Jonathan Druart [Tue, 20 Oct 2015 11:48:37 +0000 (12:48 +0100)]
Bug 14778: Install fixtures for t/ItemType.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Install fixtures for t/Images.t
Jonathan Druart [Tue, 20 Oct 2015 11:44:55 +0000 (12:44 +0100)]
Bug 14778: Install fixtures for t/Images.t

Note that this tests file were completely buggy before.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Install fixtures for t/Biblio.t
Jonathan Druart [Thu, 15 Oct 2015 15:05:14 +0000 (16:05 +0100)]
Bug 14778: Install fixtures for t/Biblio.t

Note that it already passed before

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Install fixtures for t/Calendar.t
Jonathan Druart [Thu, 15 Oct 2015 15:44:32 +0000 (16:44 +0100)]
Bug 14778: Install fixtures for t/Calendar.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Use mock_dbh where it should be used
Jonathan Druart [Tue, 20 Oct 2015 10:48:00 +0000 (11:48 +0100)]
Bug 14778: Use mock_dbh where it should be used

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Mocks Koha::Database->_new_schema instead of C4::Context->_new_dbh
Jonathan Druart [Tue, 20 Oct 2015 11:03:54 +0000 (12:03 +0100)]
Bug 14778: Mocks Koha::Database->_new_schema instead of C4::Context->_new_dbh

C4::Context::_new_dbh does not exist anymore.
Koha::Database::_new_schema should be mocked instead.

Will fix:
- t/00-load.t
- t/Breeding.t
- t/ImportBatch.t
- t/Message.t
- t/Overdues.t
- t/Prices.t
- t/RotatingCollections.t
- t/Search.t
- t/SuggestionEngine_AuthorityFile.t
- t/XSLT.t

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Example - Replace DBI::Mock with Test::DBIx::Class - Sitemapper.t
Jonathan Druart [Thu, 8 Oct 2015 10:40:43 +0000 (11:40 +0100)]
Bug 14778: Example - Replace DBI::Mock with Test::DBIx::Class - Sitemapper.t

We can use Test::DBIx::Class to install fixtures before our tests.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Set PrintError as it was before
Jonathan Druart [Thu, 8 Oct 2015 10:40:19 +0000 (11:40 +0100)]
Bug 14778: Set PrintError as it was before

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Make the installer test pass - use DBI missing
Jonathan Druart [Thu, 8 Oct 2015 10:39:41 +0000 (11:39 +0100)]
Bug 14778: Make the installer test pass - use DBI missing

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Make 3 tests pass
Jonathan Druart [Thu, 8 Oct 2015 10:39:19 +0000 (11:39 +0100)]
Bug 14778: Make 3 tests pass

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Make sure the dbh returned is checked by DBIC
Jonathan Druart [Fri, 4 Sep 2015 11:23:44 +0000 (12:23 +0100)]
Bug 14778: Make sure the dbh returned is checked by DBIC

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14778: Get rid of DBIx::Connector
Jonathan Druart [Thu, 3 Sep 2015 14:11:21 +0000 (15:11 +0100)]
Bug 14778: Get rid of DBIx::Connector

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10363: Fix Updatedb entry on MariaDB
Jonathan Druart [Fri, 23 Oct 2015 13:20:17 +0000 (14:20 +0100)]
Bug 10363: Fix Updatedb entry on MariaDB

With MariaDB, I get the following error:

ERROR 1832 (HY000): Cannot change column 'av_id': used in a foreign key
constraint 'authorised_values_branches_ibfk_1'

The solution would be to remove the constraints, modify the columns and
finally reintroduce the foreign keys.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14918: [QA Follow-up] Correct enddate and use constant
Marcel de Rooy [Fri, 23 Oct 2015 06:47:58 +0000 (08:47 +0200)]
Bug 14918: [QA Follow-up] Correct enddate and use constant

Corrected enddate (subtraction in the revised code must be an addition).
Replaced hardcoded 2 days by a constant.
Renamed the constant TWO_DAYS to PULL_INTERVAL.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested all three date formats.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14918: Remove C4::Dates from circ/pendingreserves.pl
Jonathan Druart [Thu, 1 Oct 2015 09:08:56 +0000 (10:08 +0100)]
Bug 14918: Remove C4::Dates from circ/pendingreserves.pl

This patch uses Koha::DateUtils instead of C4::Dates and Date::Calc. It
also sent DateTime objects to the template, which use the TT plugin to
display them.
If an invalid dates is entered, the default date is picked.

Test plan:
1/ Go to Home > Circulation > Holds to pull
2/ Verify that the the filter and the list behave as before
3/ Enter invalid dates and confirm that you do not get a software error

Counter patch works as expected and is a much cleaner solution.
Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14776: Remove 'selfcheck' patron related links from and add language selector...
Marc Véron [Tue, 20 Oct 2015 16:53:12 +0000 (18:53 +0200)]
Bug 14776: Remove 'selfcheck' patron related links from and add language selector to SCO header

The SCO screen displays patron related menu items in it's header (Link to the account and "Logout").
This makes no sense since the patron that is logged in is the 'selfcheck' user as defined in syspref AutoSelfCheckId.
Additionally, the language menue is missing when the syspref OpacLangSelectorMode is set to 'top' or to 'both'.

To test:
- Apply on top of Bug 15039
- Set AutoSelfCheck sysprefs as appropriate
- Set OpacLangSelectorMode to 'top' or 'both'
- Go to SCO page
- Verify that the language menue does not display in the header
- Enter a card number to check out (this logs in the SCO user)
- Verify that you get text similar to "Welcome, checkout" with a link to the sco user's account in the OPAC and a 'Logout' link
- Apply patch
- Verify that the language menu appears and the SCO user's information disappears.
- Verify, that the language menu displays / does not display with combinations of:
  - opaclanguagedisplay (Allow)
  - opaclanguages ( > 1 language selected)
  - OpacLangSelectorMode (top or both)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15037: Correctly check the patron categories on displaying the Batch checkout tab
Jonathan Druart [Wed, 21 Oct 2015 13:08:05 +0000 (14:08 +0100)]
Bug 15037: Correctly check the patron categories on displaying the Batch checkout tab

When checking for the patron categories allowed to use the batch
checkout, the comparison should be strict (eq).

Test plan:
0/ Do not apply this patch
1/ Create 2 patron categories ST and S
2/ Enable BatchCheckouts and define BatchCheckoutsValidCategories = S
3/ Create 2 patrons, 1 in the ST category and the other one in S
4/ On the patron detail page, you should see the "batch checkout" tab
for both patron
5/ Apply this patch
6/ The tab should only be displayed for the patron S

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Tested using an 'S' patron and allowing 'ST' patrons only, worked as expected.
Also tried setting &batch=1 to force it to show the batch page, and it says
I'm not allowed to do batch checkouts for that patron. Great!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14981: Remove ethnicity occurrences from sample patrons file
Jonathan Druart [Thu, 8 Oct 2015 16:19:47 +0000 (17:19 +0100)]
Bug 14981: Remove ethnicity occurrences from sample patrons file

Bug 10020 has removed these columns, the should be removed from the
patron sample file.

Test plan:
Insert the files updated by this patch into a fresh DB, you shouldn't
get any error.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Before applying the patch, I was able to notice the error when loading the
  patron sample SQL file to a DB. With the patch, it's solved.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15021: Fix scoping variable in tools/batchMod.pl
Jonathan Druart [Fri, 16 Oct 2015 08:45:30 +0000 (08:45 +0000)]
Bug 15021: Fix scoping variable in tools/batchMod.pl

$tagslib is used in subroutines and should be declare as global.

Test plan:
On the Batch item modification page, all item fields should be listed, not only the title.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Works as expected

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14674: [QA Follow-up] Typos and textual adjustment
Marcel de Rooy [Wed, 21 Oct 2015 11:02:31 +0000 (13:02 +0200)]
Bug 14674: [QA Follow-up] Typos and textual adjustment

This patch does:

[1] Resolve error [koha-create: line 294: local: `=upload21': not a valid
    identifier] by replacing $instance by instance.
[2] Resolved typo for 'specify'.
[3] Resolve error: [sed: -e expression #26, char 20: unknown option to `s']
    by replacing the slash in the sed line by a #. This makes sed not
    stumble over the slashes in the upload path.
[4] Added the aspect of permanent storage in the wording (as opposed to
    the storage of temporary uploads in /tmp or similar).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Verified that koha-create now inserts the right path in koha-conf.xml.
Verified that koha-create-dirs created the new uploads directory.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14674: koha-create should populate upload_path
Tomas Cohen Arazi [Tue, 20 Oct 2015 14:34:49 +0000 (11:34 -0300)]
Bug 14674: koha-create should populate upload_path

This patch makes koha-create and koha-create-dirs aware of the new upload_path
configuration entry.

It defaults to /var/lib/koha/<instance>/uploads as proposed by Robin but lets the
user specify its own directory, using the --upload-path option switch that is
added by this patch.

koha-create-dirs is tweaked so it also creates this new directory.

The docs are updated accordingly.

To test:
- Apply the patch, have a packages setup (either by grabbing the relevant files [1]
  or by creating your own package).
- Run koha-create --create-db instance
=> SUCCESS: /var/lib/koha/instance/uploads directory is created
=> SUCCESS: /etc/koha/sites/instance/koha-config.xml has upload_path set correctly
- Create a new instance using the --upload-path making it point to whatever you want
=> SUCCESS: koha-conf.xml points to your chosen path
- Sign off :-D

Regards

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Does not work in its current state. Needs a follow-up.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years ago Bug 12194: (QA followup) remove useless diags
Tomas Cohen Arazi [Fri, 23 Oct 2015 12:53:20 +0000 (09:53 -0300)]
 Bug 12194: (QA followup) remove useless diags

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 12194: followup to fix test
Bernardo Gonzalez Kriegel [Thu, 22 Oct 2015 18:28:50 +0000 (15:28 -0300)]
Bug 12194: followup to fix test

This patch adds new column 'oblique_title' to tested
data structure, and update number of tests

To test:
1) Run prove t/db_dependent/Labels/*, or specifically
prove t/db_dependent/Labels/t_Layout.t

It fails

2) apply the patch
3) Run test again, this time must pass

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 5685: (RM followup) opac.less and opac.css out of sync
Tomas Cohen Arazi [Fri, 23 Oct 2015 12:44:21 +0000 (09:44 -0300)]
Bug 5685: (RM followup) opac.less and opac.css out of sync

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15052: Add diagnostic for the TestBuilder tests
Jonathan Druart [Fri, 23 Oct 2015 08:32:18 +0000 (09:32 +0100)]
Bug 15052: Add diagnostic for the TestBuilder tests

Sometimes t/db_dependent/TestBuilder.t fails with 'TestBuilder can
create a entry for every sources' but we don't know which ones have
failed.

Test plan:
Create the following file: Koha/Schema/Result/Test.pm
 package Koha::Schema::Result::Test;
 use base 'DBIx::Class::Core';
 __PACKAGE__->table("test");
 1;

If you don't have a table named 'test' in your DB,
  prove t/db_dependent/TestBuilder.t
should return a failure, but without any explanation.
With this patch you should get a diag and know what's wrong.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 13590: (QA followup) wording change
Tomas Cohen Arazi [Fri, 23 Oct 2015 12:34:47 +0000 (09:34 -0300)]
Bug 13590: (QA followup) wording change

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 13590: (RM followup) DBIx update
Tomas Cohen Arazi [Thu, 22 Oct 2015 17:51:11 +0000 (14:51 -0300)]
Bug 13590: (RM followup) DBIx update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 13590: DBRev 3.21.00.041
Tomas Cohen Arazi [Thu, 22 Oct 2015 17:22:43 +0000 (14:22 -0300)]
Bug 13590: DBRev 3.21.00.041

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 13590: Add missing th in tfoot
Jonathan Druart [Thu, 15 Oct 2015 10:33:35 +0000 (11:33 +0100)]
Bug 13590: Add missing th in tfoot

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 13590: Add ability to charge fines at start of charge period
Kyle M Hall [Fri, 16 Jan 2015 14:07:48 +0000 (09:07 -0500)]
Bug 13590: Add ability to charge fines at start of charge period

Right now, Koha only charges fines at the end of a given charge period.
For example, let us assume a circulation rule has a charge period of one
week ( 7 days ) and a fine of $5. This means that an item can be overdue
for 6 days without accruing a fine. Koha should allow circulation rules
to be configured to place the charge at the start of the end of the
charge period so the library can decide when the fine should accrue.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) prove t/db_dependent/Circulation_Issuingrule.t
4) prove t/db_dependent/Circulation.t
5) prove t/db_dependent/Fines.t
6) Ensure you can still create/edit circulation rules

Edit: I removed the DBIx changes after a couple minutes fighting with them.
Will regenerate as usual in a RM followup / Tomas

Signed-off-by: Daniel Grobani <dgrobani@samuelmerritt.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15039: Move top language menu to include and streamline logic
Marc Véron [Tue, 20 Oct 2015 15:03:16 +0000 (17:03 +0200)]
Bug 15039: Move top language menu to include and streamline logic

The language menu in koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc is used at other places as well (see Bug 14776).

This patch moves it to a file masthead-langmenu.inc to make it re-usable.

Additionally it streamlines the logic (not all combinations of Opac sysprefs that should display the menu did so).

To test:
- Apply patch
- Verify, that the language menu displays / does not display with combinations of:
  - opaclanguagedisplay (Allow)
  - opaclanguages ( > 1 language selected)
  - OpacLangSelectorMode (top or both)
- Verify that sysprefs opacuserlogin and EnableOpacSearchHistory do not interfere
  with the lenguage menu (before, at least one of them had to be on to display the menu)
- Verify that language switching works as before.

Signed-off-by: Chris Kirby <christopherlawrencekirby@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 11139: Add support for multiple values in AdvancedSearchTypes
Julian Maurice [Thu, 1 Oct 2015 13:13:20 +0000 (15:13 +0200)]
Bug 11139: Add support for multiple values in AdvancedSearchTypes

AdvancedSearchTypes syspref can be multivalued, opac-topissues.pl
have to support that.

AdvancedSearchTypes can have one or more of the following values:
'itemtypes', 'ccode', 'loc'.  But this patch adds support only for
itemtypes and ccode.  AdvancedSearchTypes can still contain 'loc' but it
will change nothing to the behaviour of opac-topissues.pl.

This patch also removes duplicate code in template (the "Refine your
search" form was written in two different places)
This introduces a small behaviour change: when there is no results,
instead of having the form in the center of the page, it remains in the
left sidebar and we have a "No results" message in the main area.

Depends on bug 14788

Tested on top of 14788. Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14788: Add unit tests for GetTopIssues
Julian Maurice [Mon, 5 Oct 2015 09:02:35 +0000 (11:02 +0200)]
Bug 14788: Add unit tests for GetTopIssues

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14788: Move opac-topissues.pl code into C4::Circulation
Julian Maurice [Fri, 4 Sep 2015 14:19:28 +0000 (16:19 +0200)]
Bug 14788: Move opac-topissues.pl code into C4::Circulation

Tested with syspref 'AdvancedSearchTypes' set to itemtypes an ccode (one at a time).
No problems found.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10937: (RM followup) DBIx update
Tomas Cohen Arazi [Thu, 22 Oct 2015 14:11:49 +0000 (11:11 -0300)]
Bug 10937: (RM followup) DBIx update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10937: DBRev 3.21.00.040
Tomas Cohen Arazi [Thu, 22 Oct 2015 14:05:45 +0000 (11:05 -0300)]
Bug 10937:  DBRev 3.21.00.040

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10937: Fix Seach Type in Advanced Search
Blou [Fri, 21 Aug 2015 13:01:47 +0000 (09:01 -0400)]
Bug 10937: Fix Seach Type in Advanced Search

In order to see the checkboxes of the Collection and Shelving location of the advanced search, the if changed so that only the Itemtypes will go through the previous if

8 years agoBug 10937: cleanup and rename DOCTYPECAT to ITEMTYPECAT
Blou [Thu, 9 Jul 2015 13:22:20 +0000 (09:22 -0400)]
Bug 10937: cleanup and rename DOCTYPECAT to ITEMTYPECAT

- "Item" and not "Document" is the word used throughout Koha.
- Moved the updates to an atomic update
- changed searchcategory from varchar(20) to (80)
- cleanup

8 years agoBug 10937: Option to hide and group itemtypes from advanced search
ahmed [Wed, 21 Jan 2015 19:33:47 +0000 (14:33 -0500)]
Bug 10937: Option to hide and group itemtypes from advanced search

This allows to group certain item types in a category, to be displayed (and searched) as such in OPAC's advanced search.  For example, you can group Reserve 2h and Reserve 12h into a Reserve category.  The 2 and 12h types won't appear anymore.
This also allows to simply prevent an item type from displaying as a search option.

TEST PLAN
------------------
0) Back up database, so you can reset and retest easily. ;)
1) Apply the patch
2) Run Koha QA tool.
3) prove -v t/db_dependent/Koha.t
  -- all tests should pass.
  4) run ./installer/data/mysql/updatedatabase.pl to add the
  two columns to itemtypes
  -- Does a meaningful message get printed?
  Are the columns added?
  "DESCRIBE itemtypes;" should list hideinopac and searchcategory.
  5) You need to add a category to group your item types:
  a) In Intranet/Koha Admin/Authorized values,
  select DOCTYPECAT in the 'Show category:' dropdown
  i) If you do not have a DOCTYPECAT category, create one.
  b) Click button "New authorized value for DOCTYPECAT"
  c) Enter
  Authorized value: HARDWARE
  Description : Hardware
  Description (OPAC): Hardware
  6) Group your items under that new category
  a) In Intranet/Koha Admin/Item types, choose (at least)
  two item types and for each:
  - Click action/Edit on the right column
  - Third row (below Description) is the Search category list box, select Hardware
  - click Save changes at the bottom
  7) Select at least one item to be hidden in the OPAC search
  a) In Intranet/Koha Admin/Item types (again), choose a different item type:
  -  Click action/Edit
  -  Click the checkbox "Hide in OPAC" below the list of icons.
  8) Go test your modifications
  a) Go to OPAC/Adv search.
  b) Validate that all items modified above (hidden or grouped) do not appear in Item type list
  c) Validate that new item type Hardware does appear instead.
  d) Select item Hardware, start Search.
  ) Validate returned items are the of the two types that were grouped into the Hardware category in step 4.

Sponsored-by: Vanier college
Signed-off-by: Nick <nick@quecheelibrary.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15042: Barcode hbyymmincr does not work when receiving serials
Magnus Enger [Wed, 21 Oct 2015 11:11:28 +0000 (13:11 +0200)]
Bug 15042: Barcode hbyymmincr does not work when receiving serials

To test:
- Set autoBarcode = <branchcode>yymm0001
- Make sure you have a serial that is set to "create an item record
  when receiving this serial"
- Receive an issue
- Click in the barcode field - nothing happens
- Apply patch and reload page
- Receive an issue
- Click in the barcode field - a barcode conforming to the
  hbyymmincr setting appears

Patch works as advertised.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 12194: (RM followup) DBIx update
Tomas Cohen Arazi [Thu, 22 Oct 2015 13:34:13 +0000 (10:34 -0300)]
Bug 12194: (RM followup) DBIx update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 12194: DBRev 3.21.00.039
Tomas Cohen Arazi [Thu, 22 Oct 2015 13:24:15 +0000 (10:24 -0300)]
Bug 12194: DBRev 3.21.00.039

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 12194: fix label for oblique_title
Jonathan Druart [Thu, 22 Oct 2015 07:58:06 +0000 (08:58 +0100)]
Bug 12194: fix label for oblique_title

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 12194: Add change to kohastructure.sql
Jonathan Druart [Thu, 22 Oct 2015 07:57:40 +0000 (08:57 +0100)]
Bug 12194: Add change to kohastructure.sql

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 12194: Add option 'Oblique title' in labels
Bernardo Gonzalez Kriegel [Fri, 26 Jun 2015 19:13:52 +0000 (16:13 -0300)]
Bug 12194: Add option 'Oblique title' in labels

This patch adds a checkbox on Label creator
to use or not an oblique variant of main font
for title

Also fix font selection for title in case an
oblique variant is used.

To test:
Before patch
1) Go to Tools > Label creator
2) Create a new layout, default values but select
any 'Oblique' variant for main font and
'Biblio/Barcode' for layout type
3) Go to Manage batches, create a batch, add items,
export PDF, download
4) Check logs, you must find a line with
'ERROR in koha-conf.xml -- missing <font type="COO">'
for example if main font Courier-Oblique

5) Open PDF, title could be right but not using selected font

After patch
6) Apply the patch
7) Run updatedatabase.pl
8) Repeat 1-2, note new checkbox 'Oblique title',
default checked
9) Repeat export, no new warnings on log
10) Create a new layout or edit an existent one,
uncheck 'Oblique title', save, export again
Check PDF has non slanted title

Followed test plan, works as expected. (See comment #11).
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 12194: add more tests for pdf creation
Dobrica Pavlinusic [Mon, 28 Jul 2014 15:38:00 +0000 (17:38 +0200)]
Bug 12194: add more tests for pdf creation

When run with KEEP_PDF enviroment variable it will keep
test.pdf for manual inspection. This can be used to verify
that ttf font configuration is complete like:

KEEP_PDF=1 KOHA_CONF=/etc/koha/sites/srvgit/koha-conf.xml prove t/Creators.t

sample of utf-8 text, font name and type will be on bottom of second page

Followed test plan, works as expected. (See comment#11)
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15027: Correct Type in C4::Items perldoc
Mark Tompsett [Mon, 19 Oct 2015 13:26:11 +0000 (09:26 -0400)]
Bug 15027: Correct Type in C4::Items perldoc

As noted in the bug report, there is a typo.
This corrects that typo in documentation.

TEST PLAN
---------
1) perldoc C4::Items
2) Find GetItemsForInventory
   -- note that status is spelt incorrectly.
3) Apply patch
4) repeat steps 1-2
   -- note that status is spelt correctly now.
5) git diff origin/master
   -- note only that line changed.
6) run koha qa tools

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  This typo patch could hit the highway to master at high speeds.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Amended patch: add a comma at the end of the line
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 12197: enforce the maxreserves preference when staff members place hold requests
Kyle M Hall [Tue, 6 May 2014 15:32:02 +0000 (11:32 -0400)]
Bug 12197: enforce the maxreserves preference when staff members place hold requests

This patch ensures that the global maxreserves preference is enforced
when staff members place hold requests.

For example:

Create 3 items to place holds on. Set the circulation rule to allow 50
holds for all items. Set maxreserves to 2. Place a hold on 3 different
items. On the third item, it will give a warning, but you can still
place the hold. Despite what the circulation rule is set for (which is
only a specific case rule), maxreserves is a global rule and
should stop this from happening, not just give a warning.

Test Plan:
1) Reproduce the bug by following the steps above
2) Verify the bug exists
3) Apply this patch
4) Verify the librarian cannot place the hold now
5) Enable AllowHoldPolicyOverride
6) Verify the librarian can forcefully place the hold

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12197: (follow-up) rename variable for greater clarity

"maxreserves" was referring both to the system preference and to the
condition of having exceeded the number of hold requests allowed.

This patch renames a variable to remove the ambguity.

Test plan:

* Same as the main patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 11250: "too many holds" message appears inappropriately
Kyle M Hall [Thu, 2 Jul 2015 09:29:06 +0000 (05:29 -0400)]
Bug 11250: "too many holds" message appears inappropriately

This patch gives the various reasons precedence in this order:
1) Already in possesion
2) Already on hold
3) Age restricted
4) No items available
5) Too many holds

Test Plan:
1) Attempt to place a hold where both "too many holds" and "no items available" messages display
2) Apply this patch
3) Refresh
4) Note only the "no items available" message displays

Signed-off-by: Heather Braum <hbraum@nekls.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15012: use sudo instead of su in koha-shell
Jonathan Druart [Wed, 14 Oct 2015 13:45:24 +0000 (13:45 +0000)]
Bug 15012: use sudo instead of su in koha-shell

Not sure this is the best way to fix it but it looks to work.

Test plan:
  sudo koha-shell kohadev
should not return any error
Without this patch, you should get
  bash: cannot set terminal process group (-1): Inappropriate ioctl for device
  bash: no job control in this shell

Confirm that other options work as before

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Works as expected. Tested on kohadevbox:ansible.
KOHA_CONF and PERL5LIB are correctly set on the child shell.
Bonus point: koha-shell doesn't die if the user issues Ctrl+C to abort an execution.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10363: (QA followups) Fix tests
Jonathan Druart [Wed, 21 Oct 2015 14:44:30 +0000 (15:44 +0100)]
Bug 10363: (QA followups) Fix tests

The delete op is now "delete" and the confirmation is a JS dialog box.

Note that now this patch removes the categories the tests will add (to
avoid error on inserting duplicate).

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14900: Add ability to pay all fees at once from circulation screen
Josef Moravec [Fri, 25 Sep 2015 15:21:28 +0000 (17:21 +0200)]
Bug 14900: Add ability to pay all fees at once from circulation screen

Test plan:
1) Go to circulation screen for patron which has some not-payed charges (or make same if needed)

2) You should see infromation about fees and charges with ability to pay it. Note there is new link for paying all charges at once

3) Try the new link, you should be redirected to members/paycollect.pl, check if there is right amount and try to pay charges

4) try the old link to make sure it works still well after this patch

Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14154: 608$9 defined twice in UNIMARC biblio-koha-indexdefs.xml
Fridolin Somers [Wed, 6 May 2015 07:14:42 +0000 (09:14 +0200)]
Bug 14154: 608$9 defined twice in UNIMARC biblio-koha-indexdefs.xml

In DOM config file :
etc/zebradb/marc_defs/unimarc/biblios/biblio-koha-indexdefs.xml, the 608$9 is
defined a second time instead of 610$9.  Just a type I think.

Test plan :
- Apply patch
- Install a UNIMARC + DOM instance
- Define in a framework 610 using a thesaurus
- Create a new biblio
- Create a new authority (same type as the thesaurus defined above)
- Index : rebuild_zebra.pl -a -b -x -z
- Link the field 610 to the new authority
- Index : rebuild_zebra.pl -a -b -x -z
- In authorities search, search for the new authority
=> You see Use in 1 Records(s)

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  I confirm the typo.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14871: Extend the patrons search to search like %$term% (checkout tab)
Jonathan Druart [Tue, 22 Sep 2015 14:04:14 +0000 (15:04 +0100)]
Bug 14871: Extend the patrons search to search like %$term% (checkout tab)

The patrons search used by the checkout tab and the autocomplete is not
the same as the "search patrons" tab.
The main difference is the "contain" vs "start with".
So that if you have a patron with a patron with a surname "foo bar" and
you search for "foo bar", the autocomplete and the result of a search by
the checkout tab will search for "foo%" or "bar%" which won't return the
patron you are search for.

This patch replaces both autocomplete and checkout tab searches with a
"contain" search. The search will be "%foo%" or "%bar%".
Note that on big DB, this can cause unexpected results.

Test plan:
Create a patron with a surname "foo bar"
Search for "bar" using the checkout tab.
You should see the patron in the autocomplete result and the result page
after submitting the search form.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14045: Add missing th in tfoot
Jonathan Druart [Thu, 15 Oct 2015 10:28:04 +0000 (11:28 +0100)]
Bug 14045: Add missing th in tfoot

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 8417: Fix test
Jonathan Druart [Tue, 20 Oct 2015 15:35:18 +0000 (16:35 +0100)]
Bug 8417: Fix test

ModReceiveOrder now excepts a date formatted following the dateformat
pref.
If nothing is given, default is now.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoTranslation files update
Bernardo Gonzalez Kriegel [Mon, 19 Oct 2015 20:39:38 +0000 (17:39 -0300)]
Translation files update

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14676: (QA followup) Fix case problems carried from the past
Tomas Cohen Arazi [Tue, 20 Oct 2015 18:18:53 +0000 (15:18 -0300)]
Bug 14676: (QA followup) Fix case problems carried from the past

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14676: (QA followup) Make title, breadcrumbs and labels consistent
Tomas Cohen Arazi [Tue, 20 Oct 2015 18:13:02 +0000 (15:13 -0300)]
Bug 14676: (QA followup) Make title, breadcrumbs and labels consistent

It does so by slightly changing the naming schema, in line with bug 14667
changes.

It also corrects a minor bug in the breadcrumbs for printer profiles.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14676: (QA followup) remove useless patroncards-menu.inc file
Tomas Cohen Arazi [Tue, 20 Oct 2015 17:37:50 +0000 (14:37 -0300)]
Bug 14676: (QA followup) remove useless patroncards-menu.inc file

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 14676: UI/UX improvements to patron card creator
Liz Rea [Thu, 13 Aug 2015 23:14:41 +0000 (11:14 +1200)]
Bug 14676: UI/UX improvements to patron card creator

Reasoning

Librarians will be doing patron card things in the following frequencies, from most frequent to least frequent:
1. Creating new patron card batches - every day/every few days
2. Managing existing card batches - every day/every few days
3. Managing existing card layouts - as needed, infrequent
5. Managing existing card templates - as needed, infrequent
6. Creating new card layouts - as needed, infrequent
7. Creating new card templates - as needed, infrequent
8. Managing existing printer profiles - possibly once only!
9. Creating new printer profiles - possibly once only!

This change to the patron card creator aims to make the most frequently used items easily accessible at the top of the main area,
reduces clutter on the page, and makes the label creator fall in line with UI paradigms found elsewhere in Koha.
I think I've also improved the translatability here somewhat, please check that.

To test:

Open the patron card creator: More -> Tools -> Patron card creator
Note that the toolbar has changed. It should be consistent across all of the patron card creator (it is an include).

+ New menu:

patron card batch
1. make sure it looks ok - toolbar buttons are consistent at the top of the main block.
2. add patrons both by borrowernumber, and by search
3. note that the usual buttons have moved below the textarea, and now have icons.
4. delete and export single patrons using the buttons corresponding to each patron
5. select multiple and use the buttons above the table to remove and export selected patrons
6. export a full batch
7. deduplicate a batch
There should be no regressions in functionality.

Image
1. This menu item should take you directly to the upload/delete images interface
2. Upload an image, note success message is now below the form, eliminating the jumping box.
3. Delete single images using the buttons
4. Delete multiple images using the tickboxes and "Delete selected"
5. Not deletion success message is below the table, eliminating the jumping box.

Layout
1. This menu item should take you directly to the "Edit layout" screen.
2. no functional changes here.
3. note toolbar at top is consistent

Card template
1. this menu item should take you directly to the "Edit patron card template" page.
2. no functional changes here.
3. note toolbar at top is consistent.

Printer profile
1. this menu item should take you directly to the "Edit printer profile" page.
2. no functional changes here.
3. note toolbar at top is consistent.

+ Manage menu:

Card batches
1. This menu item should take you directly to the "currently available batches" page.
2. select a batch to edit using the buttons - it should take you to the editing interface
3. select a batch to delete using the buttons - it should ask for confirm.
4. select several batches using the tickboxes, and select Export selected. Batches should be exported as normal.
5. note toolbar at top is consistent.

Images (this is actually the same page as on the new menu, I included it in both because it does both functions - can change if requested)
1. This menu item should take you directly to the upload/delete images interface
2. Upload an image, note success message is now below the form, eliminating the jumping box.
3. Delete single images using the buttons
4. Delete multiple images using the tickboxes and "Delete selected"
5. Not deletion success message is below the table, eliminating the jumping box.

Layouts
1. This menu item should take you directly to the "currently available layouts" page.
2. select a layout to edit using the buttons
3. select a layout to delete using the buttons
4. note toolbar at top is consistent.

Card templates
1. This menu item should take you directly to the "currently available templates" page.
2. select a template to edit using the buttons
3. select a template to delete using the buttons
4. note toolbar at top is consistent.

Printer profiles
1. This menu item should take you directly to the "currently available profiles" page.
2. select a profile to edit using the buttons
3. select a profile to delete using the buttons
4. note toolbar at top is consistent

+ General
* note that sidebar now only has "labels home" instead of the full "manage" list. It seemed redundant with the toolbar tidied up.

Please note that I am happy to take suggestions/amendments to these changes.

Followed test plan, behaves as advertised.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 15029: Make the IssueSlip tests pass even if launched after 23:00
Jonathan Druart [Mon, 19 Oct 2015 15:17:31 +0000 (16:17 +0100)]
Bug 15029: Make the IssueSlip tests pass even if launched after 23:00

Prior to this patch, the tests did not pass if they were launched after
23:00.
DateTime complains if you ask for creating a date with hour => 24 (which
is logical so far).

Test plan:
0/ Don't apply this patch
1/ sudo date -s "2015-10-19 23:50:00";prove
t/db_dependent/Members/IssueSlip.t
2/ Apply this patch and repeat 1.

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>
8 years agoBug 8236: (QA followup) fix test count error due to bad merge
Tomas Cohen Arazi [Tue, 20 Oct 2015 13:52:20 +0000 (10:52 -0300)]
Bug 8236: (QA followup) fix test count error due to bad merge

On rebasing the patchset I introduced a wrong number of tests.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 11759: DBRev 3.21.00.038
Tomas Cohen Arazi [Tue, 20 Oct 2015 13:27:01 +0000 (10:27 -0300)]
Bug 11759: DBRev 3.21.00.038

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 11759: (QA followup) Sysprefs should be kosher
Tomas Cohen Arazi [Mon, 19 Oct 2015 18:19:28 +0000 (15:19 -0300)]
Bug 11759: (QA followup) Sysprefs should be kosher

The introduced syspref was defined before we added new guidelines
for them. This patch puts them in sync with current standards. It also
splits them into:

 - A big on/off switch (BatchCheckouts)
 - Patron category filter (BatchCheckoutsValidCategories)

The latter is expected to go away if we move this into a boolean column
on the 'categories' table, which seems a better approach. I'm filling a
new bug for this last comment.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 11759: (QA followup) minor text changes
Tomas Cohen Arazi [Tue, 20 Oct 2015 12:49:15 +0000 (09:49 -0300)]
Bug 11759: (QA followup) minor text changes

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 11759: (QA followup) Fix koha-qa errors
Kyle M Hall [Fri, 10 Apr 2015 13:42:18 +0000 (09:42 -0400)]
Bug 11759: (QA followup) Fix koha-qa errors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
8 years agoBug 11759: (follow-up) Some fixes
Jonathan Druart [Thu, 9 Apr 2015 08:18:47 +0000 (10:18 +0200)]
Bug 11759: (follow-up) Some fixes

This is a squash of the following patches:

Bug 11759: (follow-up) Prevent access to the batch checkout if not allowed

If a user pass '&batch=1' to the url, he was allowed to access to the
batch checkout page even if the patron is not in an authorised
category.

This patch also fixes the link to "Batch check out" from the "Details"
tab (cf changes in circ-menu.inc).

Bug 11759: FIX Javascript error

The following JS error occurred:
  ReferenceError: MSG_ADD_MESSAGE is not defined

The circulation.js file is useless and should not be included.

Bug 11759: FIX the alert message if an item is on hold.

If an item is on hold, the hold is not cancelled.
This patch corrects the message displayed in this case.

Bug 11759: FIX issue list is empty

The issue list is empty after checking an item out to a patron without
existing checkout.

To reproduce:
- Search for a patron without checkout.
- Check an item out using the "normal" checkout.
- Verify the checkout list contain the checkout.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
8 years agoBug 11759: Batch checkout - DB changes
Jonathan Druart [Fri, 14 Feb 2014 10:25:54 +0000 (11:25 +0100)]
Bug 11759: Batch checkout - DB changes

Add the new pref batch_checkouts in DB.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 11759: Add some css to highlight warnings and errors
Jonathan Druart [Fri, 14 Feb 2014 11:53:31 +0000 (12:53 +0100)]
Bug 11759: Add some css to highlight warnings and errors

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 11759: Add links to the new page
Jonathan Druart [Fri, 14 Feb 2014 10:25:30 +0000 (11:25 +0100)]
Bug 11759: Add links to the new page

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 11759: Batch checkout - Add the new template
Jonathan Druart [Fri, 14 Feb 2014 11:54:24 +0000 (12:54 +0100)]
Bug 11759: Batch checkout - Add the new template

This patch is the main patch.
It adds:
- the new template circ/circulation_batch_checkouts.tt
- the change into circ/circulation.pl

=== Why this feature is useful for some libraries? ===

Currently Koha does not allow to checkout several items at once to a
user. This can cause a waste of time when a user want to checkout more
than 10 items.

This development has been asked to have statistics on in-house use.
Every night, a librarian will enter a barcode list (from a file or a
scanner : the librarian scans the barcode of the documents that users
let on the tables). Barcodes will be added to a statistics patron in
order to count the number of items consulted.

The development has been expanded to cover another need: some special
libraries (BDP for "Bibliotheque departementale de pret": "Loan Regional
Library").
These libraries loan items to smaller libraries (municipal). The number
of items could be very important and the current way offered by Koha is
not adequate.

=== Test plan ===
0/ Apply all patches and execute the DB change entry.
1/ Verify you are abble to do some checkouts (with confirmations,
errors).

= Statistics way =
2/ Create a statistical patron (e.g. category code STATS).
3/ Update the batch_checkouts pref with the category code (STATS).
4/ Go on the member page and verify the new "Batch check out" tab
appears (and only for this user).
5/ Check some items out on the new page using the textarea or a file.
6/ Verify the table contains the item's information and the
"Information" column contains "Local use recorded".

= Real checkouts =
7/ Create a non statistical patron and update the pref.
8/ Check some items out on the new page using the textarea or a file.
9/ Verify the information in the table is consistent.
10/ Verify item without confirmation needed or impossible alert is
checked out.
11/ If the logged in user has the "force_checkout" permission, all
checkouts with a "confirmation needed" message can be done.
If the logged in user does not have it, there is no way to force the
checkout.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 11759: Batch checkout - prepare the ground
Jonathan Druart [Fri, 14 Feb 2014 11:57:47 +0000 (12:57 +0100)]
Bug 11759: Batch checkout - prepare the ground

This patch does not introduce any changes.
It prepares the circulation script to accept several barcodes in
parameter.
A loop is done on all barcodes (until now, only 1) to generate a
structure to sent to the template.
At the end, only the first generated data is sent.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 8417: Make the order receive date editable
Jonathan Druart [Tue, 31 Mar 2015 12:13:03 +0000 (14:13 +0200)]
Bug 8417: Make the order receive date editable

Currently the date of the order reception is the date of shipping date,
which is wrong.
This patch makes this date editable (with default is today).

Test plan:
1/ Create an order and receive it
2/ Confirm that you can edit the reception date and it's take into
account as the datereceived.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 8236: DBRev 3.21.00.037
Tomas Cohen Arazi [Mon, 19 Oct 2015 17:36:26 +0000 (14:36 -0300)]
Bug 8236: DBRev 3.21.00.037

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 8236: (QA followup) Tweak language, fix whitespace error
Kyle M Hall [Fri, 3 Apr 2015 14:02:04 +0000 (10:02 -0400)]
Bug 8236: (QA followup) Tweak language, fix whitespace error

Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
8 years agoBug 8236: Tests for Renewing policy in overdue or restriction case
Matthias Meusburger [Wed, 1 Apr 2015 13:05:36 +0000 (15:05 +0200)]
Bug 8236: Tests for Renewing policy in overdue or restriction case

 - Add tests in t/db_dependent/Circulation.t

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
8 years agoBug 8236: Renewing policy in overdue or restriction case
Lyon3 Team [Mon, 9 Mar 2015 15:24:20 +0000 (16:24 +0100)]
Bug 8236: Renewing policy in overdue or restriction case

This patch introduces 2 sysprefs :
    RestrictionBlockRenewing to allow/block renewal of items when patron is restricted.
    OverduesBlockRenewing to allow, block only the late ones or block all checked out items
    Default is "allow" in both case.

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 13636: DBRev 3.21.00.036
Tomas Cohen Arazi [Mon, 19 Oct 2015 15:48:36 +0000 (12:48 -0300)]
Bug 13636: DBRev 3.21.00.036

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10363: (follow-up) DB update - change in kohastructure.sql
Jonathan Druart [Mon, 5 Oct 2015 08:42:36 +0000 (09:42 +0100)]
Bug 10363: (follow-up) DB update - change in kohastructure.sql

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 13636: Change wording added vs inserted
Jonathan Druart [Mon, 5 Oct 2015 08:38:08 +0000 (09:38 +0100)]
Bug 13636: Change wording added vs inserted

http://bugs.koha-community.org/show_bug.cgi?id=10363

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10363: FIX regression - prevent duplicate
Jonathan Druart [Tue, 4 Aug 2015 13:43:20 +0000 (14:43 +0100)]
Bug 10363: FIX regression - prevent duplicate

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10363: FIX rebase conflict error
Jonathan Druart [Tue, 4 Aug 2015 13:24:50 +0000 (14:24 +0100)]
Bug 10363: FIX rebase conflict error

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10363: QA Follow-up - fixing POD and spelling
Katrin Fischer [Sun, 2 Aug 2015 18:34:35 +0000 (20:34 +0200)]
Bug 10363: QA Follow-up - fixing POD and spelling

We should stick with either AE (authorized) or
BE (authorised) spelling.

Corrected error messages to use authorized.

Also fixed tiny copy & paste error in POD.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
8 years agoBug 10363: (QA followup) DB update / atomic update
Tomás Cohen Arazi [Fri, 31 Jul 2015 15:41:48 +0000 (12:41 -0300)]
Bug 10363: (QA followup) DB update / atomic update

This patch just moves the DB update code into an atomicupdate file
to avoid nasty merge conflicts.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>