Andrew Isherwood [Fri, 29 Jun 2018 08:23:38 +0000 (09:23 +0100)]
Bug 20968: (follow-up) Replace tabs with spaces
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Kyle M Hall [Wed, 27 Jun 2018 17:21:53 +0000 (13:21 -0400)]
Bug 20968: Rename method get_intranet_catalog_toolbar_button to intranet_catalog_biblio_enhancements_toolbar_button
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Kyle M Hall [Wed, 27 Jun 2018 17:13:37 +0000 (17:13 +0000)]
Bug 20968: Add unit tests
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Wed, 27 Jun 2018 16:13:27 +0000 (17:13 +0100)]
Bug 20968: (follow-up) Respond to feedback
This patch:
- Removes the unecessary testing for
intranet_catalog_biblio_enhancements method in detail.pl
- Renames get_toolbar_button to get_intranet_catalog_toolbar_button
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Wed, 20 Jun 2018 11:47:10 +0000 (12:47 +0100)]
Bug 20968: Add hooks into cat-toolbar.inc to display buttons
This commit adds hooks into cat-toolbar.inc to allow the display of
arbitrary buttons as supplied by plugins within the
intranet_catalog_biblio_enhancements class that provide the method
get_toolbar_button
To test:
1) Download the plugin from
https://github.com/PTFS-Europe/cla-permissions-check-plugin
2) Follow the installation instructions from:
https://github.com/PTFS-Europe/cla-permissions-check-plugin
3) TEST: Observe that the "CLA Check Permissions" button takes the user
to the Check Permissions page and a modal displays containing the
results of the query
4) Remove the API key from the plugin "Configuration" page
5) TEST: Ensure that the "CLA Check Permissions" button takes the user
to the Check Permissions page and message displays informing the user
that "Did not receive required request parameters"
Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Marcel de Rooy [Fri, 12 Oct 2018 05:54:24 +0000 (07:54 +0200)]
Bug 14385: (QA follow-up) Additional changes and fixes
[1] searchResults: second my $interface can be removed: unused
[2] call of getitemtypeimagelocation on L2119 needs interface key
[3] ISBDdetail: No need to find patron again (line 182 vs 84)
[4] opac-search: No need to find patron twice (657 and 631)
[5] tabs on line 2220 of C4/Search.pm (qa tools warn)
[6] Ugly hack to overcome "Undefined subroutine &C4::Items::ModZebra"
by loading C4::Items before C4::Biblio when running tests
Koha/BiblioUtils/Iterator.t and Labels/t_Label.t.
This is a more general problem that needs attention somewhere else.
It seems that Biblio.pm is one of the suspects.
[7] This patch set makes Search.t crash/fail with me. Note that without
these patches Search.t still passed! Why o why..
A little debugging pointed me to a missing MPL branch (aarg).
Adding the simple test on the result of Libraries->find in
C4::Biblio::GetAuthorisedValueDesc made the test continue.
[8] Resolve: Variable "$borcat" is not available at opac-detail.pl line 246
Lexical $borcat cannot be used in sub searchAgain in opac-detail.pl
under Plack. Must be defined with our (or passed as argument).
[9] Resolve crash on TWO serious typos in opac-basket on ONE line:
Koha::Patron->find({ borrowernumber -> $borrowernumber })
Yeah: find is in Koha::Patrons and we need => !!
No need to pass a hash to find method btw for a pk value.
[10] Serious bugfixing here. Add List::Util to opac-basket.
Can't locate object method "none" via package "1".
You can't test everything :)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
After this longer list I renamed Final to Additional in the patch title :)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Mark Tompsett [Mon, 5 Mar 2018 20:11:52 +0000 (20:11 +0000)]
Bug 14385: Squash of a lot of patches rebased
- Added missing GetHiddenItems parameter change case
Without this prove t had a failure.
- Always use mocks, not set_preference
- Tweaks so t/db_dependent/00-strict.t passes
There was a typo botcat vs borcat and borrowernumber was never
defined. Grabbing from userenv, like other code does.
- Tweak t/db_dependent/Items.t to fully test changes
This will test all the if structures fully in GetHiddenItemnumbers.
prove t/db_dependent/Items.t
- Tweak borrower category code
$borrower->{categorycode} on a Koha::Patron is not the
same as $borrower->categorycode. Fixed error.
- Search was returning URLS for wrong interface
There was one search context place wrong. Changed it to $is_opac
as the logic for setting $is_opac was modified correctly.
- Corrected issues with category code.
When a user isn't logged in, $borrower is undef and causes error
when determining category code. Added conditional check.
- Properly trigger all changes in C4/Search.pm
- Fix QA Test tool failures
C4/Search.pm had some tabs.
- Add some commenting to make sense of logic
- Refactor EmbedItemsInMarcBiblio parameters to hashref
- Add missing test to trigger Koha/BiblioUtils/Iterator change
- Add borrower category overrides
These files generally add borcat parameter to GetMarcBiblio.
Others might include correction of filtering of items
(opac-basket), or a comment as to why no changes were done
(opac-search).
In the case of opac-search, correcting the first FIXME will
likely correct the OpacHiddenItems issues on tags. As such,
that is beyond this bugs scope.
Some code had loop optimizations and fixes made, like a
'next unless $record' when the biblio shouldn't even be in
the list.
- Modify opac-ISBDdetail and opac-MARCdetail
Both files had similar logic. They were rearranged and
optimized, so that both files would have practically identical
initial blocks of code.
Optimizations were possible, because GetMarcBiblio
returns a filtered record, so that there is no double call
(once in the opac-### file and once in GetMarcBiblio) to
GetHiddenItemnumbers.
- Fix hiding in opac-tags
opac/opac-tags.pl was not properly hiding.
There is currently one known bug associated with tags left.
If you have two biblios tagged by different people with the
same tag, the opac-search will show the one you tagged that
is supposed to be hidden, because tag searches work differently
than regular searches. This is beyond the scope of this bug.
See the FIXME's in opac/opac-search.pl
- Trigger the C4::ILSDI::Services changes
prove t/db_dependent/ILSDI_Services.t
- Added missing 'my'
- Test C4/Labels/Label.pm changes
- Improve C4::Record::marcrecord2csv test cases
- Corrected opac-details searchResult call
- Fix breaking issues constraint in ITerator test
- Fix ILSDI_Services test when clubs with branch exist
Bug 14385: (follow-up) Changes to sysprefs.sql and atomicupdate
Run updatedatabase.pl when testing
Sponsored-by: Catalyst IT Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Changes the API for calling GetHiddenItems and all the places in the code that call it. This is to allow borrower categories to be passed in.
Adds an OpacHiddenItemsExceptions syspref to allow certain borrower categories to be able to see items, even if they are marked hidden by OpacHiddenItems
To test:
1) Make two borrowers, one in a category that should see everything (ie Adult), and another in a category that should only see certain things (ie Adult - exceptions)
2) Add the borrower that can see everything (the Adult) to OpacHiddenItemsExceptions
3) To the OpacHiddenItems syspref, add an item type (ensure that you have some records that fall under this type in your library).
4) Log in as the borrower that should only see certain things (Adult - exception)
5) Do a search, filtered to show records which are the item type that you specified in the OpacHiddenItems syspref. No records should show for this borrower as this item type is hidden to them.
6) Log in as the borrower that should see everything (Adult)
7) Do the same search. There should be results from this search, as this borrower category has been specified as an exception to the hidden items
Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Wed, 24 Oct 2018 01:17:51 +0000 (01:17 +0000)]
Bug 21640: Enable output to STDOUT for Itiva outbound script
To test:
1 - Enable the TalkingTechItivaPhoneNotification
2 - Copy 'HOLD' notice 'email' transport to the phone section
3 - Enable EnhancedMessagingPreferences
4 - Find a patron and enable 'phone' for the 'Hold filled' notice
Note: You might not be able to do this straightaway, bug 21639
If the phone box has a '-' and not a checkbox:
sudo koha-mysql kohadev
INSERT INTO message_transports (message_attribute_id,message_transport_type,is_digest,letter_module,letter_code) VALUES (4,'phone',0,'reserves','HOLD');
5 - Place a hold for the patron
6 - Check it in and confirm the hold to set it waiting
7 - sudo koha-shell kohadev
8 - perl misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl --type=RESERVE -w 0 -v
9 - Note the Output says it will be on STDOUT, but nothing is output
10 - Apply patch
11 - repeat
12 - Hold info is output to command line
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Fri, 28 Sep 2018 12:44:16 +0000 (13:44 +0100)]
Bug 20996: (follow-up) Fix column name expectation
This bug changes how request metadata is obtained. Previously the
appropriate backend's metadata function would return it. For at least
the FreeForm backend, the metadata property names we title cased. The
datatable JS was expecting this and breaks with the new metadata getting
which is performed in the API controller, which just returns the
property names as they appear in the DB.
This patch changes the expectation of the JS to match what's coming back
from the API
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Tested by repeatedly loading the API-call
http://intranet/api/v1/illrequests?embed=metadata,patron,capabilities,library
in Chromium and watching the reported time to load the URL. There
is a siginificant decrease in the time with the patches compared to
the time it takes without the patches. I had some concerns along the
way, but they have all been fixed.
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Tested by repeatedly loading the API-call
http://intranet/api/v1/illrequests?embed=metadata,patron,capabilities,library
in Chromium and watching the reported time to load the URL. There
is a siginificant decrease in the time with the patches compared to
the time it takes without the patches. I had some concerns along the
way, but they have all been fixed.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Tue, 25 Sep 2018 14:19:53 +0000 (15:19 +0100)]
Bug 20996: (follow-up) Add <branch> to conf tpl
Since we now require the <branch> block, we should add it to the config
templates
Signed-off-by: Magnus Enger <magnus@libriotech.no> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
We were immediately unblessing all request objects after retrieval then,
at a later stage, re-instantiating each one so we could call methods on
that. This was a very bad idea. We now preserve the objects for as long
as we can.
Signed-off-by: Magnus Enger <magnus@libriotech.no> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
- Remove unit tests relating to TO_JSON
- Add tests for new explicit embedding
- Modify tests relating to now deprecated brw_cat
Signed-off-by: Magnus Enger <magnus@libriotech.no> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch removes the potential use of borrower category as a ILL
request ID prefix. It makes no sense. We provide the ability for a site
to define a request prefix based on branch, there is no use case for
using the borrower category. Add to this that the borrower for every
request was being retrieved in order to get the category, it's a huge
performance hit also.
We also now require the <branch> block in the <interlibrary_loans> block
and complain if it's not present. The request prefix should be defined
in this block.
This patch also improves the performance of the API request that returns all
requests, optionally including additional data.
It also deprecates the overloaded TO_JSON method and moves the request
augmentation code into the API route's controller. It may be that we
want to shift it out of there at some point, but it is fine where it is
for now.
Signed-off-by: Magnus Enger <magnus@libriotech.no> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Thu, 18 Oct 2018 21:10:19 +0000 (18:10 -0300)]
Bug 21604: Fix add/edit fund/budget
[Strict SQL modes context]
For insert aqbudgetperiods:
Incorrect integer value: '' for column 'budget_period_id'
For insert/update aqbudgets
Incorrect integer value: '' for column 'budget_owner_id'
Incorrect decimal value: '' for column 'budget_encumb'
Test plan:
Add/edit budgets and funds
A good example of why we should use Koha::Object for all our objects
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Fri, 19 Oct 2018 13:37:26 +0000 (14:37 +0100)]
Bug 21620: Prevent stockrotation cronjob failures
Superflous use of sprintf combined with rebasing issue left the
stockrotation cronjob such that a 'No action taken' email report would
catastrophically fail with the error:
Redundant argument in sprintf at ./stockrotation.pl line 316
This patch both resolves the error and cleans up some additional
unrequired sprintf usage.
Test Plan
1) Create a rotation plan
2) Add some items to the rotation plan
3) Run the cronjob using `stockrotation.pl --report=email --send-email
--execute`
4) Note the lack of errors
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Thu, 25 Oct 2018 16:34:44 +0000 (13:34 -0300)]
Bug 21656: Update 4 missing sample_notices.sql
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Thu, 25 Oct 2018 16:32:17 +0000 (13:32 -0300)]
Bug 21656: Reduce the risk of possible side-effects
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Mark Tompsett [Thu, 25 Oct 2018 15:30:10 +0000 (15:30 +0000)]
Bug 21656: (follow-up) Fix atomicupdate
The atomicupdate is going to run as part of an upgrade.
It needs to UPDATE, not INSERT.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Wed, 24 Oct 2018 10:14:56 +0000 (11:14 +0100)]
Bug 21656: Fix for bad TT syntax in default stock rotation notice
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Magnus Enger [Tue, 16 Oct 2018 19:25:43 +0000 (21:25 +0200)]
Bug 21585: Ignore missing firstname in ILL requests table
To test:
- Make sure you have a patron with just a surname and no firstname
- Create an ILL request so that the name of this patron shows up in
the Patron column of the ILL requests table
- Before the patch, the name will display as "null Surname"
- Apply the patch
- Reload the ILL requests page
- The name should now display as just "Surname"
- Sign ye merrily off
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>
Jonathan Druart [Mon, 29 Oct 2018 21:16:19 +0000 (18:16 -0300)]
Bug 21717: Fix generation of real's values
With strict SQL modes we now have TestBuilder tests that fail randomly with:
Out of range value for column 'tax_rate_on_receiving'
Out of range value for column 'discount'
We are trying to insert a value that is too high for the type defined at DB level.
It happens for discount when a value > 100 is generated. The datatype is float(6,4).
From the MySQL Doc:
"""
MySQL permits a nonstandard syntax: FLOAT(M,D) or REAL(M,D) or DOUBLE PRECISION(M,D).
Here, (M,D) means than values can be stored with up to M digits in total, of which D digits may be after the decimal point.
"""
So float(6,4) does not allow 100.
To recreate easily the issue:
use t::lib::TestBuilder;
my $builder = t::lib::TestBuilder->new;
$builder->build( { source => 'Aqorder', value => { discount => 100 } } )->{discount};
To make sure this patch fixes the issue you can use this script:
use Modern::Perl;
use t::lib::TestBuilder;
my $builder = t::lib::TestBuilder->new;
my ( $real, $i ) = ( 0, 0 );
while ( $real < 100 ) {
$real = $builder->_gen_real( { info => { size => [ 6, 4 ] } } );
warn $i++;
}
warn "$i - $real";
Test plan:
0/ Does not apply this patch
1/ Run the snippet above
2/ Confirm that it fails quite quickly (constantly before 500 for me)
3/ Apply this patch
4/ Run again the script
5/ Confirm that it is stuck in an infinite loop
6/ CTRL-C :D
QA Note:
Other _gen_* subroutine may need a fix, but we will wait for them to fail
TODO:
1. Add JS check to the interface to prevent the use to enter a value > 100
2. Allow '100' as a valid value for discount (?)
Followed test plan, patch worked as described 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>
Jonathan Druart [Tue, 16 Oct 2018 17:52:25 +0000 (14:52 -0300)]
Bug 21556: Do not crash if a biblio is deleted twice
To recreate:
- Go to a bibliographic detail page
- Delete it
- Go back
- Delete it again
=> Without this patch you will get a 500
Can't call method "holds" on an undefined value at
/home/vagrant/kohaclone/C4/Biblio.pm line 406.
=> With this patch applied it will silently redirect you to the search
form.
Note: We could/should improve the behavior and display a message, but
DelBiblio will need to be moved to Koha::Biblio->delete and other
callers adjusted
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>
David Cook [Fri, 12 Oct 2018 01:53:22 +0000 (01:53 +0000)]
Bug 21556: Deleting same record twice leads to fatal software error
If you delete a record, confirm the deletion, and try to delete the
record and confirm it again befoe the first deletion completes, you'll
generate a fatal software error.
This patch unbinds the click handlers for the "Delete record" button
after the deletion is confirmed and just before the Javascript
processes the redirect to the next page in the process.
To test:
1) You will need a bibliographic record that is able to be deleted
2) Click "Edit", then "Delete record", then "OK"
3) While the browser is reloading, click "Edit", then "Delete record",
then "OK
4) Observe a fatal error such as "Internal server error" or 'Can't call
method "holds" on an undefined value at
/home/vagrant/kohaclone/C4/Biblio.pm line 406.'
5) Apply the patch
6) Run "restart_all" on kohadevbox (or otherwise restart Plack if
running Plack)
7) Navigate to another bibliographic record that is able to be deleted
8) Click "Edit", then "Delete record", then "OK"
9) While the browser is reloading, click "Edit", then "Delete record"
10) Observe that no fatal software error is generated
11) You are redirected to
http://localhost:8081/cgi-bin/koha/catalogue/search.pl (on kohadevbox)
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Tue, 30 Oct 2018 11:59:26 +0000 (11:59 +0000)]
Bug 21725: Use full statement in HAVING rather than constructed column
To test:
1 - prove -v t/db_dpendent/Acquisition/GetBasketsInfosByBookseller.t
2 - Apply patch
3 - prove -v t/db_dpendent/Acquisition/GetBasketsInfosByBookseller.t
4 - It passes
5 - Have some open/closed and some fully and not full received baskets
6 - View a vendor and confirm baskets are shwn as expected
7 - Check 'Show all baskets' shows all baskets
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Note sure this is the best thing but it fixes the issue
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Fri, 26 Oct 2018 10:55:54 +0000 (11:55 +0100)]
Bug 21682: Corrections for strict sql in stockrotationrotas
Test Plan:
1) Ensure you're database is prior to version 18.06.00.040
2) Ensure 'strict_sql_modes' is enabled
3) Run updatedatabase
4) See no errors during upgrade
5) Run a fresh install
6) Note no errors during database installation
Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Tue, 23 Oct 2018 12:30:25 +0000 (12:30 +0000)]
Bug 21476: Fix HTML5 media from playing in the OPAC - incorrect filters
This patch makes a correction to a template filter to prevent
incorrectly-encoded HTML in media source links which were preventing
media from embedding correctly in the OPAC.
To test, apply the patch and enable the HTML5MediaEnabled and
HTML5MediaYouTube system preferences.
- Edit a record to include links to videos in 856$u. For example:
- https://www.youtube.com/watch?v=grTwH6Evdfc
- https://archive.org/download/POPEYEMeetsSindbadTheSailor1936/POPEYE%20meets%20Sindbad%20The%20Sailor%20%281936%29.ogv
View the record in the OPAC and confirm that the videos display in
the
"Play media" tab and that they play correctly.
Tested and works as described, also matches the intranet code.
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nick Clemens [Wed, 31 Oct 2018 12:18:58 +0000 (12:18 +0000)]
Bug 21742: Fix YouTube variable propagation
The loop to find all media has an $isyoutube variable. This was declared
outside the loop and never reset. Once a YouTube video was encountered
all subsequent videos were considered as YouTube. This patch reduces the
scope of the variable and resets per loop.
To test:
1 - Enable HTML5Media and HTML5MediaYouTube
2 - Add 856$u to record for a youtube vido and a pdf (sample record
attached to bug)
3 - View the record, the Play media tab has two video boxes
4 - Play the second, it fails
5 - Apply patch
6 - View record, Play media should include only one video link
Signed-off-by: Devinim <kohadevinim@devinim.com.tr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Jonathan Druart [Fri, 26 Oct 2018 18:19:36 +0000 (15:19 -0300)]
Bug 21681: Improve the account lines fetch
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 [Fri, 26 Oct 2018 18:25:09 +0000 (15:25 -0300)]
Bug 21681: Add tests for GetPatronInfo
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>
Josef Moravec [Fri, 26 Oct 2018 10:05:11 +0000 (10:05 +0000)]
Bug 21681: Remove C4::Accounts::getcharges
Test plan:
0) Do not apply the patch
1) Enable ILS-DI
2) Go to
<opac_url>/cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=51&show_fines=1
use patron with some paid and unpaid fines
3) Save the page for later usage
4) Apply the patch
5) Repeat 2 with same patron and compare the saved result with the new
one, they should be same
6) git grep getcharges should return no occurance
7) prove t/db_dependent/Accounts.t
Co-authored-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> 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 [Fri, 26 Oct 2018 18:08:51 +0000 (15:08 -0300)]
Bug 21694: Keep the context
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Martin Renvoize [Fri, 26 Oct 2018 17:34:35 +0000 (18:34 +0100)]
Bug 21694: Add the Koha::Account->lines method
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Magnus Enger [Fri, 26 Oct 2018 20:47:16 +0000 (22:47 +0200)]
Bug 21698: Fix POD of cancel_unfilled_holds.pl
To test:
- Run "perldoc misc/cronjobs/holds/cancel_unfilled_holds.pl"
- Notice some problems:
-- No description in the NAME section
-- Descriptions of options in the SYNOPSIS section
-- A literal head1
-- Long options are listed with a single leading dash
-- Options --verbose and --confirm are not listed under OPTIONS)
- Take a look at the script itself to see that --verbose and
--confirm should be listed.
- Also note the typo on line 97: 'v|verbosev' => \$verbose,
- Apply the patch
- Look at the script and perldoc again and check that all problems
described above are now fixed.
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>
Josef Moravec [Mon, 5 Jun 2017 09:55:12 +0000 (11:55 +0200)]
Bug 18720: Use exception instead of die in GetBasketAsCsv
Test plan:
prove t/db_dependent/Acquisition/GetBasketAsCSV.t
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>
Clearing up the inconsistency mentioned in comment #35. There is one
place where we use the term 'media' for a template variable, everywhere
we refer to material types as 'types'.
NOTE: This is a breaking change for existing backends that still use
'media'. Of the PTFS Europe backends, only the Koha backend uses it,
this will be modified as necessary. Generally backends will supply this
variable themselves, so the breaking-ness of this change should be
minimal.
No test plan as it's backend dependent.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Andrew Isherwood [Thu, 14 Jun 2018 13:26:02 +0000 (14:26 +0100)]
Bug 20941: Add Illrequest->getType method
This patch adds a method to the Illrequest object enabling it to return
its type, which is stored as an Illrequestattribute object
To observe broken state:
- Do not apply patch
- Ensure you have at least one Interlibrary loan created
- In OPAC view, go to "your interlibrary loan requests"
- => TEST: Observe that the "Request type" column is not populated
- Click on "View" for one of the requests
- => TEST: Observer that the "Request type" row is not populated
- In Staff view, go to "ILL requests"
- Click on "Manage request" on a request
- => TEST: Observer that the "Request type" row is not populated
To Test:
- Apply patch
- In OPAC view, go to "your interlibrary loan requests"
- => TEST: Observe that the "Request type" column IS populated
- Click on "View" for one of the requests
- => TEST: Observer that the "Request type" row IS populated
- In Staff view, go to "ILL requests"
- Click on "Manage request" on a request
- => TEST: Observer that the "Request type" row IS populated
Signed-off-by: Niamh.Walker-Headon@it-tallaght.ie Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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>