Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions src/Jira/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,4 +846,43 @@ public function closeIssue($issue_key)
return $result;
}

/**
* Returns project components.
*
* @param string $project_key Project key.
*
* @return array
* @since 2.0.0
*/
public function getProjectComponents($project_key)
{
return $this->api(self::REQUEST_GET, sprintf('/rest/api/2/project/%s/components', $project_key), array(), true);
}

/**
* Get all issue types with valid status values for a project.
*
* @param string $project_key Project key.
*
* @return array
* @since 2.0.0
*/
public function getProjectIssueTypes($project_key)
{
return $this->api(self::REQUEST_GET, sprintf('/rest/api/2/project/%s/statuses', $project_key), array(), true);
}

/**
* Returns a list of all resolutions.
*
* @param string $project_key Project key.
*
* @return array|false
* @since 2.0.0
*/
public function getResolutions()
{
return $this->api(self::REQUEST_GET, '/rest/api/2/resolution', array(), true);
}

}