def run(self, params={}):
    'Add label to issue'
    issue = self.connection.client.issue(id=params['id'])
    if (not issue):
        raise Exception(('Error: No issue found with ID: ' + params['id']))
    labels = params['label'].split(',')
    for label in labels:
        if (label not in issue.fields.labels):
            issue.fields.labels.append(label)
    self.logger.info('Adding labels to issue %s: %s', params['id'], issue.fields.labels)
    issue.update(fields={'labels': issue.fields.labels})
    return {'success': True}
Add label to issue
def run(self, params={}):
    
    issue = self.connection.client.issue(id=params['id'])
    if (not issue):
        raise Exception(('Error: No issue found with ID: ' + params['id']))
    labels = params['label'].split(',')
    for label in labels:
        if (label not in issue.fields.labels):
            issue.fields.labels.append(label)
    self.logger.info('Adding labels to issue %s: %s', params['id'], issue.fields.labels)
    issue.update(fields={'labels': issue.fields.labels})
    return {'success': True}