src/Jira/Api.php
public function closeIssue($issue_key)
	{
		$result = array();

		// Get available transitions.
		$tmp_transitions = $this->getTransitions($issue_key, array());
		$tmp_transitions_result = $tmp_transitions->getResult();
		$transitions = $tmp_transitions_result['transitions'];

		// Look for "Close Issue" transition in issue transitions.
		foreach ( $transitions as $v ) {
			// Close issue if required id was found.
			if ( $v['name'] == 'Close Issue' ) {
				$result = $this->transition(
					$issue_key,
					array(
						'transition' => array('id' => $v['id']),
					)
				);
				break;
			}
		}

		return $result;
	}
public function closeIssue($issue_key)
	{
		$result = array();

		// Get available transitions.
		$tmp_transitions = $this->getTransitions($issue_key, array());
		$tmp_transitions_result = $tmp_transitions->getResult();
		$transitions = $tmp_transitions_result['transitions'];

		// Look for "Close Issue" transition in issue transitions.
		foreach ( $transitions as $v ) {
			// Close issue if required id was found.
			if ( $v['name'] == 'Close Issue' ) {
				$result = $this->transition(
					$issue_key,
					array(
						'transition' => array('id' => $v['id']),
					)
				);
				break;
			}
		}

		return $result;
	}
public function closeIssue ( $ issue_key ) { $ result = array ( ) ; // Get available transitions. $ tmp_transitions = $ this -> getTransitions ( $ issue_key , array ( ) ) ; $ tmp_transitions_result = $ tmp_transitions -> getResult ( ) ; $ transitions = $ tmp_transitions_result [ 'transitions' ] ; // Look for "Close Issue" transition in issue transitions. foreach ( $ transitions as $ v ) { // Close issue if required id was found. if ( $ v [ 'name' ] == 'Close Issue' ) { $ result = $ this -> transition ( $ issue_key , array ( 'transition' => array ( 'id' => $ v [ 'id' ] ) , ) ) ; break ; } } return $ result ; }
Closes issue.

@param string $issue_key Issue key.

@return Result|array
@TODO:  Should have parameters? (e.g comment)
Closes issue .