gforge-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gforge-commits] gforge/common/tracker ArtifactFactory.class, 1.5, 1.6


From: gsmet
Subject: [Gforge-commits] gforge/common/tracker ArtifactFactory.class, 1.5, 1.6
Date: Tue, 05 Oct 2004 11:04:38 -0500

Update of /cvsroot/gforge/gforge/common/tracker
In directory db.perdue.net:/tmp/cvs-serv28255/common/tracker

Modified Files:
        ArtifactFactory.class 
Log Message:
applied [#790] added resolution_select_box for tracker browse page by Dominik 
Haas

Index: ArtifactFactory.class
===================================================================
RCS file: /cvsroot/gforge/gforge/common/tracker/ArtifactFactory.class,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- ArtifactFactory.class       28 Feb 2004 14:11:52 -0000      1.5
+++ ArtifactFactory.class       5 Oct 2004 16:04:36 -0000       1.6
@@ -50,6 +50,7 @@
        var $changed_from;
        var $last_changed;
        var $assigned_to;
+       var $resolution;
        var $offset;
        var $max_rows;
        var $fetched_rows;
@@ -88,8 +89,9 @@
         *      @param  int     Include this param if you want to limit to a 
certain category.
         *      @param  int     Include this param if you want to limit to a 
certain group.
         */
-       function 
setup($offset,$order_col,$sort,$max_rows,$set,$_assigned_to,$_status,$_category,$_group,
 $_changed) {
-//echo "<BR>offset: $offset| order: $order|max_rows: $max_rows|_assigned_to: 
$_assigned_to|_status: $_status|_category_id: $_category_id +";
+       function 
setup($offset,$order_col,$sort,$max_rows,$set,$_assigned_to,$_status,$_category,$_group,$_changed,$_resolution)
 {
+//echo "<BR>offset: $offset| order: $order|max_rows: $max_rows|_assigned_to: 
$_assigned_to|_status: $_status|_category_id: $_category_id|_resolution: 
$_resolution +";
+
                if ((!$offset) || ($offset < 0)) {
                        $this->offset=0;
                } else {
@@ -116,6 +118,7 @@
                                        $order_col=$pref_arr[4];
                                        $sort=$pref_arr[5];
                                        $_changed=$pref_arr[6];
+                                       $_resolution=$pref_arr[7];
                                        $set='custom';
                                } else {
                                        //default to open
@@ -152,7 +155,7 @@
                                /*
                                        if this custom set is different than 
the stored one, reset preference
                                */
-                               
$pref_=$_assigned_to.'|'.$_status.'|'.$_category.'|'.$_group.'|'.$_order_col.'|'.$_sort_ord.'|'.$_changed;
+                               
$pref_=$_assigned_to.'|'.$_status.'|'.$_category.'|'.$_group.'|'.$_order_col.'|'.$_sort_ord.'|'.$_changed.'|'.$_resolution;
                                if ($pref_ != 
$u->getPreference('art_cust'.$this->ArtifactType->getID())) {
                                        
$u->setPreference('art_cust'.$this->ArtifactType->getID(),$pref_);
                                }
@@ -166,6 +169,7 @@
                $this->category=$_category;
                $this->group=$_group;
                $this->setChangedFrom($_changed);
+               $this->resolution=$_resolution;
 
                if (!$max_rows || $max_rows < 5) {
                        $max_rows=50;
@@ -223,13 +227,20 @@
                        $group_str='';
                }
 
+               //if resolution selected, add to where clause
+               if($this->resolution && ($this->resolution != 100)) {
+                       $resolution_str = "AND 
resolution_id='".$this->resolution."'";
+               } else {
+                       $resolution_str ='';
+               }
+
                //
                //  now run the query using the criteria chosen above
                //
                $sql="SELECT * FROM artifact_vw
                        WHERE 
                        group_artifact_id='". $this->ArtifactType->getID() ."'
-                        $status_str $assigned_str $category_str $group_str
+                        $status_str $assigned_str $category_str $group_str 
$resolution_str
                        and (update_date>'" . $this->last_changed . "'
                        or message_date >'" . $this->last_changed . "')   
                        ORDER BY group_artifact_id ".$this->sort.", ". 
$this->order_col ." ".$this->sort;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]