Closed Bug 479980 Opened 15 years ago Closed 15 years ago

The "Do some testing" link shows "stopped" runs instead of "running" runs

Categories

(Testopia :: General, defect)

x86
Windows XP
defect
Not set
major

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 487709

People

(Reporter: maparent, Assigned: gregaryh)

Details

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)
Build Identifier: 

When clicking the "Do some testing" link on the home page, the "Test Run" tab then shows stopped runs instead of Running runs.

This occurs on both landfill units: BZ:3.0.6 and TT: 2.2-beta1; BZ: 3.2+ and TT: 2.2.
This problem also occurs on: BZ: 3.0.8 and TT: 2.2. 

Reproducible: Always

Steps to Reproduce:
1. Create two runs.
2. Set one to running and the other to stopped.
3. Click the "do some testing" link on the home page.

Actual Results:  
*** The 'stopped' run is displayed instead of the 'running' run.

Expected Results:  
*** The 'running' run should be displayed.
Attached file Proposed fix. (obsolete) —
The file is corrected to show the "running" runs by changing the "run_status" from '0' to '1'.
I think the proposed fix in wrong\incomplete. If you look thru testopia code, all places run_status = 0 means running, except from one place:
Search.pm:
    if (defined $cgi->param('run_status')){
        my @sta = $cgi->param('run_status');
        unless (scalar @sta > 1){
#BUG: was == 1        if ($cgi->param('run_status') == 1){
            if ($cgi->param('run_status') == 0){
                push(@specialchart, ['stop_date', 'isnull', 'null']);
            }
            else {
                push(@specialchart, ['stop_date', 'isnotnull', 'null']);
            }
        }
    }
Attached patch Patch file. (obsolete) — Splinter Review
comment#2 is correct, the run_status=0 is used in other templates to represent a status of running.  (testopia.html.tmpl, tr.html.tmpl)The fix is required in the Search.pm file.
A status of 'RUNNING' is established when the stop_date field of a run is NULL in the test_runs table.
Attachment #366662 - Attachment is obsolete: true
Attachment #393812 - Flags: review?
Attachment #393812 - Flags: review? → review-
Comment on attachment 393812 [details] [diff] [review]
Patch file.

>--- Search.pm   24 Jun 2009 22:52:04 -0000   1.75
>+++ Search.pm   11 Aug 2009 17:38:50 -0000
>     if (defined $cgi->param('run_status')){
>         my @sta = $cgi->param('run_status');
>         unless (scalar @sta > 1){
>-            if ($cgi->param('run_status') == 1){
>+            if ($cgi->param('run_status') == 0){

If you change it here, you will need to change the logic in every place that this is used including the regular search form and in the dashboard templates. It would probably be easier to change the link on the home page. At the very least make sure that the behavior is consistent across all the search forms.
Attached patch Patch file.Splinter Review
Ok, I found three hyperlinks(in three templates) that are used to show running test runs.  They had run_status=0 when it should be 1 to show running test runs.
Attachment #393812 - Attachment is obsolete: true
Attachment #395813 - Flags: review?
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Comment on attachment 395813 [details] [diff] [review]
Patch file.

Clearing unassigned review, since this bug has already been marked as a duplicate. If this issue still exists, please file a new bug with updated patch. Thanks!
Attachment #395813 - Flags: review?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: