Commit graph

35236 commits

Author SHA1 Message Date
414ab9b166
Bug 23197: Add more batch operation options to SQL report results
This patch extends the feature which allows the user to send item
numbers from a page of report results to batch item modification. For
biblionumbers: Batch record modification, batch record deletion, and
add to list are now available. For item numbers: batch item deletion is
added.

A new menu button is added for these options at the top of report
results, removing the button from the item number column header.
Corresponding CSS has been removed.

To test, apply the patch and create a report which includes both
biblionumber and itemnumber columns in the results.

 - Run the report and confirm that a new "Batch operations" button
   appears at the top of the results. Test each option:
   - Batch record modification
   - Batch record deletion
   - Add to list
   - Batch item modification
   - Batch item deletion

In each case the correct set of parameters should be passed to the batch
operations. Test with reports which return only biblionumbers, only
itemnumbers, and neither.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:06 +01:00
f41533c49d
Bug 23094: Use Bootstrap-style pagination on staged MARC records page
This patch makes markup changes in order to make the pagination links on
the staged MARC records page consistent with the links on the catalog
search results page.

To test properly you should have enough staged marc record batches that
there are multiple pages to list.

Go to Tools -> Manage staged MARC records. Test that the pagination
links look consistent with the catalog search results page and that they
work correctly.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:06 +01:00
4068484650
Bug 23221: (follow-up) Add comments on markup structure
This patch adds a few comments to the markup in order to highlight the
structure of the page.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:06 +01:00
cd66074205
Bug 23221: Reindent tools/manage-marc-import.tt
This patch reformats the template for the Manage staged MARC records
page. It makes only whitespace changes. It should have no effect on the
behavior of the page.

In addition to re-indentation, some lines have been broken up. These
should be the only changes highlighted when using diff while ignoring
whitespace.

To test, apply the patch and view the Manage staged MARC records page.
The page should look correct and work correctly:

 - Paging through results
 - Viewing batches
 - Cleaning batches
 - Deleting batches

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:05 +01:00
b59dc761d7
Bug 19919: Unit Tests
This patch adds unit tests for the addition of a patron accessor to the
Koha::Account::Line object.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:05 +01:00
0f54a1f8c6
Bug 19919: Stop using paidfor altogether
This patch removed references to setting and getting the items.paidfor
field. Where it was used for display, in moredetail.pl, we replace it
with a query on the accountlines.

Test plan:
1) Apply patch
2) Pay off a LOST item
3) Check for the associated display of 'Paidfor?:' on the itemdetails
page
4) Writeoff a LOST item
5) Check that a 'Paidfor?:' is not displayed on the itemdetails page.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:05 +01:00
92bf8082c3
Bug 22563: DBRev 19.06.00.012
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:04 +01:00
9b4da7594f
Bug 22563: (follow-up) Fix tests in Koha/Account.t
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:04 +01:00
6f356cecc3
Bug 22563: Typo in query (manualinvoice)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:03 +01:00
dd63cb6b8e
Bug 22563: (QA follow-up) Correction to DB update
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:03 +01:00
c437f84a65
Bug 22563: (QA follow-up) Catch LOST maninvoice cases
One could add a manual invoice of type LOST but we would not associate
it with an issue_id. This patch tries to catch such cases and
extrapolate an issue_id to add to the accountline.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:03 +01:00
40c0ebb219
Bug 22563: (QA follow-up) Use issue_id in chargelostitem
C4::Accounts::chargelostitem contained a FIXME which asked if an item
should be charged for it lost, returned and then lost again. We add
handling for that case here.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:02 +01:00
d2c76ac420
Bug 22563: (follow-up) Clean up remaing L, LR and CR cases in the database
Test plan:
1) Confirm that after the DB update there are no L, LR or CR
accountlines present.
2) Read the db update and confirm is makes sense.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:02 +01:00
f4f608faa6
Bug 22563: (follow-up) Corrections for overdue tests
Updates to unit tests to reflect the accounttype changes and introduction of
status usage for _FixOverduesOnReturn.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:02 +01:00
de29f6b4a2
Bug 22563: (follow-up) Items LOST should not be RETURNED
Up until now we marked lost items as returned in the accountlines, now
we have the oportunity to mark these distinctly with an appropriate
status we should.

