-
Notifications
You must be signed in to change notification settings - Fork 123
Functions to return project components, resolutions and issue types #102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
dfe26c3
70137dc
8fbf786
eb4dac5
231f29b
f19ca8a
e698dd6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -197,6 +197,17 @@ public function editIssue($issue_key, array $params) | |
| return $this->api(self::REQUEST_PUT, sprintf('/rest/api/2/issue/%s', $issue_key), $params); | ||
| } | ||
|
|
||
| /** | ||
| * Gets attachments meta information. | ||
| * | ||
| * @return array | ||
| * @since 2.0.0 | ||
| */ | ||
| public function getAttachmentsMetaInformation() | ||
| { | ||
| return $this->api(self::REQUEST_GET, '/rest/api/2/attachment/meta'); | ||
| } | ||
|
|
||
| /** | ||
| * Gets attachment. | ||
| * | ||
|
|
@@ -835,4 +846,42 @@ public function closeIssue($issue_key) | |
| return $result; | ||
| } | ||
|
|
||
| /** | ||
| * Returns project components. | ||
| * | ||
| * @param string $project_key Project key. | ||
| * | ||
| * @return array|false | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In which cases the I thought, that if project has no component, then I'll get empty array back. If there was an error I'll get an exception. |
||
| * @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 getAllIssueTypes($project_key) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We already have a getIssueTypes who returns the global list. This one is specific for projects. Maybe rename to getProjectIssueTypes?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree on everything above it will be corrected and committed asap. |
||
| { | ||
| return $this->api(self::REQUEST_GET, "/rest/api/2/project/{$project_key}/statuses", array(), true); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use sprintf here as well
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And single quotes. |
||
| } | ||
|
|
||
| /** | ||
| * 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); | ||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There must be an empty line after last function in a class. Please configure CS check locally to see the issue. |
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't getAttachmentsMetaInformation already merged #101? Please remove from this diff