Bug 39891 - Use modal for report deletion confirmation
Summary: Use modal for report deletion confirmation
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-13 13:17 UTC by Owen Leonard
Modified: 2025-05-14 15:25 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 39891: Use modal for report deletion confirmation (9.62 KB, patch)
2025-05-13 15:10 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2025-05-13 13:17:44 UTC
I'd like to add a confirmation modal when deleting a single saved report. This would provide information about which report the user is about to delete.
Comment 1 Owen Leonard 2025-05-13 15:10:29 UTC
Created attachment 182383 [details] [review]
Bug 39891: Use modal for report deletion confirmation

This patch adds a confirmation modal to be shown when the user clicks
Actions -> Delete from the saved reports page.

To test, apply the patch and go to Reports -> Saved reports.

- In the table of reports, pick one and click Actions -> Delete
- A modal window should appear showing information about the report,
  including group, subgroup, author, and last run.
  - Clicking "Delete" should result in the correct report being deleted.
  - Clicking "Cancel," the "X" in the upper right corner of the modal,
    or anywhere outside of the modal should close it.
- Test under a different group tab and from a subsequent page in the
  DataTable.

Sponsored-by: Athens County Public Libraries
Comment 2 David Nind 2025-05-14 15:25:14 UTC
I've failed QA because of some "weird things".

Sometimes all the correct details show (such as group, subgroup and last run date).

Other times they don't.

If I run a report, the correct details show for some, and not for others.

I couldn't identify a pattern, and I got confused! Sometimes different combinations on different pages of results on a different report category tab did different things as well!

From the All tab
================

No group or subgroup
--------------------

Just shows:

    REPORTNAME
    Author: koha

If the report is run, it doesn't show Last run

Is in a group
-------------

I got really mixed results, sometimes it showed all the correct details, sometimes it didn't - I got really confused!

If I ran the report, the details showed correctly. If I then went to another staff interface page then back to the reports list, it didn't show the details.

Report showing only the author

    REPORTNAME
    Author: koha

Report showing all the correct details:
 
    REPORTNAME
    Group: Catalog    
    Author: koha
    Last run: 05/13/2025 19:41

Is in a subgroup
----------------

Similar to if in a group:
- Went to saved reports page
- If report not run then0 the first time I attempted to delete, it only shows author
- If I run a report, and then go back to the saved reports list, run and not run reports in a subgroup show the correct details
- If I go to other pages, and then go back to saved reports page, everything looks OK
- If I completely clear the browser cache, everything looks OK
- If I duplicate a report in a subgroup, then the existing report shows all the correct details except the last run date
- Even reports in a just a group that had been run previously didn't show the last run date
- This started doing my head in a little, and I gave up!


From a group tab
==================

Similar odd behavour if deleting from a subgroup tab:
- subgroup not shown
- last run date not shown
- run a report
- that report shows correct details
- other reports don't show the correct details 
  . report only in a group that was previously run, doesn't show last run date
- I also gave up on trying to test with the mixed behavour