Jonathan Druart [Mon, 5 Feb 2018 20:48:03 +0000 (17:48 -0300)]
Bug 20144: [sql_modes] Add default value for subscription_numberpatterns.description in tests
Fix for:
Field 'description' doesn't have a default value
t/db_dependent/AdditionalField.t
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 5 Feb 2018 20:38:32 +0000 (17:38 -0300)]
Bug 20144: [sql_modes] Remove HAVING clause in GetLateOrders
More attention needed here!
Fix for:
Non-grouping field 'quantity' is used in HAVING clause
Having is useless, and certainly slower
t/db_dependent/Acquisition.t
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 5 Feb 2018 20:22:05 +0000 (17:22 -0300)]
Bug 20144: [sql_modes] Set default value for Acccountline in TestBuilder
Fix for:
Data too long for column 'proccode'
t/db_dependent/Accounts.t
FIXME LATER - It's a varchar(4), must be integer!
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 5 Feb 2018 20:17:11 +0000 (17:17 -0300)]
Bug 20144: [sql_modes] Fix default value for statistics.itemnumber
Must be an integer, not empty string
Fix for:
Incorrect integer value: '' for column 'itemnumber'
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 5 Feb 2018 19:24:56 +0000 (16:24 -0300)]
Bug 20144: [sql_modes] Add a value for borrower_attribute_types.description in tests
Fix for:
Field 'description' doesn't have a default value
t/db_dependent/Koha/Patron/Attribute/Types.t
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 5 Feb 2018 19:21:43 +0000 (16:21 -0300)]
Bug 20144: [sql_modes] Shorten items.barcode
It's a varchar(20)
Fix for:
Data too long for column 'barcode'
t/db_dependent/Koha/Items.t
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 5 Feb 2018 19:20:05 +0000 (16:20 -0300)]
Bug 20144: [sql_modes] Correct quotes.timestamp values in tests
Fix for:
Incorrect datetime value: '0000-00-00 00:00:00' for column 'timestamp'
t/db_dependent/Koha/GetDailyQuote.t
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 5 Feb 2018 19:09:31 +0000 (16:09 -0300)]
Bug 20144: [sql_modes] Add default values for export_format columns
Fix for:
Field 'field_separator' doesn't have a default value
Field 'encoding' doesn't have a default value
field_separator and subfield_separator are only used for MARC csv
profiles, no need to specify a default value
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 5 Feb 2018 18:51:03 +0000 (15:51 -0300)]
Bug 20144: [sql_modes] Set auth_header.marcxml to an empty string in tests
Fix for:
Field 'marcxml' doesn't have a default value
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 5 Feb 2018 18:46:51 +0000 (15:46 -0300)]
Bug 20144: [sql_modes] Set missinglist and recievedlist in subscriptionhistory
Fix for:
Field 'missinglist' doesn't have a default value
t/db_dependent/Koha/Acquisition/Booksellers.t
from mysql doc:
BLOB, TEXT, GEOMETRY, and JSON columns cannot be assigned a default
value.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 5 Feb 2018 18:39:49 +0000 (15:39 -0300)]
Bug 20144: [sql_modes] Fix date format in tests
Fix for:
Incorrect date value: '01-01-2013' for column 'startdate'
Incorrect date value: '01-01-2016' for column 'budget_period_enddate'
Incorrect date value: '30-11-2013' for column 'enddate'
Incorrect date value: '31-12-2015' for column 'budget_period_enddate'
Incorrect date value: '12-31-2015' for column 'budget_period_enddate'
Incorrect date value: '01-01-2014' for column 'entrydate'
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 5 Feb 2018 18:36:27 +0000 (15:36 -0300)]
Bug 20144: [sql_modes] Set default value for aqbasket.is_standing
Fix for:
Column 'is_standing' cannot be null
t/db_dependent/Koha/Acquisition/Booksellers.t
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 5 Feb 2018 18:32:28 +0000 (15:32 -0300)]
Bug 20144: [sql_modes] Fix datatype for aqbasket.authorisedby
It's defined as a VARCHAR(10) in DB, but it is expecting a
borrowernumber instead
Fix for
Data too long for column 'authorisedby'
Must be a FK but first a borrowernumber
Need to update kohastructure for the comment?
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 5 Feb 2018 18:21:26 +0000 (15:21 -0300)]
Bug 20144: [sql_modes] Set default value for Aqbookseller in TestBuilder
Fix for:
Out of range value for column 'tax_rate'
t/db_dependent/Koha/Acquisition/Basket.t
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 5 Feb 2018 17:51:43 +0000 (14:51 -0300)]
Bug 20144: [sql_modes] Fix generated value for account_offsets.amount
Fix error:
Out of range value for column 'amount'
DBD::mysql::st execute failed: Out of range value for column 'amount' at
row 1 [for Statement "INSERT INTO `account_offsets` ( `amount`,
`debit_id`, `type`) VALUES ( ?, ?, ? )" with ParamValues:
0=7925469795795194609664.000000, 1='10', 2='Manual Debit'] at
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 5 Feb 2018 17:41:48 +0000 (14:41 -0300)]
Bug 20144: [sql_modes] Fix default value for statistics.amount
Must be an integer, not empty string
Fix for:
Data truncated for column 'value'
Found with
t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 5 Feb 2018 17:33:45 +0000 (14:33 -0300)]
Bug 20144: [sql_modes] Set a default value for lowestPriority
Fix for:
Field 'lowestPriority' doesn't have a default value
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Mark Tompsett [Thu, 26 Oct 2017 01:28:10 +0000 (21:28 -0400)]
Bug 19530: Added commentary for last test when prove -v
Before patch, prove -v had no comment for the last test.
After patch, it says something in line with second last test.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Wed, 25 Oct 2017 18:24:18 +0000 (14:24 -0400)]
Bug 19530: Prevent multiple transfers from existing for one item
We have found multiple open branch transfers for a given item. While I'm not sure how it is happening at this point, it seems that it would make sense to cancel any existing branch transfers when initiating a new one.
Test Plan:
1) prove t/db_dependent/Circulation/transfers.t
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
David Bourgault [Thu, 21 Dec 2017 15:20:48 +0000 (10:20 -0500)]
Bug 19466: Warn about conflicting settings of autoMemberNum and BorrowerMandatoryField for cardnumber
Changes the appearance of the cardnumber entry field in memberentrygen.tt
The "Leave empty for autocalc" message has been moved to the hint div
under the input field. If AutoMemberNum and BorrowerMandatoryField
interfere with each other, the auto calc hint is replace by a warning
telling the user that auto calc has been disabled.
Cardnumber should now correctly appear as mandatory if marked as such
in BorrowerMandatoryField.
Test plan:
0] Apply patch
1} Disable AutoMemberNum, remove cardnumber from BorrowerMandatoryField
2) Edit or create a patron, scroll down to cardnumber input field
Hint is some form of "Cardnumber must be this long"
Cardnumber input is not marked as required
There is no mention of auto calc
3> Enable AutoMemberNum
Hint includes "Leave empty for auto calc" message
4~ Add cardnumber to BorrowerMandatoryField
Hint warns you that your sysprefs are conflicting.
Cardnumber input is marked as required
5: Disable AutoMemberNum
Hint is some form of "Cardnumber must be this long"
Cardnumber input is marked as required
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Fri, 22 Dec 2017 08:07:50 +0000 (09:07 +0100)]
Bug 19301: (QA follow-up) Add POD, use statements and correct typo
Add POD for new sub in Koha/IssuingRules.pm.
Adding use Koha::IssuingRules to opac-detail and opac-MARCdetail.
Adding use Koha::Items to opac-detail and opac-MARCdetail.
Correct typo $items => $item in opac-MARCdetail.pl.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 11 Sep 2017 19:02:19 +0000 (16:02 -0300)]
Bug 19301: Move C4::Reserves::OnShelfHoldsAllowed to get_onshelfholds_policy
Following the pattern introduced by bug 19300, we are going to move the
OnShelfHoldsAllowed logic to Koha::IssuingRules->get_onshelfholds_policy
Test plan:
Make sure the onshelfholds policy is correct when placing a hold
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Fri, 15 Dec 2017 09:49:44 +0000 (10:49 +0100)]
Bug 4319: (QA follow-up) Use ReservableItems in all scripts
[1] Call CountItemsIssued or hasItemswaitingOrInTransit when needed only.
[2] Add this logic to ISBD and MARC detail too, since they also use
this include.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Confirming that Place hold now comes up if you have a waiting item and
circulation rule == If any unavailable.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Fri, 15 Dec 2017 09:09:29 +0000 (10:09 +0100)]
Bug 4319: (QA follow-up) Consistency in IsAvailableForItemLevelRequest
[1] For consistency going back to IsItemOnHoldAndFound in this sub.
This call is used in the on_shelf_holds == 2 case too.
The routine will be refactored quite soon.
Adding the else branch for on_shelf_holds == 0 for more clarity.
[2] Removing the test for found==F in reserves. In Koha F is only used
when the hold is filled and moved to oldreserves.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Alex Arnaud [Tue, 3 Oct 2017 14:50:36 +0000 (14:50 +0000)]
Bug 4319: [OPAC] Allow holds on waiting/transit items
Test plan:
- Checkout an item
- Place hold on this item,
- Return the item
- Make sure the hold is waiting (found W) and AllowOnShelfHolds is
not to 'Allow'
- Check that the button "Place hold" appears in opac detail page of
the biblio
- do the samewith items/reserves in transit
Changes on C4::Reserves::IsAvailableForItemLevelRequest
Make sure this tests pass:
- t/db_dependent/Reserves.t
- t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Tue, 13 Feb 2018 14:33:12 +0000 (15:33 +0100)]
Bug 20189: Fix style on the authentication page
Needed when logging out and in again..
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Victor Grousset <victor.grousset@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Tue, 13 Feb 2018 14:53:48 +0000 (15:53 +0100)]
Bug 20187: (QA follow-up) Replace N,L flag by L flag
The flags [N,L] make no sense: next and last combined.
Choosing here for L to stop the rewriting process.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Victor Grousset <victor.grousset@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Tue, 13 Feb 2018 13:20:24 +0000 (13:20 +0000)]
Bug 20187: New rewrite rules can break custom css
Koha has the ability to include custom css in the apache configuration.
If a library has any custom css ( or adds a custom js file in some way ),
and that file has an underscore in it ( e.g. my_custom.css ), the
apache rewrite rule will convert it to my.css and thus it will 404.
We should make the rewrite rules as specific as possible for the
format we are using.
Test Plan:
1) Set OPAC_CSS_OVERRIDE to a file with an underscore in it
2) Note it does not work
3) Apply this patch
4) Update the apache rewrite rules to match those in the patch
For kohadevbox, just run /home/vagrant/misc4dev/cp_debian_files.pl
5) Restart apache
6) Reload the page, your custom css should load now!
Signed-off-by: Victor Grousset <victor.grousset@biblibre.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Mon, 5 Feb 2018 15:30:48 +0000 (15:30 +0000)]
Bug 20135: Prevent staff client language choose pop-up from appearing off-screen
This patch fixes a bug which was introduced by Bug 19851 ("Improve
responsive layout handling of staff client menu bar."). The changes in
that patch did not take into account the effects it would have on the
language menus in the footer.
This patch adds some additional classes to some menus and adds some CSS
for those classes so that menus are correctly aligned left or right
based on their position on the screen.
To test, apply the patch and clear your cache if necessary. You should
have multiple translations installed and enabled, at least one of which
should have more than one "sub-language" (e.g. en-GB and en-US).
In the staff client, test the appearance of various drop-down menus with
the browser width above and below 800 pixels wide:
- Search and More menus in the header
- User/Library menu in the header
- Language selection in the footer
- Language selection in the header
In all cases, menus should look correct and should not be aligned in
such a way that they disappear off the left or right sides of the
screen.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 20 Dec 2017 16:17:50 +0000 (13:17 -0300)]
Bug 19671: Map itemtypes to hash for correct display in issues_stats.pl
To test:
1 - Run the circulation wizard with itemtypes as columns, shelving
locations as rows - display on screen
2 - Note all itemtype values are blank
3 - Switch rows/columns - same issue
4 - Apply patch
5 - Re-run reports
6 - Itemtypes should display correctly
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Thu, 8 Feb 2018 18:27:42 +0000 (18:27 +0000)]
Bug 20163: Position of NoLoginInstructions text is inconsistent
This patch modifies the markup for two login forms, making the markup
more consistent between them. The order of NoLoginInstructions, "Forgot
your password?" and "Don't have an account?" should now be the same.
This patch also updates some classes in each login form to allow for
more consistent custom styling. A couple of capitalization corrections
are included.
To test, enable the PatronSelfRegistration and OpacResetPassword
preferences. Put some text in the NoLoginInstructions preference.
View the login form as associated links on the OPAC main page. Compare
to the login form which appears in a modal window when you click the
login link at the top of the page. The two areas should look consistent.
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Mon, 11 Dec 2017 09:09:00 +0000 (10:09 +0100)]
Bug 19790: Add a db revision for existing installs
Since many installs may still have the additionalauthors kohafield,
this patch adds a dbrev in atomicupdate to clear it.
Test plan:
[1] Run updatedatabase. Check that you see no additionalauthors anymore
in marc_subfield_structure.kohafield.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Mon, 11 Dec 2017 08:39:37 +0000 (09:39 +0100)]
Bug 19790: Remove additionalauthors.author from installer files
In the upgrade from 2.2 to 3.0 (some time ago already) the table
additionalauthors has been dropped. Unfortunately, a reference to this
table has not been removed from the MARC framework installer files.
This patch clears kohafield for 700$a or 200$g in 32 installer files.
Note: The reference to additionalauthors in field kohafield is silently
ignored in AddBiblio/ModBiblio since the routines _koha_add_biblio,
_koha_add_biblioitem, _koha_modify_biblio and
_koha_modify_biblioitem_nonmarc simply do not use it. You can define a
Koha to MARC mapping for a biblio/biblioitem field but if the field is not
referenced in one of those routines, nothing happens..
Also note that C4::Items::_koha_modify_item does not hardcode all fields
and will respond to a new item mapping.
Test plan:
[1] Run a new install or verify somehow that the change to these sql files
is correct.
The change is a result of: sed -i -e "s/'additionalauthors.author'/''/g"
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Run a new install with MARC21 and English. This includes the mandatory
file marc21_framework_DEFAULT.sql. Verified that 700$a was inserted
correctly (without additionalauthors).
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 12 Feb 2018 20:35:53 +0000 (17:35 -0300)]
Bug 18403: Fix perlcritic on Koha::Patron
Perl::Critic found these violations in "Koha/Patron.pm":
"return" statement followed by "sort" at line 798, column 5. Behavior
is undefined if called in scalar context. (Severity: 5)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 12 Feb 2018 20:33:18 +0000 (17:33 -0300)]
Bug 18403: rename Koha::Patron->can to has_permission
I do not exactly why but there is a conflict in the name of the method
prove t/db_dependent/api/v1/patrons.t failed with
[Mon Feb 12 17:13:16 2018] [error] Can't use string ("TO_JSON") as a
HASH ref while "strict refs" in use at
/home/vagrant/kohaclone/C4/Auth.pm line 2053.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 7 Feb 2018 14:58:02 +0000 (11:58 -0300)]
Bug 20175: [sql_modes] (follow-up) Set a correct default value for club_enrollments.date_created
From comment 6:
"""
Can't recreate database, when creating table structure, I got:
there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT
or ON UPDATE clause
I am on mysql 5.5.59, which is still default in jessie, more timestamp
columns are possible from mysql 5.6.5:
https://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-5.html
"""
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 5 Feb 2018 17:22:59 +0000 (14:22 -0300)]
Bug 20175: [sql_modes] Set a correct default value for club_enrollments.date_created
0000-00-00 00:00:00 is not a valid timestamp.
It will fix the installer and upgrade process
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Wed, 7 Feb 2018 17:23:56 +0000 (17:23 +0000)]
Bug 20155: (follow-up) Compiled CSS
This patch contains the compiled opac.css file.
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Owen Leonard [Wed, 7 Feb 2018 17:17:34 +0000 (17:17 +0000)]
Bug 20155: Improve readability of OPAC header language menu
This patch makes some minor HTML and CSS changes in order to make the
header's language-chooser menu more readable and consistent with the
Lists menu.
To test, apply this patch and the patch with the compiled CSS.
- Install and enable more than one translation.
- Set the OpacLangSelectorMode to either "top" or "both top and footer."
- View the OPAC's header menu and confirm that the links and menus look
correct whether or not a user is logged in.
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Marcel de Rooy [Thu, 12 Oct 2017 10:19:11 +0000 (12:19 +0200)]
Bug 19451: Add no_overwrite option to borrowers-force-messaging-defaults.pl
This option allows you to add preferences only when they are not yet
present. In other words: skip patrons that already set their prefs.
Test plan:
[1] Delete all borrower messaging prefs for a patron.
[2] Run borrowers-force-messaging-defaults.pl -no-overwrite -doit
Verify that the patron now has default msg preferences.
[3] Change his settings and make them non-default.
For instance, increase days in advance.
[4] Run borrowers-force-messaging-defaults.pl -no-overwrite -doit
Verify that the patron still has the non-default settings.
[5] Run borrowers-force-messaging-defaults.pl -doit
Verify that the patron msg prefs have been overwritten.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
If the borrowernumber is defined in query, it starts to get information
about previous borrower and the new one is taken into account fully on
second page reload
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Josef Moravec [Fri, 18 Aug 2017 10:58:51 +0000 (10:58 +0000)]
Bug 15752: (QA follow-up) Inform user that patron was automatically switched
Test plan:
1) Start checking out to some patron - there should be no message about
auto switching
2) read the another patrons card - note the patron is switched and there
is a message about it at top of the main page content
Followed test plan, patch worked as described. Passed QA test tool Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Josef Moravec [Fri, 18 Aug 2017 10:20:40 +0000 (12:20 +0200)]
Bug 15752: (follow-up) Search for patrons only if param barcode is defined
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Chad Billman [Thu, 21 Jan 2016 15:59:01 +0000 (10:59 -0500)]
Bug 15752: Automatically switch to patron when cardnumber is read during circulation
With this syspref enabled scanning a patron barcode into the item
barcode field during circulation will redirect you to the patron's
circulation page.
This allows circulation with only a barcode scanner.
Testing:
- Enable the AutoSwitchPatron syspref
- Navigate to a patron's check out screen
- Enter a patron barcode into the "Enter item barcode" field
Result
- Browser should be redirected to the entered patron
Signed-off-by: Joel <aloi54@live.fr>
Followed test plan, patch works as described Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Having a Template Toolkit statements inside the javascript
translation function _() prevents it from being picked for
translation.
The only example of such is the course reserve delete prompt.
Move the TT statement outside the string.
Test plan:
1) Update and install language xx-YY. Check that the msgids
"Are you sure you want to delete this course? There is %s attached item."
and
"Are you sure you want to delete this course? There are %s attached items."
do not exist in the xx-YY-staff-prog.po
2) Check the translated file
intranet-tmpl/prog/fi-FI/modules/course_reserves/course-details.tt
It should have two prompt texts above in English
3) Install patch
4) Update the language. Check that the msgids show up in
xx-YY-staff-prog.po, translate them, and install the language.
5) Repeat 2, the prompts should now show up in the correct language.
6) Enable UsecourseReserves
7) Go to Home -> Course reserves
8) Create a new course, and add reserves to it
9) See the course details. Click on Delete course, the prompt
should be correctly translated
10) Remove all but one of the reserves from the course
11) Repeat 9
To see if there are other such TT statements:
rgrep -E '\b_\("[^"]*\[%' koha-tmpl/
Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Roch D'Amour <roch.damour@inlibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 20054: Remove attribute "text/css" for <style> element in OPAC
Conformance rules for HTML5 is generating warnings for <style> element
with type="text/css" attribute when the OPAC page is checked
with W3C Validator.
Test plan
=========
1/ Click the "Tag cloud" link on the OPAC. Paste the URL to your OPAC
page (if it is hosted) to W3C Validator and watch the warning about
type attribute "text/css".
2/ Apply patch and re-submit the page to the Validator. The warning
will be gone.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: maksim <maksim@inlibro.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 9 Feb 2018 14:17:37 +0000 (11:17 -0300)]
Bug 20157: Group search groups together
We do not actually need 2 groups, the previous feature worked for both
OPAC and STAFF interface.
The only difference was the "show_in_pulldown" feature.
Here we are going to REMOVE this feature for ergonomic reasons. We will
already have 3 features and it will surcharge the interface to add
another one. Moreover the feature will have to be applied at the OPAC
(and so will add lot of JS checks to keep data consistent: only useful
if ft_search_groups_opac is set).
Moreover it is quite easy to remove entry from the dropdown list in
JavaScript.
If people was really using this feature, we will re-add it, just let us
know.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Wed, 7 Feb 2018 19:44:28 +0000 (19:44 +0000)]
Bug 20157: Use group 'features' to decide which groups to use for group searching functionality
Instead of basing the group searches on the group name, which is an
inherently touchy system, we should use the same checkbox style that
Jonathan introduced for the patron limits by group feature.
Test Plan:
1) Check to ensure existing group searches still show as they used to
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 2 Feb 2018 17:23:42 +0000 (14:23 -0300)]
Bug 20133: Enable/disable the "Hide patron information" feature per group of libraries
In order to control this feature correctly it needs to be enabled for
group of libraries and not for all groups defined in the system.
Groups will be used for different usages and so the feature must not be
enabled by default for all of them.
Test plan:
Retest bug 18403 with the feature turned on/off for a given tree
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 2 Feb 2018 17:21:49 +0000 (14:21 -0300)]
Bug 20133: UI Changes
Add a checkbox to enable/disable the feature for given group of
libraries.
Important note: Only the top level node can turn the feature, the idea
is to avoid confusion, ease testing (by limiting the number of cases)
and force libraries to define one tree per feature (Maybe this is wrong,
but maybe good to start)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Kyle M Hall [Fri, 9 Feb 2018 13:51:02 +0000 (08:51 -0500)]
Bug 18403: Fix error triggered by subgroups being added to group
With one root group and two child groups and it works fine.
But if I create any groups under *those* groups, not only does it not work,
I get the following error:
Template process failed: undef error - SQL::Abstract::puke(): [SQL::Abstract::__ANON__]
Fatal: SQL::Abstract before v1.75 used to generate incorrect SQL when the -IN operator was
given an undef-containing list: !!!AUDIT YOUR CODE AND DATA!!! (the
upcoming Data::Query-based version of SQL::Abstract will
emit the logically correct SQL instead of raising this
exception) at /home/vagrant/kohaclone/Koha/Objects.pm line 269
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 10 Apr 2017 20:34:34 +0000 (17:34 -0300)]
Bug 18403: REST API - patrons endpoint
There is something wrond here, the userenv is no set and so we cannot
user search_limited.
Should we set the userenv or filter on the libraries using
libraries_where_can_see_patrons?
WAITING FOR FEEDBACK HERE.
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Mon, 10 Apr 2017 13:23:37 +0000 (10:23 -0300)]
Bug 18403: Guarantors
Technically a kid from your library group could have a guarantor
attached to another
group of library, let's deal with this case.
Test plan:
- Create a kid from your library group
- With a superlibrarian staff user create a guarantor that is outside of
the group of
libraries of the kid
- Login with a limited staff user and confirm that on the patron detail
page you do not
see the link to the guarantor detail page.
Note that you see the firstname and surname of the guarantor
Q. should it be hidden?
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 7 Apr 2017 20:53:35 +0000 (17:53 -0300)]
Bug 18403: Article requests
Same as previously but for article requests.
Test plan:
Test article requests and make sure you do not need the requests for
patrons that
are attached to a group that is not part of your library's group
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 7 Apr 2017 18:42:51 +0000 (15:42 -0300)]
Bug 18403: Patron discharges
This patch deals with patron's discharges.
Test plan:
Same as previously you will need to request dischages at the OPAC.
On the staff interface the logged in user should not be allowed to see
discharge
from patrons outside his library group.
The number of discharges waiting displayed on the mainpage should be
correct as well.
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>
Bug 18403: (follow-up) Patron discharges
Fix QA issue:
forbidden pattern: Do not assume male gender, use they/them instead (bug 18432) (line 150)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 7 Apr 2017 17:37:47 +0000 (14:37 -0300)]
Bug 18403: Patron reviews
This patch adds a new method Koha::Reviews->search_limited to return the
reviews
a logged in user is allowed to see depending his permissions.
Test plan:
Create some reviews at the OPAC and make sure a staff user is limited
(or not) to approve
or decline it.
The number of reviews displayed on the mainpage should be correct as
well.
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 7 Apr 2017 17:02:09 +0000 (14:02 -0300)]
Bug 18403: Patron modification requests
Limit patron's modifications based on logged in patron permissions.
Test plan:
Create some patron's modification requests at the OPAC
Make sure the logged in staff user see (or not) the modification depending his
permissions.
The number of modification displayed on the mainpage should be correct as well.
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Fri, 7 Apr 2017 17:00:34 +0000 (14:00 -0300)]
Bug 18403: Add new method Koha::Patron->can_see_patrons_from
Technical note:
Sometimes we do not have the patron object, for instance for the patron modifications
we will need to know if the logged in user can modify patron's from a given library.
This new subroutine 'can_see_patrons_from' will then be useful
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 6 Apr 2017 15:59:46 +0000 (12:59 -0300)]
Bug 18403: Refactor and add Koha::Patron->libraries_where_can_see_patrons
Technical note:
Here we are just refactoring a code that have been copied into 3 different places.
libraries_where_can_see_patrons is a terrible method's name, feel free to suggest
something better. The method return a list of branchcodes to be more efficient,
instead of Koha::Libraries
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Thu, 6 Apr 2017 15:42:03 +0000 (12:42 -0300)]
Bug 18403: Add new methods Koha::Patrons->search_limited and use it where needed
Most of the time when we search for patrons we do not want to search for all patrons,
but just the ones the logged in user is allowed to see the information.
This patch takes care of that by adding a new search_limited method to Koha::Patrons.
When called this method only search for patrons that the logged in user is allowed
to see.
Test plan:
Patron autocomplete search should be limited
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 5 Apr 2017 20:04:36 +0000 (17:04 -0300)]
Bug 18403: Use patron-title.inc when hidepatronname is used [SPECIFIC for issuehistory]
On this page we do not have the patron object sent to the template,
let's pass it!
Test plan:
Go on the checkout history of a bibliographic record
(catalogue/issuehistory.pl)
You should not see patron's information that are not part of your group
if you
are not allowed to see them.
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 5 Apr 2017 19:43:41 +0000 (16:43 -0300)]
Bug 18403: Use patron-title.inc when hidepatronname is used
There is already a HidePatronName syspref to hide patron's information
on bibliographic
record detail pages and the hold list.
Test plan:
With the HidePatronName enabled, make sure the patron's information are
hidden from
the catalogue and hold list pages. If the logged in user is not allowed
to see the
patron's info, no link and no cardnumber will be displayed
With he HidePatronName disabled, make sure the patron's information are
displayed
if the logged in user is allowed to see the patron's info.
Technical note:
This patch improves the existing patron-title.inc include file to
display patron's
information. Using it everywhere patron's details are displayed will
permit to
homogenise the way they are displayed. The file takes now a patron
object (what
should be, in the future, the only way to use it), that way we can call
the new
method on it to know if patron's information can be shown by the logged
in used.
NOTE: I am not sure this syspref makes sense anymore. Should not we
remove it?
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 5 Apr 2017 17:11:02 +0000 (14:11 -0300)]
Bug 18403: Only display libraries from group in dropdown lists
From where patrons it's about patrons, we do not want to display the libraries
from all the system, but only the ones from the group.
Test plan:
- See the overdues (circ/overdue.pl) and make sure you can only see overdues from
patrons part of your group (do not forget to test the CSV export).
- Search for patrons, the 'library' filters (headers and left side) should only
display libraries from your group
- Search for article request by patron's library: only the libraries from your
group should be displayed
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Jonathan Druart [Wed, 5 Apr 2017 16:19:42 +0000 (13:19 -0300)]
Bug 18403: Adapt patron search
This patch modifies the patron search code to limit the libraries to the
ones
the logged in user is allowed to access
Test plan:
Search for patrons
You should not see patrons you are not allowed to see.
Technical note:
I am really glad to have refactored all the patron searches before
having to
write this patch. It tooks me ~40 l to acchieve this job and affect all
patron searches.
Thanks refactoring!
Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>