Bug 39258

Summary: Remove extra delete button in report preview modal
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: Staff interfaceAssignee: Andrew Fuerste-Henry <andrew>
Status: Pushed to stable --- QA Contact: Emily Lamancusa (emlam) <emily.lamancusa>
Severity: trivial    
Priority: P5 - low CC: baptiste.wojtkowski, david, emily.lamancusa, fridolin.somers, gmcharlt, lisette, lucas, r.delahunty
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
This removes an extra "Delete" button when previewing the SQL for the report from the list of saved reports page. (The duplicate button didn't do anything.)
Version(s) released in:
25.05.00,24.11.08
Circulation function:
Bug Depends on: 35402    
Bug Blocks:    
Attachments: Bug 39258: Delete extra delete button in report preview
Bug 39258: Delete extra delete button in report preview
Bug 39258: Delete extra delete button in report preview
Bug 39258: Remove extra nonfunctional Delete button from report preview modal
Bug 39258: Remove extra nonfunctional Delete button from report preview modal
Bug 39258: Remove extra nonfunctional Delete button from report preview modal

Description Andrew Fuerste-Henry 2025-03-05 20:45:22 UTC
In reports, if you go to Saved Reports and then select Preview SQL for one of your saved reports, you'll get a modal showing your SQL. That modal contains 2 delete buttons. It looks like the second one was added in error in Bug 35402.
Comment 1 Andrew Fuerste-Henry 2025-03-05 21:01:47 UTC Comment hidden (obsolete)
Comment 2 Andrew Fuerste-Henry 2025-03-05 21:03:01 UTC
It is perhaps worth noting that the button I remove with this patch doesn't work to begin with :)
Comment 3 OpenFifth Sandboxes 2025-03-06 08:04:15 UTC
Created attachment 179006 [details] [review]
Bug 39258: Delete extra delete button in report preview

To test:
1 - save a report
2 - click Preview SQL for that report from the Saved Reports page
3 - see there are two delete buttons
4 - apply patch, reload page
5 - now there is one delete button
6 - confirm that delete button gives a confirmation message and then deletes the report

Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk>
Comment 4 Baptiste Wojtkowski (bwoj) 2025-03-20 10:10:41 UTC
Created attachment 179499 [details] [review]
Bug 39258: Delete extra delete button in report preview

To test:
1 - save a report
2 - click Preview SQL for that report from the Saved Reports page
3 - see there are two delete buttons
4 - apply patch, reload page
5 - now there is one delete button
6 - confirm that delete button gives a confirmation message and then deletes the report

Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Comment 5 Katrin Fischer 2025-03-20 13:30:30 UTC
I think you removed the wrong one, the remaining one is not translatable? :)

                             <a class="btn btn-default submit-form-link" href="#" data-id="' + reportid + '" data-action="guided_reports.pl" data-method="post" data-op="cud-delete" data-confirmation-msg="' + _("Are you sure you want to delete this report?") + '"><i class="fa fa-trash-can" aria-hidden="true"></i> Delete</a>\
-                            <a id="preview-modal-delete"href="#" class="btn btn-default" title="Delete this saved report"><i class="fa fa-trash-can aria-hidden="true""></i> ' + _("Delete") + '</a>\
Comment 6 Baptiste Wojtkowski (bwoj) 2025-03-20 14:04:52 UTC
Oh sorry for missing that one :O
Comment 7 Andrew Fuerste-Henry 2025-03-20 19:24:26 UTC
Created attachment 179565 [details] [review]
Bug 39258: Remove extra nonfunctional Delete button from report preview modal

To test:
1 - save a report
2 - click Preview SQL for that report from the Saved Reports page
3 - see there are two delete buttons
4 - apply patch, reload page
5 - now there is one delete button
6 - confirm that delete button gives a confirmation message and then deletes the report

7 - Install a second language for the intranet
8 - switch to that language and confirm you have just 1 delete button, it is translated, and it works
Comment 8 David Nind 2025-03-29 10:27:58 UTC
Created attachment 179901 [details] [review]
Bug 39258: Remove extra nonfunctional Delete button from report preview modal

To test:
1 - save a report
2 - click Preview SQL for that report from the Saved Reports page
3 - see there are two delete buttons
4 - apply patch, reload page
5 - now there is one delete button
6 - confirm that delete button gives a confirmation message and then deletes the report

7 - Install a second language for the intranet
8 - switch to that language and confirm you have just 1 delete button, it is translated, and it works

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 Emily Lamancusa (emlam) 2025-04-03 13:43:04 UTC
Created attachment 180530 [details] [review]
Bug 39258: Remove extra nonfunctional Delete button from report preview modal

To test:
1 - save a report
2 - click Preview SQL for that report from the Saved Reports page
3 - see there are two delete buttons
4 - apply patch, reload page
5 - now there is one delete button
6 - confirm that delete button gives a confirmation message and then deletes the report

7 - Install a second language for the intranet
8 - switch to that language and confirm you have just 1 delete button, it is translated, and it works

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 10 Emily Lamancusa (emlam) 2025-04-03 13:43:47 UTC
Looks good, thanks Andrew!
Comment 11 Phil Ringnalda 2025-04-08 23:43:46 UTC
*** Bug 39586 has been marked as a duplicate of this bug. ***
Comment 12 Katrin Fischer 2025-04-11 07:56:01 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 13 Fridolin Somers 2025-08-06 15:17:51 UTC
Pushed to 24.11.x for 24.11.08