Esempio n. 1
0
 def get_multi(self, state=None):
     # FIXME: cache
     milestone = self.milestone
     if state == 'open':
         return self._get_open_multi()
     if state == 'closed':
         return self._get_closed_multi()
     return IssueMilestone.gets_by(milestone_id=milestone.id)
Esempio n. 2
0
 def _get_closed_multi(self):
     milestone = self.milestone
     tasks = []
     rs = IssueMilestone.gets_by(milestone_id=milestone.id)
     for r in rs:
         issue = ProjectIssue.get_by_issue_id(r.issue_id)
         if not issue:
             continue
         if issue.closer_id:
             tasks.append(r)
     return tasks
Esempio n. 3
0
 def milestone_id(self):
     rs = IssueMilestone.gets_by(issue_id=self.issue_id)
     return rs[0].milestone_id if rs else None
Esempio n. 4
0
 def has_milestone(self):
     rs = IssueMilestone.gets_by(issue_id=self.issue_id)
     return True if rs else None
Esempio n. 5
0
 def milestone_id(self):
     rs = IssueMilestone.gets_by(issue_id=self.issue_id)
     return rs[0].milestone_id if rs else None
Esempio n. 6
0
 def has_milestone(self):
     rs = IssueMilestone.gets_by(issue_id=self.issue_id)
     return True if rs else None