def __init__(self, issue=None, prefix=None):
        """ Initialize issue """
        if issue is None:
            return
        self.issue = issue
        self.key = issue["key"]
        self.summary = issue["fields"]["summary"]
        self.comments = issue["fields"]["comment"]["comments"]
        matched = re.match(r"(\w+)-(\d+)", self.key)
        self.identifier = matched.groups()[1]
        if prefix is not None:
            self.prefix = prefix
        else:
            self.prefix = matched.groups()[0]
def __init__ ( self , issue = None , prefix = None ) : if issue is None : return self . issue = issue self . key = issue [ "key" ] self . summary = issue [ "fields" ] [ "summary" ] self . comments = issue [ "fields" ] [ "comment" ] [ "comments" ] matched = re . match ( r"(\w+)-(\d+)" , self . key ) self . identifier = matched . groups ( ) [ 1 ] if prefix is not None : self . prefix = prefix else : self . prefix = matched . groups ( ) [ 0 ]
Initialize issue