예제 #1
0
파일: dao.py 프로젝트: deximer/jira-shell
 def pull_kanban(self, project, time_range):
     if 'BRD-' + project.key not in self.cache.data[project.key].keys():
         kanban = Release()
         kanban.key = 'BRD-%s' % project.key
         kanban.version = kanban.key
         kanban.name = 'Kanban Board'
         transaction.begin()
         self.cache.data[project.key][kanban.key] = kanban
         transaction.commit()
         transaction.begin()
         docid = self.cache.document_map.add(
             ['jira', str(project.key), kanban.key])
         self.cache.catalog.index_doc(docid, kanban)
         transaction.commit()
     else:
         kanban = self.cache.data[project.key]['BRD-' + project.key]
     self.pull_kanban_stories(project, kanban, time_range)
예제 #2
0
파일: dao.py 프로젝트: deximer/jira-shell
 def pull_scrum(self, project, time_range):
     for spr in self.agile.sprints(int(project.key)):
         print 'Sprint:', spr.name
         sid = getattr(spr, 'id')
         if str(sid) not in self.cache.data[project.key].keys():
             sprint = Release()
             sprint.key = str(sid)
             sprint.version = str(sid)
             sprint.name = spr.name
             transaction.begin()
             self.cache.data[project.key][str(sid)] = sprint
             transaction.commit()
             transaction.begin()
             docid = self.cache.document_map.add(
                 ['jira', project.key, str(sid)])
             self.cache.catalog.index_doc(docid, sprint)
             transaction.commit()
         else:
             sprint = self.cache.data[project.key][str(sid)]
         self.pull_scrum_stories(project, sprint)