Clones.bjs
[gitlive] / RooTicket.vala
index d3d6180..d675621 100644 (file)
@@ -36,11 +36,11 @@ public class RooTicket : Object
        public enum NotMe {
                TRUE,
                FALSE
-       };
+       }
        public enum Closed {
                TRUE,
                FALSE
-       };
+       }
        
    //const string baseurl = "https://roojs.com/admin.php/Ro/mtrack_ticket"; 
        const string roourl = "https://roojs.com/admin.php/Roo";        
@@ -231,17 +231,27 @@ public class RooTicket : Object
                   }
        }
 
-       public void loadTickets(string project_id)
+       public void loadTickets(string project_id, NotMe not_me, Closed closed)
        {
                RooTicket.singleton().tickets = new Gee.ArrayList<RooTicket>();
         
                
                var table = new GLib.HashTable<string, string>(str_hash, str_equal);
-        
-               table.insert("query[viewtype]","me");
+               if (not_me  == NotMe.FALSE) {
+                       table.insert("query[viewtype]","me");
+               } else {
+               
+               }               
+               if (closed  == Closed.TRUE) {
+                       table.insert("query[viewtype]","me");
+               } else {
+               
+               }
+
                table.insert("limit","999");
                table.insert("sort","summary");
                table.insert("dir","ASC");
+               
                if (project_id != "") {
                        table.insert("project_id",project_id);
                }