Exemple #1
0
 def __parse_issue(self, issue_dict):
     create_time = self.__parse_date(issue_dict["created_at"])
     return idli.Issue(issue_dict["title"],
                       issue_dict["body"],
                       issue_dict["number"],
                       issue_dict["user"],
                       num_comments=issue_dict["comments"],
                       status=issue_dict["state"],
                       create_time=create_time,
                       tags=issue_dict["labels"])
Exemple #2
0
 def __parse_issue(self, issue_dict):
     #TODO: timezones
     create_time = self.__parse_date(issue_dict["utc_created_on"])
     comment_count = issue_dict.get("comment_count", 0)
     #TODO: pseudotags for fields
     return idli.Issue(issue_dict["title"],
                       issue_dict["content"],
                       issue_dict["local_id"],
                       issue_dict["reported_by"]["username"],
                       num_comments=comment_count,
                       status=issue_dict["status"],
                       create_time=create_time,
                       tags=[])
Exemple #3
0
    def __parse_issue(self, i):
        issue = idli.Issue(i['subject'],
                           i['description'],
                           i['id'],
                           i['author']['name'],
                           status=i['status']['name'],
                           create_time=self.__parse_date(i['created_on']))

        if 'assigned_to' in i:
            issue.owner = i['assigned_to']['name']

        if 'journals' in i:
            print("journals")
            issue.num_comment = len(i['journals'])

        return issue
Exemple #4
0
 def __convert_issue(self, t):
     issue_id = t[0]
     i = t[3]  # Rest of ticket as a dictionary
     owner = None
     if i['owner'] != "somebody":
         owner = i['owner']
     status = True
     if i['status'] == "closed":
         status = False
     return idli.Issue(i["summary"],
                       i["description"],
                       str(issue_id),
                       i['reporter'],
                       status,
                       num_comments=0,
                       create_time=self.__convert_date(t[1]),
                       last_modified=self.__convert_date(t[2]),
                       owner=owner)
Exemple #5
0
 def __parse_issue(self, i):
     issue = idli.Issue(i['subject'], i['description'], i['id'], i['author']['name'], status=i['status']['name'], create_time=self.__parse_date(i['created_on']))
     if i.has_key('assigned_to'):
         issue.owner = i['assigned_to']['name']
     return issue