Bug 41001 - Dismissing the "Run now" modal breaks functionality
Summary: Dismissing the "Run now" modal breaks functionality
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: ERM (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Pedro Amorim
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks: 37762
  Show dependency treegraph
 
Reported: 2025-10-13 08:59 UTC by Jan Kissig
Modified: 2025-11-07 17:56 UTC (History)
6 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00
Circulation function:


Attachments
Bug 41001: Remove messages when dialog closes, even if not through the close button (1.97 KB, patch)
2025-10-13 09:06 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41001: Remove messages when dialog closes, even if not through the close button (2.02 KB, patch)
2025-10-13 10:51 UTC, Jan Kissig
Details | Diff | Splinter Review
Bug 41001: Add cypress test (976 bytes, patch)
2025-10-13 13:31 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41001: (QA follow-up): Add 'Confirmation messages with inputs' specific tests (2.87 KB, patch)
2025-10-23 10:14 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41001: Remove messages when dialog closes, even if not through the close button (2.09 KB, patch)
2025-11-07 14:09 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 41001: Add cypress test (1.02 KB, patch)
2025-11-07 14:09 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 41001: (QA follow-up): Add 'Confirmation messages with inputs' specific tests (2.94 KB, patch)
2025-11-07 14:09 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kissig 2025-10-13 08:59:51 UTC
To recreate:
- create a data ERM provider /cgi-bin/koha/erm/eusage/usage_data_providers/add
- dummy data should be sufficient
- then go to data providers list /cgi-bin/koha/erm/eusage/usage_data_provider
- open web development tools console (F12 firefox)
- click on "Run now"
- dismiss dialog by clicking outside the modal!
- click again on "Run now"
- check the logs for errors
- any other clicks to create a modal won't work now ("run now", "delete")
Comment 1 Pedro Amorim 2025-10-13 09:03:43 UTC
I believe I have patch in bug 37762 that may fix this issue. I'll test and check and submit here if so.
Comment 2 Pedro Amorim 2025-10-13 09:06:48 UTC
Created attachment 187814 [details] [review]
Bug 41001: Remove messages when dialog closes, even if not through the close button

This ensures that when the dialog is closed, even when clicked outside of it, the messages are correctly removed, same as if the 'close' button had been clicked.

Test plan:
- create a data ERM provider /cgi-bin/koha/erm/eusage/usage_data_providers/add
- dummy data should be sufficient
- then go to data providers list /cgi-bin/koha/erm/eusage/usage_data_provider
- open web development tools console (F12 firefox)
- click on "Run now"
- dismiss dialog by clicking outside the modal!
- click again on "Run now"
- check the logs for errors
- any other clicks to create a modal won't work now ("run now", "delete")

Apply patch. run yarn js:watch or yarn js:build. Repeat.
Comment 3 Jan Kissig 2025-10-13 10:51:41 UTC
Created attachment 187830 [details] [review]
Bug 41001: Remove messages when dialog closes, even if not through the close button

This ensures that when the dialog is closed, even when clicked outside of it, the messages are correctly removed, same as if the 'close' button had been clicked.

Test plan:
- create a data ERM provider /cgi-bin/koha/erm/eusage/usage_data_providers/add
- dummy data should be sufficient
- then go to data providers list /cgi-bin/koha/erm/eusage/usage_data_provider
- open web development tools console (F12 firefox)
- click on "Run now"
- dismiss dialog by clicking outside the modal!
- click again on "Run now"
- check the logs for errors
- any other clicks to create a modal won't work now ("run now", "delete")

Apply patch. run yarn js:watch or yarn js:build. Repeat.

Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Comment 4 Jonathan Druart 2025-10-13 11:38:07 UTC
Can we have a Cypress test please?
Comment 5 Pedro Amorim 2025-10-13 13:31:36 UTC
Created attachment 187839 [details] [review]
Bug 41001: Add cypress test
Comment 6 Jonathan Druart 2025-10-13 14:09:40 UTC
Thanks. However I think we need a test at the framework/baseResource level in t/cypress/component/baseResource.ts.
Comment 7 Marcel de Rooy 2025-10-17 09:43:20 UTC
(In reply to Jonathan Druart from comment #6)
> Thanks. However I think we need a test at the framework/baseResource level
> in t/cypress/component/baseResource.ts.

Is this a Failed QA ?
Comment 8 Jonathan Druart 2025-10-17 10:10:31 UTC
(In reply to Marcel de Rooy from comment #7)
> (In reply to Jonathan Druart from comment #6)
> > Thanks. However I think we need a test at the framework/baseResource level
> > in t/cypress/component/baseResource.ts.
> 
> Is this a Failed QA ?

At least to get an answer, yes.
Comment 9 Pedro Amorim 2025-10-22 10:13:34 UTC
(In reply to Jonathan Druart from comment #6)
> Thanks. However I think we need a test at the framework/baseResource level
> in t/cypress/component/baseResource.ts.

Can you please clarify what you mean by this? t/cypress/component/baseResource.ts tests composables/base-resource.js methods. This is not the case here, the cypress test I provided proves that this bug exists before the fix patch and no longer exists after the fix patch.
Comment 10 Jonathan Druart 2025-10-23 08:55:22 UTC
Changes to generic components must have tests in their own test file. Otherwise we might lose them later.

Here you modify the behaviour of the Dialog component that is used in several other places, then we should have tests in a Dialog_spec.ts file.
Comment 11 Pedro Amorim 2025-10-23 10:14:20 UTC
Created attachment 188317 [details] [review]
Bug 41001: (QA follow-up): Add 'Confirmation messages with inputs' specific tests

cypress run --spec t/cypress/integration/ERM/Dialog_spec.ts
Comment 12 Pedro Amorim 2025-11-07 13:09:44 UTC
Joubu can you please confirm if my latest patch satisfies the QA requirements here? Given that it is a bug fix and release is right around the corner. Thank you.
Comment 13 Jonathan Druart 2025-11-07 14:09:45 UTC
Created attachment 189325 [details] [review]
Bug 41001: Remove messages when dialog closes, even if not through the close button

This ensures that when the dialog is closed, even when clicked outside of it, the messages are correctly removed, same as if the 'close' button had been clicked.

Test plan:
- create a data ERM provider /cgi-bin/koha/erm/eusage/usage_data_providers/add
- dummy data should be sufficient
- then go to data providers list /cgi-bin/koha/erm/eusage/usage_data_provider
- open web development tools console (F12 firefox)
- click on "Run now"
- dismiss dialog by clicking outside the modal!
- click again on "Run now"
- check the logs for errors
- any other clicks to create a modal won't work now ("run now", "delete")

Apply patch. run yarn js:watch or yarn js:build. Repeat.

Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 14 Jonathan Druart 2025-11-07 14:09:47 UTC
Created attachment 189326 [details] [review]
Bug 41001: Add cypress test

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 15 Jonathan Druart 2025-11-07 14:09:49 UTC
Created attachment 189327 [details] [review]
Bug 41001: (QA follow-up): Add 'Confirmation messages with inputs' specific tests

cypress run --spec t/cypress/integration/ERM/Dialog_spec.ts

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 16 Lucas Gass (lukeg) 2025-11-07 17:56:14 UTC
Nice work everyone!

Pushed to main for 25.11