:param name: Name of the issue type
        :type name: str
        :rtype: IssueType
351049
def issue_type_by_name(self, name):
        
        issue_types = self.issue_types()
        try:
            issue_type = [it for it in issue_types if it.name == name][0]
        except IndexError:
            raise KeyError("Issue type '%s' is unknown." % name)
        return issue_type
763164
def get_issue_labels(self, issue_key):
        
        url = 'rest/api/2/issue/{issue_key}?fields=labels'.format(issue_key=issue_key)
        return (self.get(url) or {}).get('fields').get('labels')
212103
def add_issue(self, data):
        

        issue = self.dispatcher(
            'add_issue',
            data,
            self._admintoken
        )

        return json.loads(issue)
920975
def accept(self):
        
        return self._issue._nation._accept_issue(self._issue.id, self._id)
622586
def name(self, name):
        
        self._data['name'] = name
        request = self._base_request
        request['name'] = name
        return self._tc_requests.update(request, owner=self.owner)
530644
def report_issue(self, message, *args, **kw):
        """"""
        if self.strict:
            raise ValueError(format(message, *args, **kw))
        else:
            logger.warning(format(message, *args, **kw))
1125144
def FormatType(self, level_name, class_problist):
    
    class_problist.sort()
    output = []
    for classname, problist in class_problist:
      output.append('<h4 class="issueHeader"><a name="%s%s">%s</a></h4><ul>\n' %
                    (level_name, classname, UnCamelCase(classname)))
      for e in problist.problems:
        self.FormatException(e, output)
      if problist.dropped_count:
        output.append('<li>and %d more of this type.' %
                      (problist.dropped_count))
      output.append('</ul>\n')
    return ''.join(output)
932675
def make_invalid_op(name):
    
    def invalid_op(self, other=None):
        raise TypeError("cannot perform {name} with this index type: "
                        "{typ}".format(name=name, typ=type(self).__name__))

    invalid_op.__name__ = name
    return invalid_op
1186224
def determine_action(self, issue):
        
        resource_type = self.resource_types[issue.resource.resource_type_id]
        issue_alert_schedule = self.alert_schedule[resource_type] if \
            resource_type in self.alert_schedule \
            else self.alert_schedule['*']

        action_item = {
            'action': None,
            'action_description': None,
            'last_alert': issue.last_alert,
            'issue': issue,
            'resource': self.resource_classes[self.resource_types[issue.resource.resource_type_id]](issue.resource),
            'owners': [],
            'stop_after': issue_alert_schedule['stop'],
            'remove_after': issue_alert_schedule['remove'],
            'notes': issue.notes,
            'missing_tags': issue.missing_tags
        }

        time_elapsed = time.time() - issue.created
        stop_schedule = pytimeparse.parse(issue_alert_schedule['stop'])
        remove_schedule = pytimeparse.parse(issue_alert_schedule['remove'])

        if self.collect_only:
            action_item['action'] = AuditActions.IGNORE
        elif remove_schedule and time_elapsed >= remove_schedule:
            action_item['action'] = AuditActions.REMOVE
            action_item['action_description'] = 'Resource removed'
            action_item['last_alert'] = remove_schedule
            if issue.update({'last_alert': remove_schedule}):
                db.session.add(issue.issue)

        elif stop_schedule and time_elapsed >= stop_schedule:
            action_item['action'] = AuditActions.STOP
            action_item['action_description'] = 'Resource stopped'
            action_item['last_alert'] = stop_schedule
            if issue.update({'last_alert': stop_schedule}):
                db.session.add(issue.issue)

        else:
            alert_selection = self.determine_alert(
                issue_alert_schedule['alert'],
                issue.get_property('created').value,
                issue.get_property('last_alert').value
            )
            if alert_selection:
                action_item['action'] = AuditActions.ALERT
                action_item['action_description'] = '{} alert'.format(alert_selection)
                action_item['last_alert'] = alert_selection
                if issue.update({'last_alert': alert_selection}):
                    db.session.add(issue.issue)
            else:
                action_item['action'] = AuditActions.IGNORE

        db.session.commit()
        return action_item
1049738
def as_issue(self):
        
        headers, data = self._requester.requestJsonAndCheck(
            "GET",
            self.issue_url
        )
        return github.Issue.Issue(self._requester, headers, data, completed=True)
78312
def parse_problem(self, problem_content):
        
        del problem_content["@order"]
        return self.task_factory.get_problem_types().get(problem_content["type"]).parse_problem(problem_content)
1099498
def _handle_conflict(self, name):
        
        err = HTTPConflict('Member "%s" already exists!' % name).exception
        return self.request.get_response(err)
1294932
public function doc_link($issue, $name) {
        global $CFG, $OUTPUT;

        if (empty($CFG->docroot)) {
            return $name;
        }

        return $OUTPUT->doc_link('report/performance/'.$issue, $name);
    }
580518
def issue(self, invoice_id, **kwargs):
        "
        url = "{}/{}/issue".format(self.base_url, invoice_id)
        return self.post_url(url, {}, **kwargs)
1298449
def report(issues, show_urls=False):
    
    # titles may have unicode in them, so we must encode everything below
    if show_urls:
        for i in issues:
            print(u'#%d: %s' % (i['number'],
                                      i['title'].replace(u'`', u'``')))
    else:
        for i in issues:
            print(u'* %d: %s' % (i['number'], i['title'].replace(u'`', u'``')))
94682
def name(self, name):
        
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")
        if name is not None and len(name) > 128:
            raise ValueError("Invalid value for `name`, length must be less than or equal to `128`")
        if name is not None and len(name) < 1:
            raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`")
        if name is not None and not re.search('^[^\/]+$', name):
            raise ValueError("Invalid value for `name`, must be a follow pattern or equal to `/^[^\/]+$/`")

        self._name = name
1157540
def problem(self):
        
        if self.api and self.problem_id:
            return self.api._get_problem(self.problem_id)