Closes an issue by id within the project
@param int $issue_id
@return type
190400
public function issueClose(\sb\Gitlab\Issue $issue){
        $response = $this->_client->get("/projects/".$this->id."/issues/".$issue->id, [
            'state_event' => 'close'
        ], 'PUT');
        
        if(is_object($response) && isset($response->message)){
             throw new \Exception("Could not close issue ".$issue->id." on project ".$this->id.": ".json_encode($response));
        }
        
        return $response;
    }
134273
def close_connection(self, connection_id):
        
        request = requests_pb2.CloseConnectionRequest()
        request.connection_id = connection_id
        self._apply(request)
586744
def with_statuses(issue_statuses)
      if name == 'status_id'
        format 'Status: %s => %s',
               find_issue_status(issue_statuses, old_value),
               find_issue_status(issue_statuses, new_value)
      else
        to_s
      end
    end
134647
def attach_issue(resource_id, table, user_id):
    """"""
    data = schemas.issue.post(flask.request.json)
    issue = _get_or_create_issue(data)

    # Second, insert a join record in the JOIN_JOBS_ISSUES or
    # JOIN_COMPONENTS_ISSUES database.
    if table.name == 'jobs':
        join_table = models.JOIN_JOBS_ISSUES
    else:
        join_table = models.JOIN_COMPONENTS_ISSUES

    key = '%s_id' % table.name[0:-1]
    query = join_table.insert().values({
        'user_id': user_id,
        'issue_id': issue['id'],
        key: resource_id
    })

    try:
        flask.g.db_conn.execute(query)
    except sa_exc.IntegrityError:
        raise dci_exc.DCICreationConflict(join_table.name,
                                          '%s, issue_id' % key)

    result = json.dumps({'issue': dict(issue)})
    return flask.Response(result, 201, content_type='application/json')
874716
def add_issue_type(self, name, **attrs):
        
        return IssueTypes(self.requester).create(self.id, name, **attrs)
714920
def problem_id(self, value):
        
        if value == self._defaults['problemId'] and 'problemId' in self._values:
            del self._values['problemId']
        else:
            self._values['problemId'] = value
213918
def call(issue)
      status = decode_status(issue)
      {
          key: issue.key,
          type: issue.issuetype.name,
          priority: issue.priority.name,
          status: status,
          #description: i.description,
          summary: issue.summary,
          created_date: issue.created,
          closed_date: issue.resolutiondate
      }
    end
1323067
public function issue()
    {
        $url = $this->getEntityUrl() . $this->id . '/issue';

        return $this->request(Requests::POST, $url);
    }
1135548
public function issues()
    {
        if (is_null($this->issueRequests)) {
            $this->issueRequests = new IssueRequests($this->client);
        }

        return $this->issueRequests;
    }
922727
public function create($projectKey, $issueTypeName)
    {
        $fieldsMetadata = $this->getCreateMetadataFields($projectKey, $issueTypeName);

        $fluentIssueCreate = new FluentIssueCreate($this->client, $fieldsMetadata);

        return $fluentIssueCreate->field(Field::PROJECT, $projectKey)
                        ->field(Field::ISSUE_TYPE, $issueTypeName);
    }
1216652
public function deleteComment($issue, $commentId)
    {
        $path = "/issue/{$issue}/comment/{$commentId}";

        try {
            $this->client->callDelete($path);
        } catch (Exception $e) {
            throw new JiraException("Failed to delete comment", $e);
        }
    }
1074127
public function setCustomErrorLevel($issue_key, $error_level)
    {
        $this->issue_handlers[$issue_key] = new IssueHandler();
        $this->issue_handlers[$issue_key]->setErrorLevel($error_level);
    }
1097803
public function delete($project_id, $person_id)
    {
        $this->validates($project_id, $person_id);
        return $this->rest->delete("/projects/$project_id/people/$person_id");
    }
424430
def issue_info(self, issue_id):
        
        request_url = "{}issue/{}".format(self.create_basic_url(), issue_id)

        return_value = self._call_api(request_url)

        return return_value
525472
function _close()
	{
		if ($this->_connectionID) $this->_connectionID->Close();
		$this->_connectionID = false;
		return true;
	}
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
282285
@Deprecated
    public void deleteRelation(Integer id) throws RedmineException {
        new IssueRelation(transport).setId(id).delete();
    }