--- /dev/null
+"""Close a bug"""
+from libbe import cmdutil
+def execute(args):
+ """
+ >>> from libbe import tests
+ >>> import os
+ >>> dir = tests.simple_bug_dir()
+ >>> os.chdir(dir.dir)
+ >>> dir.get_bug("a").status
+ 'open'
+ >>> execute(("a",))
+ >>> dir.get_bug("a").status
+ 'in-progress'
+ >>> tests.clean_up()
+ """
+ assert(len(args) == 1)
+ bug = cmdutil.get_bug(args[0])
+ bug.status = "in-progress"
+ bug.save()
severity_value[severity_levels[i]] = i
class Bug(object):
- status = checked_property("status", (None, "open", "closed"))
+ status = checked_property("status", (None, "open", "closed", "in-progress"))
severity = checked_property("severity", (None, "wishlist", "minor",
"serious", "critical", "fatal"))
return os.path.join(self.path, self.uuid, file)
def _get_active(self):
- return self.status == "open"
+ return self.status in ("open", "in-progress")
active = property(_get_active)