Bug 39258 - Remove extra delete button in report preview modal
Summary: Remove extra delete button in report preview modal
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Andrew Fuerste-Henry
QA Contact: Emily Lamancusa (emlam)
URL:
Keywords:
: 39586 (view as bug list)
Depends on: 35402
Blocks:
  Show dependency treegraph
 
Reported: 2025-03-05 20:45 UTC by Andrew Fuerste-Henry
Modified: 2025-04-11 07:56 UTC (History)
7 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
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
Circulation function:


Attachments
Bug 39258: Delete extra delete button in report preview (2.41 KB, patch)
2025-03-05 21:01 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 39258: Delete extra delete button in report preview (2.46 KB, patch)
2025-03-06 08:04 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 39258: Delete extra delete button in report preview (2.53 KB, patch)
2025-03-20 10:10 UTC, Baptiste Wojtkowski (bwoj)
Details | Diff | Splinter Review
Bug 39258: Remove extra nonfunctional Delete button from report preview modal (3.17 KB, patch)
2025-03-20 19:24 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 39258: Remove extra nonfunctional Delete button from report preview modal (3.21 KB, patch)
2025-03-29 10:27 UTC, David Nind
Details | Diff | Splinter Review
Bug 39258: Remove extra nonfunctional Delete button from report preview modal (3.29 KB, patch)
2025-04-03 13:43 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 PTFS Europe 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!