Test Plan
1) Find an overdue with fines
2) Ensure you are not forgiving fines when an item is marked as lost
3) Mark the item as lost
4) Confirm the Fine is given a status of 'Lost'

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:01 +01:00
e1e0cb67d0
Bug 22563: (follow-up) Corrections for tests
Updates to unit tests to reflect the accounttype changes and
introduction of status usage.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:01 +01:00
b954dce9dd
Bug 22563: Update lost handling to use accountline.status
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:01 +01:00
e3c5892f52
Bug 22563: Be more descriptive with accountypes
Convert 'L' to 'LOST' to become more descriptive in it's use.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:00 +01:00
6ec92845c7
Bug 18930: DBRev 19.06.00.011
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:00 +01:00
2ba0d3e627
Bug 18930: (QA follow-up) Remove debug code
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:00 +01:00
Agustin Moyano
282f5d288d
Bug 18930: (follow-up) Change variable used in refund select for default options
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:00 +01:00
Agustin Moyano
9dbaefddb8
Bug 18930: (follow-up) Amend search parameter in Koha::RefundLostItemFeeRules->_default_rule
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:00 +01:00
Agustin Moyano
ace2651aa7
Bug 18930: (follow-up) Amend Koha::RefundLostItemFeeRules->find
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:28:00 +01:00
780b377db2
Bug 18930: (follow-up) Make DB update idempotent
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:27:59 +01:00
5512f94505
Bug 18930: Do not insert '*' in circulation_rules
We must insert NULL instead, otherwise the FK constraint will fail

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:27:59 +01:00
fd63fe7d12
Bug 18930: Move lost item refund rules to circulation_rules table
This patch will move the list item refund rules from a dedicated table to the circulation_rules table.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Verify lost item refund rules remain unchanged

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:27:59 +01:00
fcc22df8ff
Bug 13597: Make staff client Amazon no image results match OPAC
The point is to make staff client HTML for missing Amazon cover
images more equivalent to that of the OPAC

To test:
1 - Enable Amazon images everywhere
2 - Search on the staff and OPAC to get some results without
    Amazon covers (missing ISBNs and bad ISBNs)
3 - Note OPAC missing images are like:
<span class="no-image">No cover image available</span>
4 - Note staff client are like:
<img src="https://images-na.ssl-images-amazon.com/images/G/01/x-site/icons/no-img-sm.gif" alt="" class="thumbnail" />
5 - The staff links do not lend themselves to easy CSS hiding/styling
6 - Apply patch
7 - Repeat
8 - Note increased consistency

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:27:59 +01:00
e269d6e6e6
Bug 18707: Background jobs post disabled inputs
For example, in Tools > Batch item modification input of deleted subfields are disabled.
This form is posted using background job via JS code.
Looks like this JS code converts a POST form into a GET URL, including inputs that are disabled :

