Bug 19401

Summary: No confirm message when deleting an invoice from invoice detail page
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: AcquisitionsAssignee: Aleisha Amohia <aleisha>
Status: CLOSED FIXED QA Contact: Kyle M Hall <kyle>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, jonathan.druart, katrin.fischer, kyle, nick
Version: unspecifiedKeywords: Academy
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19429
Change sponsored?: Sponsored Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 19753    
Attachments: Bug 19401: Add confirm message when deleting invoice
Bug 19401: Add confirm message when deleting invoice
Bug 19401: Add confirm message when deleting invoice

Description Aleisha Amohia 2017-10-03 02:50:51 UTC
To reproduce
1) Go to Acquisitions
2) Go to Invoices (left nav menu)
3) Click Search (no need to filter results)
4) Click dropdown menu for an invoice, click Details
5) Click Delete
6) Notice invoice is deleted instantly
Comment 1 Aleisha Amohia 2017-10-03 02:54:20 UTC Comment hidden (obsolete)
Comment 2 Katrin Fischer 2017-10-03 07:54:27 UTC
Academy: Requires that you order and receive something first, but easy to test if you already have some acq data.
Comment 3 Katrin Fischer 2017-10-07 12:55:54 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2017-10-07 12:57:11 UTC
Hi Aleisha, this works nicely! I have filed another bug report for the invoice search page that is also missing the confirmation message: bug 19429
Comment 5 Kyle M Hall 2017-12-21 14:01:05 UTC
Created attachment 70025 [details] [review]
Bug 19401: Add confirm message when deleting invoice

To test:
1) Go to Acquisitions
2) Go to Invoices (left nav menu)
3) Click Search (no need to filter results)
4) Click dropdown menu for an invoice, click Details
5) Click Delete
6) Notice invoice is deleted instantly
7) Apply patch and repeat steps 4 and 5
8) Confirm the confirm message shows and works as expected

Sponsored-by: Catalyst IT

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Jonathan Druart 2017-12-21 15:25:29 UTC
Owen, what would be the best pattern to follow here?
I think id="delete" is not specific enough, it should be id="delete_invoice"
id or class? See bug 19429.
Comment 7 Owen Leonard 2017-12-21 15:38:10 UTC
I think "delete_invoice" is better, but it's more a matter of style than functionality. ids should always be unique, so if we're validating the markup as we go we'll be warned about duplicates.

On this page an id is the right choice over a class because it will always be a unique element. In Bug 19429 it must be a class because the element repeats for each invoice in the table which can be deleted.
Comment 8 Jonathan Druart 2017-12-21 16:23:27 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 9 Nick Clemens (kidclamp) 2018-01-15 16:43:20 UTC
Awesome work all, pushed to stable for 17.11.02
Comment 10 Fridolin Somers 2018-01-25 09:31:33 UTC
Pushed to 17.05.x for v17.05.09