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

RESOLVED DUPLICATE of bug 487709

Status

Testopia
General
--
major
RESOLVED DUPLICATE of bug 487709
9 years ago
6 years ago

People

(Reporter: maparent, Assigned: Greg Hendricks)

Tracking

Details

Attachments

(1 attachment, 2 obsolete attachments)

4.99 KB, patch
Details | Diff | Splinter Review
(Reporter)

Description

9 years ago
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.
(Reporter)

Comment 1

9 years ago
Created attachment 366662 [details]
Proposed fix.

The file is corrected to show the "running" runs by changing the "run_status" from '0' to '1'.

Comment 2

9 years ago
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']);
            }
        }
    }
(Reporter)

Comment 3

9 years ago
Created attachment 393812 [details] [diff] [review]
Patch file.

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
(Reporter)

Updated

9 years ago
Attachment #393812 - Flags: review?
(Assignee)

Updated

9 years ago
Attachment #393812 - Flags: review? → review-
(Assignee)

Comment 4

9 years ago
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.
(Reporter)

Comment 5

9 years ago
Created attachment 395813 [details] [diff] [review]
Patch file.

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?
(Assignee)

Updated

9 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 487709
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.