koha-tmpl/intranet-tmpl/prog/js/background-job-progressbar.js
function submitBackgroundJob(f) {
...
$(':input', f).each(function() {
...

This patch add a :enabled to selector

Test plan :
<to define>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:27:59 +01:00
fd5686b156
Bug 12537: Don't retrieve XISBN results for the same biblionumber
For a biblio with multiple ISBNS we sometimes get our own record back when
check XISBN, we should test for this

To test:
1 - Edit a record in the catalogue, add two isbns:
     0521240670
     0521284198
2 - Enable ThingISBN and FRBRizeEditions and OPACFRBRizeEditions
3 - View the record in staff and OPAC
4 - You should see editions tab pointing to the same record
5 - Apply patch
6 - Reload the record details, you should no longer see editions tab
7 - Add the second ISBN to another record
8 - Reload details for original record, you shoudl see editions linking to the record with second ISBN
9 - prove -v t/db_dependent/XISBN.t

NOTE: Current tests don't work under elasticsearch, but the code does, tests should be rewritten on another bug

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Arthur Bousquet <arthur.bousquet@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:27:59 +01:00
f45516e73a
Bug 23192: Correct tab input on waiting_holds.inc
To test:
 1 - Place 2 holds
 2 - Confirm the holds
 3 - In the db change the expiration date:
UPDATE reserves SET expirationdate = '2019-01-01';
 4 - Go to Home->Circulation->Holds awaiting pickup
 5 - View your holds on the 'Holds waiting over' tab
 6 - Inspect the cancel button for one of the holds, note tab = "holdswaiting"
 7 - Apply patch
 8 - Refresh the page
 9 - Inspect the buttton, note tab = "holdsover"
10 - Cancel the hold
11 - Note you return to the holds over tab

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:27:59 +01:00
076d5be767
Bug 23266: Add to cart fires twice on shelf page
Remove some duplicate functionality between opac-bottom and opac-shelves.

Test plan:
[1] Before this patch, add to cart from a shelf page. Observe that the
    basket count is incremented with 2.
[2] After this patch, it should be incremented with 1.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:27:58 +01:00
f447658f85
Bug 23194: Fix other occurences
Throughout staff client and course reserves we also show the field with HTML filter, maybe we shouldn't?

The items lost report also included the note as a title element on title and barcode links, I removed this
as the note displays in that table

To test:
 1 - Add a link to publicnotes for an item
<a href="www.google.com">Cats!</a>
 2 - View opac details, confirm the note is a link
 3 - Same for staff side
 4 - Add item to a course reserve
    UseCourseReserves  preference must be set to 'Use'
    From the course reserves module you will need to add a course (and possibly a department first)
    Adding should be intuitive
 5 - Confirm note is a link in course details on staff and opac
 6 - Perform a batch checkout, confirm the itemnote shows as a link
     You will need to enable the system preference:  BatchCheckouts and add a patron category to:  BatchCheckoutsValidCategories
     Then a link should be available from checkout for a patron in that category
 7 - Mark the item as lost
 8 - Go to Reports->Items lost
 9 - Confirm the note is a URL and that title and barcode links don't show the note
10 - Click the barcode to go to moredetails for the item - in this case note should display as editable text, not a link

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: frederik chenier <frederik.chenier@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:27:58 +01:00
3f40c32cbb
Bug 23194: Allow HTML in item public notes to be processed on OPAC details
Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: frederik chenier <frederik.chenier@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:27:58 +01:00
d88709ec2d
Bug 23227: Remove type attribute from script tags: Reports
This patch removes the "type" attribute from <script> tags in two
reports templates.

To test, apply the patch and confirm that examples of affected pages
work properly without any JavaScript errors in the browser console:

 - Reports -> Dictionary
   - Delete
   - Specifying a date range for a date column
 - Reports -> Items lost
   - Report results
     -> Datatables functionality
     -> Selection tools for export

Validating the HTML source of any of these pages should return no errors
related to the "type" attribute.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: frederik chenier <frederik.chenier@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:27:58 +01:00
0658d84732
Bug 22957: Remove type attribute from script tags: Staff client includes 1/2
This patch removes the "type" attribute from <script> tags in several
staff client include files. Also removed: Obsolete "//<![CDATA[ //]]>"
markers.

This patch also makes minor indentation changes, so diff using the "-w"
flag.

To test, apply the patch and confirm that examples of affected pages
work properly without any JavaScript errors in the browser console:

 - Acquisitions -> Vendor (uses acuisitions-toolbar.inc)
 - Acquisitions -> Vendor -> Add to basket -> From a new (empty) record
   (uses additem.js.inc)
 - Catalog -> Search results -> Bibliographic detail view. (uses
   browser-strings.inc, catalog-strings.inc, datatables.inc, and
   format_price.inc )
 - Tools -> Label creator -> Manage -> Label batches -> Export batch
   (uses greybox.inc)

Validating the HTML source of any of these pages should return no errors
related to the "type" attribute.

Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:27:58 +01:00
178a805a5d
Bug 22951: (follow-up) Fix indentation
This patch fixes indentation related to the markup corrections in the
previous patch. It contains no textual changes.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Signed-off-by: frederik chenier <frederik.chenier@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:27:58 +01:00
e0991ae235
Bug 22951: Markup error in OPAC holds template
This patch makes minor markup changes to the OPAC holds template in
order to fix validation errors.

To test, apply the patch and go through the process of placing a
hold in the OPAC. Test various aspects of the process, including cases
where the hold is blocked and an error message is displayed (for
instance, when there are no items to be placed on hold).

The page should work correctly and validating the source should
return no relevant errors.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Frederik Chenier <frederik.chenier@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:27:57 +01:00
Mark Tompsett
5c5d158b1b
Bug 21000: Force case sensitivity on Getopt::Long
Before patch: -D and -d are mistaken for --debug

    $ sudo DEB_BUILD_OPTIONS=nocheck ./debian/build-git-snapshot -r ~/debian -v 19.06~git --autoversion -d -D="stretch"
    Option d does not take an argument
    git status --porcelain -unormal
    git rev-parse --short=8 HEAD
    dch --force-distribution -D "squeeze-dev" -v "19.06~git+20190627205913.466f99e4-1" "Building git snapshot."
    dch warning: Recognised distributions are:
    experimental, unstable, testing, stable, oldstable, oldoldstable,
    {bullseye,buster,stretch,jessie,wheezy}-proposed-updates,
    {testing,stable,oldstable,oldoldstable}-proposed-updates,
    {bullseye,buster,stretch,jessie,wheezy}-security,
    {testing,stable,oldstable,oldoldstable}}-security, jessie-backports, stretch-backports and UNRELEASED.
    Using your request anyway.

NOTE: squeeze-dev in the first dch line and warning about Option d.

Apply patch: -D and -d are differentiated correctly.
    $ sudo DEB_BUILD_OPTIONS=nocheck ./debian/build-git-snapshot -r ~/debian -v 19.06~git --autoversion -d -D="stretch"
    git status --porcelain -unormal
    git rev-parse --short=8 HEAD
    dch --force-distribution -D "stretch" -v "19.06~git+20190627210316.b3f919a7-1" "Building git snapshot."
    dch warning: Previous package version was Debian native whilst new version is not
    dch -r "Building git snapshot."

NOTE: No more 'Option d' error, and "stretch" in the first dch line.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:27:57 +01:00
d4f41cc8aa
Bug 23018: Refunding a lost item fee may trigger error if any fee has been written off related to that item
If a lost item fee is written off, it creates a writeoff with the same itemnumber but the amount column is a negative number.

Now, when the lost item is returned, it calls _FixAccountForLostAndReturned which searchs for all accountlines with an account type of 'L' or 'W'.

Then, if the *first* of those lines has an outstanding balance, a credit is created and *all* the lines found are passed to $credit->apply. The apply method then calls is_debit on each line and when it hits the writeoff, it throws an exception ( Koha::Exceptions::Account::IsNotDebit ).

When this happens, the credit is creating but not applied the the outstanding lost item fee, and the librarian is presented with an error page.

It seems like the solution is to only fetch the first result since it seems like that is the only one we should be operating on.

Test Plan:
1) Create a lost item with a fee
2) Create a manual debit using the barcode of the item
3) Write off that manual debit
4) Check in the item, note the error
5) Apply this patch
6) Repeat steps 1-3
7) Check in the item, no error!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:27:57 +01:00
67f8686815
Bug 19012: Note additional columns that are required during patron import
This adds surname and cardnumber to the list of required columns on the
import tool screen and help page

