<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,6 @@
-YABT-ID: 78c759c3b155933b5978850bbb21da4ea67f8d6b
+YABT-Status: complete
 Creator: Travis Swicegood &lt;travis@domain51.com&gt;
+YABT-ID: 78c759c3b155933b5978850bbb21da4ea67f8d6b
 Created-On: 2009-02-13 19:22:46.950042
 Subject: Create yabt status
 </diff>
      <filename>.yabt/tickets/78c759c3b155933b5978850bbb21da4ea67f8d6b</filename>
    </modified>
    <modified>
      <diff>@@ -126,3 +126,27 @@ editor to launch:
         else:
             editor = &quot;vi&quot;
         subprocess.call([editor, os.path.join(os.getcwd(), &quot;.yabt&quot;, &quot;tickets&quot;, task.id)])
+
+class Status(CommandOption):
+    cmd = &quot;status&quot;
+    desc = &quot;View and edit the status of tickets&quot;
+    # TODO: make statuses configurable
+    help = &quot;&quot;&quot;usage: yabt status [&lt;subject&gt; [&lt;new status&gt;]]
+
+    &lt;subject&gt;    If provided without the optional &lt;new status&gt; it shows the
+                 status of the given ticket.  If &lt;new status&gt; is provided, it
+                 updates the ticket to have that new status
+    &lt;new status&gt; The status you want the ticket to have
+&quot;&quot;&quot;
+
+    def run(self):
+        if len(self.caller.options.args) &lt;= 1:
+            print &quot;Error: must supply a title&quot;
+            print get_help(&quot;Status&quot;)
+            return
+        task = yabt.models.TaskFactory().byTitle(self.caller.options.args[1])
+        if len(self.caller.options.args) == 3:
+            task.status = self.caller.options.args[2]
+            task.save()
+        print task.subject + &quot;    status: &quot; + task.status
+</diff>
      <filename>src/yabt/commands.py</filename>
    </modified>
    <modified>
      <diff>@@ -102,6 +102,17 @@ class Task(object):
 
     created_on = property(get_created_on, set_created_on)
 
+    def get_status(self):
+        if self.data.has_key('YABT-Status') :
+            return self.data['YABT-Status']
+        else:
+            return &quot;N/A&quot;
+
+    def set_status(self, status):
+        self.data['YABT-Status'] = status
+
+    status = property(get_status, set_status)
+
     def __str__(self):
         r = &quot;&quot;
         for key in self.data:</diff>
      <filename>src/yabt/models.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b7ed06199e44f17c0a804413f42c4c5f136f2d6c</id>
    </parent>
  </parents>
  <author>
    <name>Travis Swicegood</name>
    <email>travis@White-Rabbit.local</email>
  </author>
  <url>http://github.com/tswicegood/yabt/commit/1cf455b53e4c73ce65a9826c8daa9335dfeab771</url>
  <id>1cf455b53e4c73ce65a9826c8daa9335dfeab771</id>
  <committed-date>2009-02-21T11:59:55-08:00</committed-date>
  <authored-date>2009-02-13T18:01:19-08:00</authored-date>
  <message>Initial implementation of yabt status.

This implements basic functionality.  I'm allowing for tickets without
the YABT-Status entry because none of my current tickets have them yet. :-)

This commit doesn't enforce any particular schema for status of a ticket.</message>
  <tree>5fc1f332f4e82716f25418686dfe2ccf061a3511</tree>
  <committer>
    <name>Travis Swicegood</name>
    <email>travis@White-Rabbit.local</email>
  </committer>
</commit>
