Finalize bug report
git-svn-id: svn://10.0.0.236/trunk@248795 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
4cfd3eccf6
commit
bd18b33e2b
@ -941,6 +941,7 @@ Ext.extend(RunFilterGrid, Ext.grid.GridPanel, {
|
||||
|
||||
Testopia.BugReport = function(params){
|
||||
params.type = 'bug';
|
||||
var tutil = new TestopiaUtil();
|
||||
this.store = new Ext.data.GroupingStore({
|
||||
url: 'tr_run_reports.cgi',
|
||||
baseParams: params,
|
||||
@ -949,21 +950,29 @@ Testopia.BugReport = function(params){
|
||||
fields: [
|
||||
{name: "case_id", mapping:"case_id"},
|
||||
{name: "run_id", mapping:"run_id"},
|
||||
{name: "bug_id", mapping:"bug_id"}
|
||||
{name: "bug_id", mapping:"bug_id"},
|
||||
{name: "case_status", mapping:"case_status"},
|
||||
{name: "bug_status", mapping:"bug_status"},
|
||||
{name: "severity", mapping:"bug_severity"}
|
||||
|
||||
]}),
|
||||
remoteSort: true,
|
||||
sortInfo: {field: 'run_id', direction: "ASC"},
|
||||
groupField: 'bug_id'
|
||||
});
|
||||
this.store.isTreport = true;
|
||||
this.view = new Ext.grid.GroupingView({
|
||||
forceFit:true,
|
||||
groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
|
||||
});
|
||||
this.columns = [
|
||||
{header: 'Case', dataIndex: 'case_id', sortable: true, hideable: true},
|
||||
{header: 'Bug', dataIndex: 'bug_id', sortable: true, hideable: true},
|
||||
{header: 'Run', dataIndex: 'run_id', sortable: true, hideable: true}
|
||||
{header: 'Run', dataIndex: 'run_id', sortable: true, hideable: true, groupRenderer: function(v){return v;}, renderer: tutil.runLink},
|
||||
{header: 'Case', dataIndex: 'case_id', sortable: true, hideable: true, groupRenderer: function(v){return v;}, renderer: tutil.caseLink},
|
||||
{header: 'Bug', dataIndex: 'bug_id', sortable: true, hideable: true, groupRenderer: function(v){return v;}, renderer: tutil.bugLink},
|
||||
{header: 'Bug Status', dataIndex: 'bug_status', sortable: true, hideable: true},
|
||||
{header: 'Case Status', dataIndex: 'case_status', sortable: true, hideable: true},
|
||||
{header: 'Severity', dataIndex: 'severity', sortable: true, hideable: true}
|
||||
|
||||
];
|
||||
Testopia.BugReport.superclass.constructor.call(this,{
|
||||
sm: new Ext.grid.RowSelectionModel(),
|
||||
|
||||
@ -64,15 +64,26 @@ TestopiaUtil = function(){
|
||||
this.statusIcon = function (name){
|
||||
return '<img src="testopia/img/' + name + '_small.gif" alt="'+ name +'" title="'+ name +'">';
|
||||
};
|
||||
this.caseLink = function(id){
|
||||
this.caseLink = function(id,m,r,ri,ci,s){
|
||||
if (s.isTreport === true)
|
||||
return '<a href="tr_show_case.cgi?case_id=' + id + '" target="_blank">' + id +'</a>';
|
||||
return '<a href="tr_show_case.cgi?case_id=' + id +'">' + id +'</a>';
|
||||
};
|
||||
this.runLink = function(id){
|
||||
this.runLink = function(id,m,r,ri,ci,s){
|
||||
if (s.isTreport === true)
|
||||
return '<a href="tr_show_run.cgi?run_id=' + id +'" target="_blank">' + id +'</a>';
|
||||
return '<a href="tr_show_run.cgi?run_id=' + id +'">' + id +'</a>';
|
||||
};
|
||||
this.planLink = function(id){
|
||||
this.planLink = function(id,m,r,ri,ci,s){
|
||||
if (s.isTreport === true)
|
||||
return '<a href="tr_show_plan.cgi?plan_id=' + id +'" target="_blank">' + id +'</a>';
|
||||
return '<a href="tr_show_plan.cgi?plan_id=' + id +'">' + id +'</a>';
|
||||
};
|
||||
this.bugLink = function(id,m,r,ri,ci,s){
|
||||
if (s.isTreport === true)
|
||||
return '<a href="show_bug.cgi?id=' + id +'" target="_blank">' + id +'</a>';
|
||||
return '<a href="show_bug.cgi?id=' + id +'">' + id +'</a>';
|
||||
};
|
||||
|
||||
this.newRunPopup = function(plan){
|
||||
var win = new Ext.Window({
|
||||
|
||||
@ -143,10 +143,12 @@ elsif ($type eq 'bug'){
|
||||
push @ids, $r->id;
|
||||
}
|
||||
my $ref = $dbh->selectall_arrayref("
|
||||
SELECT DISTINCT tcb.bug_id, tcr.run_id, tcr.case_id
|
||||
SELECT DISTINCT tcb.bug_id, bugs.bug_status, bugs.bug_severity, tcr.run_id, tcr.case_id, tcrs.name AS case_status
|
||||
FROM test_case_bugs AS tcb
|
||||
INNER JOIN test_case_runs AS tcr ON tcr.case_id = tcb.case_id
|
||||
WHERE tcr.run_id in (" . join (',',@ids) . ")",
|
||||
INNER JOIN bugs on tcb.bug_id = bugs.bug_id
|
||||
INNER JOIN test_case_run_status AS tcrs ON tcr.case_run_status_id = tcrs.case_run_status_id
|
||||
WHERE tcr.run_id in (" . join (',',@ids) . ") AND tcr.iscurrent = 1",
|
||||
{"Slice" =>{}});
|
||||
|
||||
my $json = new JSON;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user