To test:
Read the updated notes, verify it is true and understandable

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:27:57 +01:00
d25f3e8437
Bug 22709: (RM follow-up) Clean up plugin tests
The plugin tests were failing due to failed rollbacks and run order.
This patch moves them into their own directory and adds a reset test to
restore the original state of the plugin system after the tests have
run.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-15 11:23:10 +01:00
54c5ec977c
Bug 22709: (RM follow-up) Enable plugin in tests
Now that we clean up properly in t/db_dependent/Plugins.t when we reload
the Koha::Plugin::Test plugin we must also enable it for the tests to
function.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-09 11:22:39 +01:00
428d0e6112
Bug 23284: Remove test duplication
A duplicate test was introduced during rebaseing work on bug 21073

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-09 08:27:40 +01:00
803e209e37
Bug 22709: (RM follow-up) Add rollback to plugin test
Rollback for InstallPlugins

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-08 18:34:40 +01:00
481d346131
Bug 23280: Silence warning
Corrects a typo in t/db_dependent/selenium/patrons_search.t introduced
by bug 22781.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-08 17:42:11 +01:00
22c99262ec
Bug 23230: (RM follow-up) Add rollback to plugin test
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-08 12:16:56 +01:00
Mark Tompsett
611b60ea96
Bug 23199: (follow-up) Fix tab/space issues
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-05 08:44:59 +01:00
Mark Tompsett
e53bed5375
Bug 23199: Added tests for Koha::Patron
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-05 08:44:28 +01:00
fa390ca232
Bug 23199: Koha::Patron->store must check 'uppercasesurname' syspref
Test plan:
1/ set uppercasesurname to 'Do'
2/ register a new patron using the REST API with lowercase surname
3/ verify the surname is not saved in uppercase
4/ apply patch
5/ repeat 2
6/ verify the surname now is saved to uppercase

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-05 08:43:44 +01:00
9796f5adb3
Bug 23077: Fix import of cardnumber 0
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-07-05 08:41:48 +01:00