Owen Leonard [Mon, 13 Aug 2018 13:39:42 +0000 (13:39 +0000)]
Bug 10442: Remove references to non-standard "error" class
The CSS for <div class="error"> is obsolete and should not be used. This
patch removes the definition from the main CSS file and corrects
instances of its use in the templates to the standard <div class="dialog
alert">.
To test:
- In Acquisitions -> Late orders, locate an order from a vendor which
doesn't have an email address. Selecting that order and clicking
"Claim" should trigger an error dialog, "This vendor has no email." It
should be styled correctly.
- With AcqCreateItem set to "when placing an order," add to an existing
order using the "From a new (empty) record" option. Add two items with
identical barcodes and submit the form. A error should show at
the top of the page.
- With AcqCreateItem set to "when receiving an order," receive an order
and add two items with identical barcodes. Submitting the form should
trigger an error message at the top of the page.
With the remaining cases I don't know how to trigger the errors in
question, so a visual check of the changes may be required:
- Administration -> Funds -> "You are not authorized to modify this
fund"
- Administration -> Search engine configuration
(/admin/searchengine/elasticsearch/mappgings.pl) -> Various
modification errors.
- With the AutoEmailOpacUser preference set to "send," adding a patron
without an email address can trigger an error, "This member has no
email."
- With plugins enabled, and installed, there are error messages
displayed under various circumstances.
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Mon, 29 Oct 2018 22:23:53 +0000 (19:23 -0300)]
Bug 21080: Fix patron's attributes display when PA_CLASS is used
When a patron attribute class (AV PA_CLASS) is created, the patron's
edit view is broken:
https://screenshots.firefox.com/62uNhoUtH6rPXm9l/pro.kohadev.org
To recreate:
1. Create 1+ authorised values PA_CLASS
2. Create patron's attributes using it
3. Edit a patron
it depends on the order of the fieldset and the ol elements
This is certainly not the best fix but the display does not look broken!
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
1. Catalog a record with series name "Series & more"
2. Find the record
3. Make sure clicking the "Series & more" link works and the ampersand is properly encoded in the URL.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
1. Catalog a record with series name "Series & more"
2. Find the record
3. Make sure clicking the "Series & more" link works and the ampersand is properly encoded in the URL.
4. Also try the attached test records and make sure their links work.
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
1. Catalog a record with series name "Series & more"
2. Find the record
3. Make sure clicking the "Series & more" link works and the ampersand is properly encoded in the URL.
4. Also try the attached test records and make sure their links work.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Tue, 16 Oct 2018 15:09:32 +0000 (15:09 +0000)]
Bug 21581: Pass through authorities indexes
To test:
1 - Define a rule:
Matching rule code: LCAUTH
Match threshold: 100
Record type: Authority record
MATCH POINTS
Search index: LC-card-number
Score: 100
Tag: 010
Subfield: a
2 - Have a record with an LC number in 010
3 - Export it
4 - Edit the record in Koha, move the value from 010 to another field
5 - Import the original record
6 - Use the matching rule above, you expect it won't match (nothing in 010 anymore)
7 - It matches?!?!?!
8 - Enable zebra logging in koha-conf.xml
<zebra_loglevels>none,fatal,warn,request,info</zebra_loglevels>
9 - tail -f /var/log/koha/kohadev/zebra-output.log
10 - On manage marc apply matchign with no rule, then reapply with rule
11 - View the output in the log - the index searched is 'Any'
12 - Apply patch
13 - Reapply matching
14 - Note we search the expected index and no match is found
NOTE: By applying bug 21579, I was able to view the difference, and
see that it didn't match identically, because I had moved the
value from 010 to 155. No log checking needed. clean/delete batch.
Apply patch, no match. clean/delete batch.
Edit authority back, matches.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 21702: (follow-up) Simplify checks and use standard fallback behaviour
This patch acknowledges the fact that some checks here are done in a way
that is not standard these days. This checks are originally done
multiple times in different ways. output_and_exit_if_error should be
used.
This implies a minor behaviour change: if the passed (in the URL)
borrowernumber doesn't exist, it sends the user to a 'Patron doesn't
exist page' instead of the circulation page for the borrowernumber.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 21702: Make mancredit.pl use the patron id for the staff user
I think unsafe SQL modes and the fact that manager_id has no FK allowed this to go unnoticed. But now we catch it!
To test:
- On a patron, try adding a new manual credit of any type
=> FAIL: It fails telling the userid of the logged user is not a valid integer!
- Apply this patch
- Try adding a manual credit of any type
=> SUCCESS: Manual credit added!
- Sign off!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 13098: Fix POD for Koha::Account::Offsets::total
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 13098: Make _FixAccountForLostAndReturned refund the right thing
This patch changes the logic inside the method, to make it match the
behaviour described on the tests.
It uses the existing offsets on the account_offsets table to gather
information about the right things to refund.
To test:
- Run:
$ kshell
k$ prove t/db_dependent/Circulation.t
=> FAIL: Tests don't pass!
- Apply this patch
- Run
k$ prove t/db_dependent/Circulation.t
=> SUCCESS: Tests pass!
- Sign off :-D
Followed test plan, patch works as described. All three patches pass QA
test tool Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 13098: Tests for all _FixAccountForLostAndReturned use cases
This patch introduces tests for all the use cases for
_FixAccountForLostAndReturned. This includes the following scenarios
before _FixAccountForLostAndReturned is called:
- Full write off (the original issue)
- Full payment
- No payment or write off
- Partial payment and partial write off
Written off debts (L lines) are just skipped, any kind of payment is
added and then refund as a single credit (CR). Amount outstanding is set
to 0. Offsets need to be generated for paper trail of this decisions.
To test:
- Run:
$ kshell
k$ prove t/db_dependent/Circulation.t
=> FAIL: Tests fail because _FixAccountForLostAndReturned is not doing
the right thing :-D
Followed test plan, patch works as described Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch introduces this trivial method for returning the sum0 result
of the amount columns of a Koha::Account::Offsets set.
To test:
- Apply this patch
- Run:
$ kshell
k$ prove t/db_dependent/Koha/Account/Offsets.t
- Sign off :-D
Followed test plan, patch worked as described Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Mon, 29 Oct 2018 20:27:52 +0000 (17:27 -0300)]
Bug 21596: (follow-up) Handle updated_on part 2
It seems that I have over complicated things here, now
t/db_dependent/Koha/Object.t is failing
Apparently everything is ok with this change.
Test plan:
prove -r prove -r t/db_dependent/Koha/Object.t t/Auth_with_shibboleth.t
t/db_dependent/Patrons.t t/db_dependent/Koha/Patron*
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Fri, 19 Oct 2018 16:17:41 +0000 (17:17 +0100)]
Bug 20720: Using git Sponsored-by lines to update 'about'
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Fri, 17 Aug 2018 12:22:50 +0000 (12:22 +0000)]
Bug 21242: If not searching for patron, move to log viewer
To test:
1 - Bring up a patron
2 - Click 'Modification log'
3 - Note you get borrower info
4 - Move the object field into info field
5 - Submit
6 - You are now on the 'Log viewer' page with admin options, not
borrower circ options
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Tue, 23 Oct 2018 13:15:11 +0000 (10:15 -0300)]
Bug 21634: Keep "circulation" module selected when viewing patron's logs
To recreate:
- View a patron detail page
- Click "Modification log"
- Notice that the url has "modules=MEMBERS&modules=circulation", but
the "Circulation" option is not selected in the "Modules" dropdown list.
This is because of uppercase vs lowercase.
The bug:
- Right after you click "Modification log" you will see all the
"members" and "circulation" logs
- Submit the form without changing any input/select from the form
=> Now you only see the "members" logs.
Test plan:
- Apply the patch
- Click "Modification log"
- Notice that the url now contains "modules=MEMBERS&modules=CIRCULATION"
- Submit the form without changing any input/select from the form
=> Now you have the "members" and "circulation" modules selected.
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
See C4::Circulation::SendCirculationAlert
3355 my $do_not_lock = ( exists $ENV{_} && $ENV{_} =~ m|prove| ) || $ENV{KOHA_NO_TABLE_LOCKS};
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Marcel de Rooy [Fri, 19 Oct 2018 08:15:56 +0000 (10:15 +0200)]
Bug 21613: (QA follow-up) Resolve warning on $ENV{_}
Some shells may not pass the program name in underscore, and cron also
does not like it here:
Use of uninitialized value $ENV{"_"} in pattern match (m//) at Koha/Database.pm line 79.
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: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Thu, 18 Oct 2018 23:06:07 +0000 (20:06 -0300)]
Bug 21613: Turn strict SQL modes on for tests
This patch will turn the strict SQL modes on When tests are ran with prove.
Test plan:
- Apply the first patch
- prove t/db_dependent/Koha/Database.t
=> Will pass if you have <strict_sql_modes>1</strict_sql_modes> in your
koha-conf.xml
=> Will fail otherwise
- Apply the second patch
- prove t/db_dependent/Koha/Database.t
=> Will pass whatever the value of strict_sql_modes in your
koha-conf.xml
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Thu, 18 Oct 2018 23:06:03 +0000 (20:06 -0300)]
Bug 21613: Add a test
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Mark Tompsett [Fri, 14 Sep 2018 23:06:49 +0000 (16:06 -0700)]
Bug 21349: Instructors with special characters in cardnumber cannot be removed from course reserves
The cardnumber can contain strange non-javascript-friendly
characters. This patch converts all the internal references
to borrowernumber, but displays the cardnumber when showing
list of matching users.
TEST PLAN
---------
1) Make sure Course Reserves is being used. Check system preferences.
2) Make sure there is a Course entered.
3) Make sure there is a patron with an cardnumber which breaks
the existing javascript (eg. Ka-boom:Ka-boom!KABOOM@#$!)
4) Go into the course list.
5) Click the course name link
6) In the "Instructor Search" box enter the patron name.
7) Select the patron which has the ugly cardnumber.
8) Click Save
-- The course listing should have the new teacher listed.
9) Click the course name link again.
10) Click 'Remove' beside the instructor's name.
-- nothing happens, and inspecting the error console gives
you the ugly error described in comment #0
11) apply this patch
12) restart_all
13) sudo service apache2 restart
14) refresh the page.
15) click 'Remove' beside the instructor's name.
-- name is removed.
16) Click Save
-- the course listing no longer lists the new teacher.
17) Actually confirm that adding and removing others normally
works as expected.
18) run koha qa test tools.
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Thu, 25 Oct 2018 15:24:29 +0000 (15:24 +0000)]
Bug 21186: (follow-up) Incorrect Bootstrap modal event name in multiple templates
This patch addresses a few more instances of this problem which I didn't
catch in my first pass.
To test, apply the patch and clear your browser cache if necessary.
- Go to Circulation -> Check in and check in an item which has a hold.
- When the 'Hold found' modal appears the checkin barcode field
behind it should be disabled.
- When the modal is dismissed the checkin field should be enabled
again and focus should be on that field.
- Go to Administration -> Library groups.
- Click the "Add group" button. The cursor focus should be on the
title field.
- Go to Tools -> MARC modification templates.
- Click the "New template" button. The cursor focus should be on the
name field.
Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Wed, 8 Aug 2018 19:03:38 +0000 (19:03 +0000)]
Bug 21186: Incorrect Bootstrap modal event name in multiple templates
Modals in the staff client which load data via AJAX require an "on
close" action in order to clear the modal of the loaded data. The
problem presents itself the second time the modal is opened: The
"loading" message doesn't appear, and the data from the previous link
is shown until the new data loads.
To test, apply the patch and test the following pages. In each case,
click multiple instances of the modal trigger link/button to confirm
that the "loading" message always appears between re-displays of the
modal.
- Acquisitions -> Vendor -> Add to basket -> From a staged file -> Add orders
- Test the "MARC" and "Card" links
- Acquisitions -> EDIFACT messages
- Test the "View message" button
- Acquisitions -> Vendor -> Add to basket -> From an existing record
- Test "View MARC" link
- Acquisitions -> Vendor -> Invoices -> Invoice -> Receipt page
- Test the "Order," "MARC," and "Card" links.
- Catalog -> Bibliographic record details
- Test the MARC Preview link.
- Cataloging -> Cataloging search results
- Test the Actions -> MARC preview and Actions -> Card preview menu
items
- Cataloging -> Cataloging search results -> Merge
- Test the "View MARC" linkscataloguing/merge.tt
- Tools -> Patron lists -> Actions -> Print patron cards
- Tools -> Batch record modification -> Results -> Show MARC
- Tools -> Staged MARC record management -> View batch
- Test MARC preview shown when you click a staged title
Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Fri, 19 Oct 2018 15:06:43 +0000 (12:06 -0300)]
Bug 21621: Remove incorrect GROUP BY from tools/letter.pl
Fix:
'koha_kohadev.letter.name' isn't in GROUP BY
DBD::mysql::db selectall_arrayref failed: 'koha_kohadev.letter.name' isn't in GROUP BY [for Statement "SELECT branchcode, module, code, name, branchname
FROM letter
LEFT OUTER JOIN branches USING (branchcode)
GROUP BY branchcode,module,code ORDER BY module, code, branchcode"] at /home/vagrant/kohaclone/tools/letter.pl line 383.
Test plan:
- Copy some default notice templates for specific libraries
- List the different notice templates
- Confirm that notices appear only one, with "all libraries" you will see all
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Sun, 28 Oct 2018 11:59:51 +0000 (08:59 -0300)]
Bug 21703: Fix filter on dataurl variable to allow placing holds in staff again
We must not encode & again and use the url filter, instead of uri.
To test:
- Search for a record in staff
- Go to holds
- Search for patrons, multiple should be displayed
- Pick a patron by clicking on the name
- Verify an error is shown and the URL is incorrect
- Apply patch
- Repeat test above, placing a hold should now work.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Marcel de Rooy [Thu, 25 Oct 2018 09:37:42 +0000 (11:37 +0200)]
Bug 21311: (follow-up) Adjust wording of failed login message
Based on the feedback of Jonathan, Katrin, Mark and Martin (thx), adding
the general remark that if lockout is enabled, an account may be locked
out after x attempts. This does not say that the account on hand is
locked or not.
Adding a <p> tag between 'Log in'-button and 'Forgot your password' for
presentation.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Marcel de Rooy [Wed, 10 Oct 2018 14:04:38 +0000 (16:04 +0200)]
Bug 21311: Remove locked message from opac-auth.tt
We should not expose more information than needed when someone tries
to login with invalid credentials. Saying that an account is locked
reveals that the account exists (or perhaps an email address).
Trivial fix. Keeping the var too_many_login_attempts for staff.
Note: We do not remove this distinction for the staff client here (in the
assumption that a library may well have additional security measures in
place for staff client). But it could be done too (on another report).
Test plan:
Enable lockout feature.
Enter invalid credentials until account locks out (on OPAC !!)
Note that message does no longer change to 'Account is locked'.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Thu, 25 Oct 2018 13:17:59 +0000 (14:17 +0100)]
Bug 21641: (follow-up) Address wrong call method
This patch substitutes C4::Accounts->getnextacctno for
C4::Accounts::getnextacctno since getnextacctno is only expecting to be
passed a borrowernumber
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Thu, 25 Oct 2018 12:23:31 +0000 (13:23 +0100)]
Bug 21641: (follow-up) Address additional call
This patch makes the same change as the main patch, just for an
additional occurance of getnextacctno
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Alex Buckley [Wed, 24 Oct 2018 03:37:57 +0000 (03:37 +0000)]
Bug 21641: Added C4::Accounts to getnextacctno() call
Test plan:
1. Fetch and checkout the master branch
2. Checkout an item with a rental charge associated with it to a user
and notice an error is thrown
3. Apply patch
4. Restart memcached and plack
5. Repeat steps 1 and 2 and notice the checkout happens successfully
Sponsored-By: Catalyst IT Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Thu, 25 Oct 2018 11:29:28 +0000 (11:29 +0000)]
Bug 21611: Fix priority dropdown for holds
To Test:
1 - Find a record
2 - Place several holds some with differing pickup locations
3 - Check in one hold to confirm as waiting
4 - Check another in to set a hold in transit
5 - View the holds queue for the record:
/cgi-bin/koha/reserve/request.pl?biblionumber=##
6 - Confirm found holds are incorrect
7 - Apply patch
8 - Reload
9 - Confirm holds look correct
10 - Alter the values of HoldsSplitQueue and HoldsSplitQueueNumbering
11 - Confirm things still look right
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch removes the 'frameworkcode' template parameter. Now the
'framework' object is passed, and everytime the frameworkcode is needed
on the template, framework.frameworkcode is called.
To test:
- Apply this patch
- Run:
$ grep ' frameworkcode ' koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt
=> SUCCESS: There's no use of 'frameworkcode' in the template
- Sign off :-D
Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 21704: Edit framework subfield link is broken (TT filter)
This patch removes URL building from the controller
(admin/marctagstructure.pl) and does it on the templates, using the
right 'uri' filter for the query parameters.
It also removes:
- No longer used attributes that are passed to the template
- Duplicated code in the templates
To test:
- Go to Home > Administration > MARC bibliographic framework
- On any of the listed frameworks, pick the 'MARC structure' action in
the dropdown
- On any subfield, hover on the actions dropdown
=> FAIL: The URLs are wrongly formed
- Click on the links
=> FAIL: You get errors because of the bad URL
- Apply this patch
- Reload the 'MARC structure' page
- On any subfield, hover on the actions dropdown
=> SUCCESS: LInks look correct
- Click on any of them
=> SUCCESS: They work!
- Use the 'Display only used tags/subfields' checkbox
=> SUCCESS: No behaviour change!
- Sign off :-D
Sponsored-by: Theke Solutions Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Thu, 3 May 2018 17:06:54 +0000 (17:06 +0000)]
Bug 21435: Update two-column templates with Bootstrap grid: Tools part 3
This patch modifies several tools templates to use the
Bootstrap grid instead of YUI.
This patch also removes obsolete "text/javascript" attributes from
<script> tags and "text/css" attributes from <style> tags in the
modified templates.
To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:
- Tools -> MARC modification templates
- View and edit templates
- Tools -> Batch patron modification
- Test each step of the process
- Tools -> Overdue notice/status triggers
- Tools -> Upload patron images
- Test each step of the upload process
- Tools -> Quote editor
-> Quote uploader
- Import quotes
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Thu, 3 May 2018 16:48:34 +0000 (16:48 +0000)]
Bug 21434: Update two-column templates with Bootstrap grid: Tools part 2
This patch modifies several tools templates to use the
Bootstrap grid instead of YUI.
This patch also removes obsolete "text/javascript" attributes from
<script> tags and "text/css" attributes from <style> tags in the
modified templates.
To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:
- Tools -> Export data
- Tools -> Calendar
- Tools -> Import patrons
- Tools -> Inventory
- Tools -> Staged MARC management
- View batches and batch details
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds two missing template filters as pointed out by the
template test.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Katrin Fischer [Thu, 9 Aug 2018 22:13:32 +0000 (22:13 +0000)]
Bug 20450: Add collection to item table when placing a hold on a specific copy (OPAC)
This patch adds a new collection column to the item table when selecting
a specific item for a hold. The column will only appear if at least
one item has a collection set.
To test, in OPAC:
- Place a specific hold on
- a record with one or more items with collections
- a record with one or more items without collections
- Verify the collections display correctly when they exist
- Verify the table still works as expected
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Katrin Fischer [Thu, 9 Aug 2018 21:28:30 +0000 (21:28 +0000)]
Bug 20450: Add collection to item table when placing a hold on a specific copy (Intranet)
This patch adds a new collection column to the item table when selecting
a specific item for a hold. The column will only appear if at least
one item has a collection set.
To test, in staff:
- Place a specific hold on
- a record with one or more items with collections
- a record with one or more items without collections
- Verify the collections display correctly when they exist
- Verify the table still works as expected
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Katrin Fischer [Wed, 8 Aug 2018 19:52:26 +0000 (19:52 +0000)]
Bug 20896: Move serial enumeration after callnumber on intranet detail page
The column with serial enumeration/chronology information is moved
from the back to the right of itemcallnumber on the intranet detail
page.
To test:
- Apply patch
- Look at different detail pages in staff:
- 1 or more items have serial enumeration information
- no item has serial enumeration informatoin
- Verify
- itemcallnumber is now followed by serial information, if
an item with the field filled in exists for the record
- all other functionality, like sorting, works as expected
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Changes were made to address QA issues from Comment 17
Tests:
1) Verify that a new entry for CONTROL_NUM_SEQUENCE is added to table authorised_value_categories
2) Edit a bib record using advanced editor and note that the 001 widget isn't there when adding/editing 001 field
3) Add a new row into authorised_values table with:
a) CONTROL_NUM_SEQUENCE in category column
b) authorised_value column has a string ending with a number i.e. sprLib0001
c) lib column has a short string indicating the type of control number i.e. "Springfield Library"
4) Edit a bib record using the advanced editor and note that the 001 widget is there when adding / editing 001 field
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 19263: Rancor - 001 widdget only for configured client
Tests:
1) Verify that a new entry for CONTROL_NUM_SEQUENCE is added to table
authorised_value_categories
2) Edit a bib record using advanced editor and note that 001 widget
isn't there when adding/editing 001 field
3) Add a new row into authorised_values table with:
a) CONTROL_NUM_SEQUENCE in category column
b) authorised_value column has a string ending with a number i.e.
"faw0001"
c) lib column has a short string indicating type of control number
i.e. "FAW"
4) Edit a bib record using the advanced editor and note that the 001
widget is there when adding / editing 001 field
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
In advanced editor mode for cataloging, the 001 widget will
automatically assign the next control number if a format is defined
in authorised_values table.
To test you need access to the database.
1) Verify that a new entry for CONTROL_NUM_SEQUENCE is added to
table authorised_value_categories
2) Enter a new value for authorised_values with the authorised_value
column ending in a number
3) Edit a record using the advanced editor, specifically the 001
field
4) Note the new widget and option to increment or assign manually.
The buttons fit within the widget now, and there's a database update
to create the CONTROL_NUM_SEQUENCE.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jesse Weaver [Tue, 10 Nov 2015 19:04:14 +0000 (12:04 -0700)]
Bug 19263: Rancor - Add auto-001 widget
To test:
1 - Define a new authorised valued category "CONTROL_NUM_SEQUENCE"
2 - Add a value/sequence
The authorised_value is the starting value - shoudl end in a number
that can be incremented e.g. "control_sequence_001"
The description field is the name for the seqeuence
Opac description is unused
3 - Edit a record in rancor
4 - Note the new widget and option to increment or assign manually
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Magnus Enger [Mon, 20 Nov 2017 14:14:30 +0000 (14:14 +0000)]
Bug 18591: Allow any number of comments on ILLs
This patch makes it possible to add arbitrary comments to ILL
requests. Comments are read only and displayed in chronological
order. Comments can be added by librarians, but also added automatically
based on comments in the different protocols, so that comments from the
lending library can also be added.
To test:
- Enable the ILL module ("ILLModule" syspref + config in koha-conf.xml)
- Install the Dummy backend from here:
https://github.com/PTFS-Europe/Dummy
- Create a Dummy ILL request
- Add comments to the request, checking that the name and borrowernumber
of the person that added the comment is displayed ok
- Check that the displayed date and time the comment was submitted follows
the "dateformat" syspref
- On the "List requests" page, check that the correct number of comments
is displayed in the "Comments" column
- Check that the tests pass:
prove t/db_dependent/Illcomments.t
Signed-off-by: andrew.isherwood@ptfs-europe.com Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Josef Moravec [Fri, 26 Oct 2018 09:28:01 +0000 (09:28 +0000)]
Bug 21680: Remove dead code - C4::Accounts::fixaccounts
Test plan:
git grep fixacccounts
-- without patch there are 3 occurences
-- with patch - no occurence of fixaccounts
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Wed, 24 Oct 2018 22:50:02 +0000 (19:50 -0300)]
Bug 21654: Remove refund_lost_item_fee_rules.sql from the installer process
This is a follow-up patch for bug 14048 comment 97
Test plan:
git grep refund_lost_item_fee_rules.sql
should not return any results
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Mon, 15 Oct 2018 22:44:51 +0000 (19:44 -0300)]
Bug 21526: uri escape TT variables when used in 'a href'
This patch has been generated with the script provided on bug 21576.
It only affects variable used in the href attribute of a link *when*
href it the first attribute of the node (grep "a href")
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Wed, 17 Oct 2018 14:29:16 +0000 (11:29 -0300)]
Bug 21576: Preserve chomp chars for USE raw
See bug 21526 comments 5-7
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Mon, 15 Oct 2018 22:44:06 +0000 (19:44 -0300)]
Bug 21576: Handle complex uri
Only the first TT params in a href was taken into account.
This also takes care to replace into href attributes only (for instance not
title, etc.)
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Mon, 15 Oct 2018 20:29:35 +0000 (17:29 -0300)]
Bug 21576: Keep compatibility with QA script
The QA script call 'missing_filters', it sounds better to keep it in
order to avoid fixing it and have a weird condition (if
module->can('subroutine_name')) to maintain
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Fri, 12 Oct 2018 16:57:49 +0000 (13:57 -0300)]
Bug 21576: Add a developer script to fix missing TT filters
See bug 13618 and bug 21526.
We need a script to add missing filters, or replace wrong ones.
Test plan:
- Add unescaped variables to .tt files
- prove xt/find-missing-filters.t
will warn about them
- perl misc/devel/add_missing_filters.pl
will add the missing/wrong filters
- prove xt/find-missing-filters.t
will now be happy
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Mon, 22 Oct 2018 19:51:25 +0000 (16:51 -0300)]
Bug 21562: Fix sort by checkout date in the circulation table
The sort is done in SQL but resort by DataTables when displaying the
results.
iDataSort should be used to mimick date_due sort behavior.
Test plan:
- Check some items out
- Modify the checkout and due dates, like:
2018-10-22
2018-01-23
2018-05-27
- Sort by checkout date, then due date. The sort should be correct for
all values of the DateFormat syspref
Followed test plan, patch works as described and passes QA test tool
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Mon, 22 Oct 2018 20:02:51 +0000 (17:02 -0300)]
Bug 21629: Use cn_sort instead of itemcallnumber when displaying a list
DBMS can sort callnumbers correctly using cn_sort. We should use it
showing a list's content.
Test plan:
- Add items with callnumber to a list
- Display the list
- List the content by callnumbers
=> Confirm that the records are correctly sorted by callnumber
Signed-off-by: Myka Kennedy Stephens <mkstephens@lancasterseminary.edu> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Wed, 24 Oct 2018 01:33:42 +0000 (01:33 +0000)]
Bug 21639: Add phone transports to new and existing installs
To test:
1 - Confirm if you do or do not have 'phone' transports defined in the
message_transports table
2 - Apply patch
3 - Run updatedatabase
4 - If you didn't have them you should now
5 - Run updatedatabase again, confirm it doesn't error
6 - sudo koha-mysql kohadev
7 - DELETE from message_transports WHERE message_transport_type =
'phone'
8 - Run updatedatabase again
9 - Confirm the message transports table is restored
10 - Drop your DB (or reset_all in kohadevbox)
11 - Ensure the table is fully populated including phone notices
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Victor Grousset [Thu, 18 Oct 2018 09:54:58 +0000 (11:54 +0200)]
Bug 21587: don't drop patrons to notify in order creation
It only worked on modification.
== Test plan ==
1. have/create a active budget
2. have/create a fund
3. have/create a vendor with minimal info
4. create a basket with minimal info
5. add an order line to the basket
Add a user in "To notify on receiving"
6. Modify the order
7. The patrons isn't here. This is the bug
8. Add a user in "To notify on receiving"
9. Save
10. Modify the order
11. The patron is here now
12. Apply this patch
13. Retry step 5 to 11 and patron should be saved on order creation
14. Celebrate! :D
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Thu, 25 Oct 2018 15:55:43 +0000 (12:55 -0300)]
Bug 21669: Do not html filter TT assignement statements
Why? Because we must filter the variables when we display them.
If we escape them on assignement, they will be double escaped:
[% XXX = "<span>pouet</span>" | html %]
[% XXX | html %]
=> <span>pouet</span>
Also it will bring trouble if we are assigning a structure (see bug
21663 for instance).
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Thu, 25 Oct 2018 13:30:34 +0000 (13:30 +0000)]
Bug 21663: Incorrect filter prevents predefined notes from being added to patron acccounts
This patch removes an "html" filter from the template include which
allows one to add predefined nots to a patron's account.
To test, apply the patch and open a patron record for viewing or
checkout. Click the "Add message" button. The "predefined notes"
dropdown should contain the authorised_values you have with the
'BOR_NOTES' category.
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Test plan:
- Add public and privates shelves
- Shares some of them
- List them
=> The correct numbers of shelves must be displayed
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Tue, 23 Oct 2018 13:35:24 +0000 (10:35 -0300)]
Bug 21635: [sql_modes] Remove GROUP BY clause in batchMod.pl
batchMod.pl: DBD::mysql::st execute failed: 'koha_kohadev.authorised_values.authorised_val
ue' isn't in GROUP BY [for Statement "SELECT authorised_value, lib FROM authorised_values LEFT JOIN authorised_values_branches ON ( id = av_id ) WHERE category = ? AND ( branchcode = ? OR branchcode IS NULL )
GROUP BY lib ORDER BY lib, lib_opac" with ParamValues: 0='WITHDRAWN', 1="CPL"] at /home/vagrant/kohaclone/tools/batchMod.pl line 396.
We must use Koha::AuthorisedValues->search instead of a raw SQL query.
Test plan:
Edit some items in a batch
Confirm that the dropdown list (AV) are correctly filled
We will lose speed efficiency here, but better to be consistent, then cache AV in Koha::AuthorisedValues
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Isobel Graham [Sat, 20 Oct 2018 08:12:19 +0000 (09:12 +0100)]
Bug 20758: Fix for BrowseResultSelection typo
To test:
1) The BrowseResultSelection description should no longer contain
"fromt"
Mentored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Thu, 25 Oct 2018 13:24:46 +0000 (10:24 -0300)]
Bug 21596: (follow-up) Handle updated_on
Default value should only used if not exist.
We got a failing test with the previous patch:
# Failed test 'borrowers.updated_on should have been kept to what we set on creating'
# at t/db_dependent/Patrons.t line 78.
# got: '1'
# expected: '0'
Test plan:
prove -r t/Auth_with_shibboleth.t t/db_dependent/Patrons.t t/db_dependent/Koha/Patron*
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Wed, 24 Oct 2018 17:35:16 +0000 (14:35 -0300)]
Bug 21596: Handle updated_on
This has been picked from the solution proposed on bug 21610. It may not
be pushed soon and so we need a fix for the failing tests
(t/Auth_with_shibboleth.t)
Test plan:
prove -r t/Auth_with_shibboleth.t t/db_dependent/Koha/Patrons*
must return green
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Tue, 9 Oct 2018 17:19:09 +0000 (17:19 +0000)]
Bug 21511: Don't show acquisition details on subscription detail when there is no acq data
This patch modifies the subscription detail page so that acquisitions
details section is not shown when there is no acquisitions data.
The acquisitions details are moved into a new tab similar to how it
appears on the bibliographic details page. A count of orders is now
passed to the template so that the check for existing acquisitions data
will work correctly.
To test, apply the patch and view the detail page for subscriptions.
- When viewing a subscription for which there are orders you should see
an "Acquisitions details" tab containing the acquisitions data.
- When viewing a subscription with no orders the tab should not appear.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Aleisha Amohia [Wed, 6 Jun 2018 01:48:33 +0000 (01:48 +0000)]
Bug 15766: (follow-up) Fixing layout of description button
This patch moves the 'Save' button to the toolbar as suggested. The
description textbox and 'Save' button are hidden if the batch is new and
appears when items are added.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Owen Leonard [Thu, 31 May 2018 16:54:43 +0000 (16:54 +0000)]
Bug 15766: (follow-up) Correct merge errors
This patch corrects some problems applying this on current master and
removes an old merge conflict marker.
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>