Jonathan Druart [Fri, 5 Feb 2016 10:46:28 +0000 (10:46 +0000)]
Bug 15746: Do not record individual payments with randomly picked libraries
When a payment is made individualy, the library used to record this
payment is randomly picked from the library list.
This is because C4::Branch::GetBranch looks at 1. the $branch variable
sent by the template, wich does not exist, then 2. the branchname
cookie, which does not exist neither, then 3. get the first branchcode
from a list of keys (non ordered).
To reproduce:
- Create a manual invoice for a patron
(members/maninvoice.pl?borrowernumber=XXXX)
- Pay this fine using the "Pay" button of the corresponding line from
the members/pay.pl?borrowernumber=XXXX page
Look at the statistics table:
select * from statistics order by datetime desc limit 10;
The branch value of the first line might not correspond to the library
you were using to pay the payment.
Test plan:
Apply this patch, repeat the steps above and confirm that the library
picked is now the one used to pay.
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Marcel de Rooy [Mon, 8 Feb 2016 13:58:56 +0000 (14:58 +0100)]
Bug 15756: Some tests for haspermission in C4::Auth
Test plan:
Run this new test.
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
All tests successful. koha-qa.pl run OK. Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Julian Maurice [Tue, 9 Feb 2016 10:16:55 +0000 (11:16 +0100)]
Bug 15764: Fix timestamp sent by KOCT
KOCT plugin send UTC timestamp, it should be converted to local timezone
Test plan:
1. Install latest version of KOCT and configure it
https://addons.mozilla.org/fr/firefox/addon/koct/
https://wiki.koha-community.org/wiki/Offline_circulation_firefox_plugin
2. Use it to do a checkout and a checkin. See that timestamps are UTC.
3. Click on "Commit to Koha" under "Log" tab
4. Wait for all operations to be processed
5. In Koha, go to Circulation > Offline circulation and check the
timestamps were correctly converted to the Koha server's timezone
6. Process the pending operations and see that timestamps are still
correct
7. Repeat step 2
8. Now click on "Apply directly"
9. Check the timestamps are correct in Koha
NOTE: I could not get "Commit to Koha" to work for me, but I did
confirm this corrected behaviour with "Apply directly".
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Using the "commit to Koha" option works fine for me.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch only affects service.pl, which is not used in any way by the
uploader for desktop client files. No changes to the desktop offline
circ will be needed.
Owen Leonard [Thu, 11 Feb 2016 17:06:39 +0000 (12:06 -0500)]
Bug 15790 - Don't delete a MARC framework if existing records use that framework
If a MARC framework is in use by any records it should not be possible
to delete it. Deleting a framework which is in use will leave the
deleted framework code in those records.
This patch modifies the deletion confirmation dialog so that it will not
let the user confirm the deletion if there are records using it.
Depends on Bug 15785 - Use Font Awesome icons in confirmation dialogs
To test, apply the patch and go to Administration -> MARC frameworks
1. Try to delete a framework which is in use by 1 or more records. The
resulting confirmation dialog should prevent you from proceeding.
2. Try to delete a framework which is not in use. Test both canceling
and confirming that deletion to make both function correctly.
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: Brendan Gallagher brendan@bywatersolutions.com
Owen Leonard [Thu, 11 Feb 2016 14:36:25 +0000 (09:36 -0500)]
Bug 15785 - Use Font Awesome icons in confirmation dialogs
We can simplify the staff client's CSS and reduce some image file usage
if we modify confirmation dialogs to use Font Awesome icons. This patch
makes this change for Administration templates.
This patch includes some whitespace changes, so please consider that
when looking at diffs.
To test, apply the patch and test deletion in the following cases. Test
both confirmation and cancel actions.
Administration -> Budgets -> Delete budget
Administration -> Funds -> Delete fund
Administration -> Authority types -> Delete authority type
Administration -> Authority types -> MARC Structure -> Delete tag
Administration -> Authority types -> MARC Structure -> Subfields -> Delete
Administration -> MARC bibliographic framework -> Delete framework
Administration -> MARC bibliographic framework -> MARC structure -> Delete
Administration -> Cities and Towns -> Delete city
Administration -> Classification sources -> Delete classification source
Administration -> Classification sources -> Delete classification filing rule
Administration -> Item types -> Delete
Administration -> Record matching rules -> Delete
Administration -> Patron attribute types -> Delete
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised. Icons changed
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Jonathan Druart [Wed, 13 Jan 2016 14:34:29 +0000 (14:34 +0000)]
Bug 13534: Do not remove tags on deleting a patron
On deleting a patron, all the tags approved by this user will be
deleted.
This can cause data lost.
Test plan:
0/ Do not execute the update DB entry
1/ Create 2 patrons A, B
2/ Create some tags with patron A logged in
3/ Approve them with patron B logged in
4/ Delete the 2 patrons
=> The tags have been deleted
5/ Execute the DB entry
6/ Repeat 1,2,3,4
=> The tags have not been deleted and are still shown on the interface
(result, detail, tags module)
Signed-off-by: Aleisha <aleishaamohia@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Lyon3 Team [Tue, 26 Jan 2016 11:40:11 +0000 (12:40 +0100)]
Bug 15643 - Every datepicker on serials expected date column updates top issue
delete 'expected' and 'supexpected' ids that don't seem useful anymore.
Same thing for changeDate2 function
Test plan :
1) Search a serial subscription from the Serials Home page
2)Go to serial collection page and make sure it has a mimimal bunch of
already received or missing issues
3)Check some received issues to be sure to get extra issues (not only
the extected one) in the serial edition page
4) Click on Edit serials button
5) Try to modify whatever date in 'Expected on' column (excepted first
one) using datepicker :
You can see that the top date of the column is updated instead of the
choosen one.
6) Apply patch and redo 1 to 5 steps :
now the right date is updated.
Followed test plan, 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: Brendan Gallagher brendan@bywatersolutions.com
Kyle M Hall [Fri, 22 Jan 2016 16:36:26 +0000 (16:36 +0000)]
Bug 15645 - In transit holds do not show as in transit on request.pl
A hold in transit will simply appear as an unfilled hold!
Test Plan:
1) Place a hold for pickup at a different location
2) Capture that hold for a patron
3) Note you do not see the in transit status on request.pl
4) Apply this patch
5) Refresh the page
6) The hold should now show as in transit!
Followed test plan, 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: Brendan Gallagher brendan@bywatersolutions.com
Jonathan Druart [Fri, 12 Feb 2016 09:07:09 +0000 (09:07 +0000)]
Bug 15736: Add ShowAllCheckins pref to control the display of checked-in item list on checking
Bug 14821 removed the items which were not checked out, but some
libraries considered it as a bug.
So let's add a new pref to control this behavior.
Test plan:
0/ Execute the updatedb entry and set ShowAllCheckins to "Do not show"
(default)
1/ Check an item in.
If the item was not checked out, it won't be listed
2/ Turn the pref to "Show"
3/ Check an item in
If the item was not checked out, it should be listed
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Jonathan Druart [Fri, 12 Feb 2016 14:33:57 +0000 (14:33 +0000)]
Bug 15810: Make sure the CGI->param is not called in a list context when creating private shelves
This patch fixes the following bug:
If OpacAllowPublicListCreation is set to "not allow", the creation of a
private list raises an error at the OPAC.
CGI->param is called in a list context and some parameters are not
filled from the template if the pref is set to "not allow".
To make sure we don't have a "Odd number of elements in anonymous hash",
we force the context to scalar.
Test plan:
1/ Set OpacAllowPublicListCreation to "not allow"
2/ Create private and public lists at the OPAC and the intranet
=> Everything should work fine with this patch applied
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Bug 15818 - OPAC search with utf-8 characters and without results generates encoding error
When searching for something in OPAC which doesn't result in any results but have utf-8
characters in search string we get following encoding error:
Cannot decode string with wide characters at /usr/lib/i386-linux-gnu/perl5/5.20/Encode.pm line 215.
This is because we are trying to decode string which is allready correctly
marked as utf-8.
Test scenario:
1) enter search string with utf-8 characters in opac which doesn't
return any results
2) verify that you get application error
3) apply this patch
4) re-run query and verify that errror is gone
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Step 0: Define "OPACNoResultsFound" with '{QUERY_KW}'
Note that I don't get the error (Encode 2.60) but the search terms are
not display correctly.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
The variable to be decoded comes from already decoded vars (via
the -utf8 flag from CGI), following the trail in Search.pm.
Kyle M Hall [Thu, 11 Feb 2016 10:43:40 +0000 (10:43 +0000)]
Bug 9021 [QA Followup] - Add additional message to deletion warning if provider is in use.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Kyle M Hall [Thu, 11 Feb 2016 06:53:15 +0000 (06:53 +0000)]
Bug 9021 [QA Followup] - Unit tests
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Kyle M Hall [Wed, 10 Feb 2016 10:28:37 +0000 (10:28 +0000)]
Bug 9021 [QA Followup] - Add column to deleted borrowers, set null on provider deletion
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Kyle M Hall [Wed, 10 Feb 2016 10:19:00 +0000 (10:19 +0000)]
Bug 9021 [QA Followup] - Add feedback to delete button if provider is being used
* Change links to buttons
* Add warning class to delete button if provider is being used
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Kyle M Hall [Tue, 9 Feb 2016 15:45:55 +0000 (15:45 +0000)]
Bug 9021 [QA Followup] - Switch to Koha::Object(s)
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Kyle M Hall [Tue, 9 Feb 2016 15:23:36 +0000 (15:23 +0000)]
Bug 9021 [QA Followup] - Use same color as circ rules editor for row highlighting
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Kyle M Hall [Tue, 9 Feb 2016 14:52:45 +0000 (14:52 +0000)]
Bug 9021 [QA Followup] - Fix ENGINE, don't create index on FK
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Kyle M Hall [Tue, 9 Feb 2016 14:47:13 +0000 (14:47 +0000)]
Bug 9021 [QA Followup] - Use Modern::Perl
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Kyle M Hall [Tue, 9 Feb 2016 14:45:51 +0000 (14:45 +0000)]
Bug 9021 [QA Followup] - Use TT plugin instead of passing syspref via script
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Mark Tompsett [Fri, 1 Jan 2016 05:30:40 +0000 (00:30 -0500)]
Bug 9021: Flag issues
Check in and check out were failing for me.
Specificly, the $borrower->{flags}->{...} was not accessible as
a hash, so I put a hash ref check around the code that would fail.
TEST PLAN
---------
1) Attempt a checkout
-- blows up with "1" not being allowed as a hash ref.
2) Apply patch
3) Attempt same checkout again
-- success
4) prove -v t/db_dependent/Circulation_dateexpiry.t
-- this triggers CanBookBeIssued
-- this should succeed
5) prove -v t/db_dependent/rollingloans.t
-- mine skipped the tests, but if configured, it
should also trigger and succeed.
6) run koha qa test tools
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Mark Tompsett [Thu, 31 Dec 2015 21:49:31 +0000 (16:49 -0500)]
Bug 9021: Schema update
This ensures that the DBIx structure matches the SQL structure changes.
See comment #48 as to how this was generated.
Also, I had to modify misc/devel/update_dbix_class_files.pl
to have an "overwrite_modifications => 1" option to get it to generate.
This should correct issues raised in comment #45.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Kyle M Hall [Tue, 26 Feb 2013 14:12:03 +0000 (09:12 -0500)]
Bug 9021 - Add SMS via email as an alternative to SMS services via SMS::Send drivers
Nearly all cellular providers allow a person to send an text message to a cellular
phone by sending an email to phonenumber@provider. We can leverage this capability
to add the ability for Koha to send sms messages to patrons without the need to
subscribe to an sms gateway server.
Basic plan:
1. Add a table sms_providers to the db to tell Koha what service providers are available, and what domain emails should be sent to.
2. Add borrowers.sms_provider_id to tell Koha which mobile service the patron subscribes to for the number given in smsalertnumber
3. Modify Koha to send an email rather than using SMS::Send if the driver is set to 'Email'
Test plan:
0) Get a mobile phone
1) Apply the patch
2) Run updatedatabase.pl
3) Set the value of SMSSendDriver to 'Email'
4) Go to the admin page, the "Additional parameters" area should now have the link "SMS cellular providers"
5) On this page, add some providers. Make sure to add the provider for your own cellular phone service.
Here are some examples:
Sprint phonenumber@messaging.sprintpcs.com
Verizon phonenumber@vtext.com
T-Mobile phonenumber@tmomail.net
AT&T phonenumber@txt.att.net
Only add the domain part in the 'domain' field. So for Verizon, that would be 'vtext.com'
6) Create an account for yourself, add your SMS number, and select your provider from the dropdown box directly below it.
7) Enable SMS messaging for Item check-in and Item checkout
8) Check out an item to yourself
9) Run process_message_queue.pl
10) Wait! You should receive a text message shortly, when I tested it, I received my sms message within the minute.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Aleisha [Wed, 6 Jan 2016 00:21:54 +0000 (00:21 +0000)]
Bug 15411: More changes
Changes to Italian and Polish sql files and catalogue help file.
TEST PLAN
---------
1) Confirm sql is valid and has Non-fiction.
> delete from auth_vals;
> source {appropriate file};
2) Staff -> Search -> Help
-- Confirm Non-fiction
3) Run koha qa test tools
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Aleisha [Tue, 22 Dec 2015 21:50:37 +0000 (21:50 +0000)]
Bug 15411: Changing 'Non fiction' to 'Non-fiction'
To test:
1) Apply patch
2) Run updatedatabase.pl
3) Go to advanced search in Staff Client (ie /cgi-bin/koha/catalogue/search.pl)
4) Confirm that it says 'Non-fiction' in the 'Any content' drop-down menu under 'Subtype limits'
5) Go to item search (ie /cgi-bin/koha/catalogue/itemsearch.pl)
6) Confirm that it says 'Non-fiction' under 'Collection code'
7) Go to advanced search in OPAC (ie /cgi-bin/koha/opac-search.pl) and click 'More options'
8) Confirm that it says 'Non-fiction' in the 'Content' drop-down menu
9) Go to the details page for a non-fiction book in the OPAC (ie /cgi-bin/koha/opac-detail.pl?biblionumber=2) and click 'Holdings' tab
10) Confirm that it says 'Non-fiction' under 'Collection' heading
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Jonathan Druart [Wed, 30 Dec 2015 17:15:31 +0000 (17:15 +0000)]
Bug 15446: Rename Koha::Object[s]->type with _type
In a few case (at least systempreferences and export_format (csv profiles),
the type method of Koha::Object and Koha::Objects can be in conflict with the
column names.
Indeed systempreferences.type exists and so the method will return
'Systempreference' (the name of the module) instead of the value of the row in
DB.
I have found at least 1 place where it can cause issue:
In C4::Context->set_preference:
601 my $syspref = Koha::Config::SysPrefs->find( $var );
602 my $type = $syspref ? $syspref->type() : undef;
603
604 $value = 0 if ( $type && $type eq 'YesNo' && $value eq '' );
type will always be 'Systempreference' and the YesNo pref will be set to an
empty string '' instead of 0.
I am not sure about the consequences of this, but it is preferable to
fix it ASAP.
To reproduce:
0/ Do not apply this patch
1/ Edit a YesNo prefs, AutoEmailOpacUser for instance
2/ Set it to "Don't sent"
3/ Check the value in DB, it should be set to an empty string, instead
of 0
4/ Apply this patch and try again. Now the value should be 0
Followed test plan, value is now 0 as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Jonathan Druart [Wed, 30 Dec 2015 17:11:45 +0000 (17:11 +0000)]
Bug 15446: Add tests
Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Jonathan Druart [Thu, 11 Feb 2016 10:16:12 +0000 (10:16 +0000)]
Bug 15760: Avoid SQL injections
Asking on #dbix-class, ribasushi told me to set quote_names to the
connection options.
Indeed it does the fix, globally :)
Test plan:
1/ Add the following snippet to the a script (mainpage.pl is a good candidate)
use Koha::Virtualshelves;
my $s = Koha::Virtualshelves->search({}, { order_by => '1,(select case when (3*2*1=6 AND 000227=000227) then 1 else 1*(select table_name from information_schema.tables)end)=1' });
$s->next;
2/ Execute the script
=> Without the patch, you should not get any error. If you have the mysql logs
enable, you will see the query
=> With the patch applied, you will get a "unknown column" error
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Marc Véron [Thu, 28 Jan 2016 21:05:58 +0000 (22:05 +0100)]
Bug 15684: Fix encoding issues with quote upload
To verify:
- Download attachment 'Goethe with umlaut' from Bug 15684
- Go to Tools > Quote Editor
- Click "Import quotes" and select the file
- The quotes display in a table. Click 'Sav quotes'
- Result: Nothing happens
To test:
- Apply patch
- Repeat steps above
- Verify that you get a message '2 quotes saved' and that the quotes
are added in to the quotes table
- Test with attachment 'sample quotes' as well
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Julian Maurice [Wed, 6 Jan 2016 18:11:27 +0000 (19:11 +0100)]
Bug 15358: Fix authorities merge
Bug 8064 (Merge several biblio records) change some code used in both
biblios and authorities merge tool without updating the authorities
merge tool.
This patch fixes that.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
This followup on top of remote branch
Only remove tabs and trailing spaces to make koha-qa pass
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Liz Rea [Thu, 20 Aug 2015 22:23:54 +0000 (10:23 +1200)]
Bug 13618 - memberentrygen.tt errors Not a GLOB reference
Like Jonathan said:
The interpolation of a variable on including a file caused an unexpected
error:
Template process failed: undef error - Not a GLOB reference at
/usr/lib/i386-linux-gnu/perl5/5.20/Template/Provider.pm line 619.
Replaced it with a SWITCH, like the other patch for this similar error.
Jonathan Druart [Tue, 4 Aug 2015 14:51:55 +0000 (15:51 +0100)]
Bug 13618: Fix error 'Not a GLOB reference'
The interpolation of a variable on including a file caused an unexpected
error:
Template process failed: undef error - Not a GLOB reference at
/usr/lib/i386-linux-gnu/perl5/5.20/Template/Provider.pm line 619.
Jonathan Druart [Fri, 23 Jan 2015 12:18:54 +0000 (13:18 +0100)]
Bug 13618: Use Template::Stash::AutoEscaping to use the html filter
Test plan:
0/ sudo cpanm Template::Stash::AutoEscaping
1/ Verify don't reproduce the XSS issue described on bug 13609 and other
xss related bugs.
2/ Try to find some encoding issues (detail page, search results,
facets, etc.)
Bug 14893: Separate temporary storage per instance in Upload.pm
To make life easier when multiple instances are uploading temporary
files to Koha, this patch adds the database name to the upload subfolder
in your /tmp folder.
Note: Although multiple instances could share the same subfolder for
temporary storage (hashvalue is based on a timestamp too), it will be
better to separate them for efficient housekeeping (removing older or
partial files with a cronjob etc.)
Since multiple instances come with separate permissions, keeping them in
separate folders will be much simpler.
Permanent storage is not affected by this patch. The location of permanent
storage is ruled by the upload_path in each config file. Sharing that
space is not recommended too.
Although it may not be strictly necessary yet to remove files from the old
temp storage folder (before the 3.22 release), the accompanying db rev
performs that housekeeping task.
Test plan:
[1] Do not yet apply this patch. Upload a temporary file (use the
tools/upload.pl script without selecting a category).
[2] Check /tmp/koha_upload.
[3] Apply this patch. Run the db rev with web installer.
[4] Upload another temporary file.
[5] Check /tmp for folder [your_database]_upload.
[6] Check that /tmp/koha_upload is gone and the associated records too.
[7] Run the adjusted t/db../Upload.t
Followed test plan. Could not do steps before applying patch [1]-[2]
(I suppose a local permission problem).
After applying patch and updating db file appears in /tmp/[database]
as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Marcel de Rooy [Wed, 27 Jan 2016 14:44:31 +0000 (15:44 +0100)]
Bug 15240: [QA Follow-up] Minor adjustments
This patch does:
[1] It removes some unused modules.
[2] It adds some options not listed in the synopsis.
[3] It removes an unused sql expression from one query.
Note: In fines related code the third parameter of CalcFine sometimes
is named as days_overdue too.
[4] Corrects a few typos in comments or pod.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Jonathan Druart [Wed, 9 Dec 2015 11:10:33 +0000 (11:10 +0000)]
Bug 15240: Do not process issues with a date due later than today
There is no need to do this job in Perl, MySQL could do it instead.
The idea is to only retrieve the issues info which could be overdued.
To test:
1/ Run the script
2/ Apply the patch
3/ Run the script again, notice the exact same results but execution time is faster
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Jonathan Druart [Mon, 21 Dec 2015 12:31:59 +0000 (12:31 +0000)]
Bug 12636: Do not display unique patron attributes in the batch patron modification
Batch patron modification should not offer to update patron attributes
with values which are designated as unique since such attributes are
required to be unique to a single patron.
Test plan:
Create some patron attributes, some should be unique.
Use the batch patron modification tool to modify patrons.
With this patch, the patron attributes marked as unique won't be
display anymore.
Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Jonathan Druart [Tue, 15 Sep 2015 13:20:22 +0000 (14:20 +0100)]
Bug 14828: use Koha::ItemType[s] in admin/itemtypes
Test plan:
Add/edit/remove item types from the administration module
(admin/itemtypes.pl).
You should get message feedback after each action.
Don't forget to play with the image and try to remove an item type
linked to records (you should not be able to remove it).
Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Jonathan Druart [Tue, 15 Sep 2015 16:03:44 +0000 (17:03 +0100)]
Bug 14828: Remove old package and tests
C4::ItemType can be now removed safely, there is no use of this module.
Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Jonathan Druart [Tue, 15 Sep 2015 16:03:04 +0000 (17:03 +0100)]
Bug 14828: Use Koha::ItemType[s] everywhere C4::ItemType was used
This patch mainly replaces C4::ItemType->all with
Koha::ItemTypes->search.
Test plan:
At the places where the C4::ItemType module was used, confirm there is
no regression:
- acqui/neworderempty.pl
- catalogue/itemsearch.pl
- admin/item_circulation_alerts.pl
and the 2 cataloguing plugins:
- marc21_linking_section.pl
- unimarc_field_4XX.pl
QA step:
prove t/db_dependent/HoldsQueue.t should return green
Note that the tests were buggy.
Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Jonathan Druart [Tue, 15 Sep 2015 16:02:28 +0000 (17:02 +0100)]
Bug 14828: Add Koha::ItemType[s] classes
Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Jonathan Druart [Tue, 5 Jan 2016 14:37:20 +0000 (14:37 +0000)]
Bug 15353: Display the patron image where needed
On the 3 following pages, the patron image was not displayed:
members/discharge.pl
members/pay.pl
members/paycollect.pl
Test plan:
Apply this patch and confirm the image is now displayed
Followed test plan, image displays as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Fixing the evals in PerlModules.pm to pass perl critic has caused
a regression. If appears that using a block eval will not work here,
at least not in its current form.
Marcel de Rooy [Fri, 22 Jan 2016 09:18:29 +0000 (10:18 +0100)]
Bug 8753: [QA Follow-up] Primary key and collation
This patch includes:
[1] Adds primary key borrowernumber to new table.
[2] Fixes collation.
[3] Removes manual PK in DBIx schema file.
[4] Fixes typo CompletePasswordRevovery.
[5] Removes use strict from opac-password-recovery; Modern::Perl is used.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Liz Rea [Wed, 7 Oct 2015 02:08:10 +0000 (15:08 +1300)]
Bug 8753 - Various little things - removing new dependency, changes to errors, textual updates
Koha already has a sub that creates salts, so lets use that instead of math::Random::secure, so as not to add a new dependency.
Made the references to "Forgotten password" consistent, including adding it to the title of the page.
Also removed the individual error for "this email doesn't belong to this account" as that could expose the existence of a login, which I think we'd rather not do.
Made some of the text more grammatically correct, and more library specific.
To test:
Apply on top of all of the other patches.
All the usual checks, plus make sure there are no typos in any text references.
Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
This is a collection of changes taken from different comments (but mostly comment 21 and comment 122).
Passes qa and prove, on my machine at least.
There's also a new test file, Passwordrecovery.t, which covers every method of C4::Passwordrecovery.
To test:
All normal checks plus :
1/ Receive the email
2/ Click on the link
3/ Change the pwd
4/ Click again on the link
5/ You should immediately get an error message
Problems with Math/Random/Secure.pm, is solved in following patch, signing off Signed-off-by: Marc Veron <veron@veron.ch> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>