checkbox-qt doesn't fire the "prompt-finish" event

Bug #956329 reported by Daniel Manrique on 2012-03-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox
Medium
Tiago Salem Herrmann

Bug Description

When closing checkbox-qt after a run, the prompt-finish event is not firing, and interface.direction is not set to NEXT. This causes problems because the cleanup work during prompt-finish doesn't get executed, and the 'recover run' bit in plugins.bpickle (see the plugins/recover_prompt.py file) doesn't get reset. Other than the cleanup not running, the consequence is that checkbox-qt will *always* prompt the user to recover the run, even if the run was finished normally.

Steps to reproduce:

1- Run checkbox-qt --log-level=debug
2- Deselect all the tests
3- Press "start testing"
4- Enter email address and click on "submit results"
5- On the report screen, close checkbox
6- Restart checkbox

Expected results:
- The logfile (.cache/checkbox/checkbox.log) shows the prompt-finish event being fired (this is taken from the old checkbox-gtk run):

2012-03-15 15:09:10,752 DEBUG Started firing prompt-finish.
2012-03-15 15:09:10,752 DEBUG Calling ./plugins/final_prompt.py FinalPrompt.prompt_finish(<checkbox_gtk.gtk_interface.GTKInterface object at 0x2093dd0>) for prompt-finish with priority -100.
2012-03-15 15:09:16,364 DEBUG Calling ./plugins/recover_prompt.py RecoverPrompt.prompt_finish(<checkbox_gtk.gtk_interface.GTKInterface object at 0x2093dd0>) for prompt-finish with priority 0.
2012-03-15 15:09:16,364 DEBUG Calling ./plugins/jobs_prompt.py JobsPrompt.prompt_finish(<checkbox_gtk.gtk_interface.GTKInterface object at 0x2093dd0>) for prompt-finish with priority 0.
2012-03-15 15:09:16,370 DEBUG Finished firing prompt-finish.

- Upon restarting checkbox, I don't get prompted to recover an existing run.

Actual results:
- Logfile doesn't show prompt-finish being fired, thus the plugins registered for it (final_prompt, recover_prompt and jobs_prompt) don't get notified or run any registered methods.
- Upon restarting checkbox, I always get prompted to recover the existing run.

Part of the problem is that, in checkbox-gtk, the user explicitly clicked on a "I'm done testing" button ("Finish"), thus it was easy to determine that the run had ended. On checkbox-qt, we have no explicit control to end the testing session, this is done implicitly by closing the window, but this can happen for any number of reasons (accident, crash, the user indeed wanting to interrupt the process mid-run to resume later), not all of which signify the run has ended.

One way to fix this would be to implicly consider that if the user either viewed or submitted the report, the run can be considered finished. So if the user presses either button and then closes checkbox, we reset things so he won't get prompted on restarting.

In either case, the UI needs to set interface.direction = NEXT for things to work properly, particularly with the recover_prompt plugin.

Related branches

Daniel Manrique (roadmr) on 2012-03-15
Changed in checkbox:
milestone: none → 0.13.5
Changed in checkbox:
assignee: nobody → Tiago Salem Herrmann (tiagosh)
status: New → In Progress
Daniel Manrique (roadmr) on 2012-03-15
Changed in checkbox:
importance: Undecided → Medium
Daniel Manrique (roadmr) on 2012-03-20
Changed in checkbox:
status: In Progress → Fix Committed
Ara Pulido (ara) on 2012-03-22
Changed in checkbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers