From 9059a8e7edde10c439d398ae276711a085f4304f Mon Sep 17 00:00:00 2001 From: Dmitry Davydov Date: Tue, 15 Jul 2014 14:41:07 +0600 Subject: [PATCH 1/3] Fix several get methods (issue fields were not accessible) --- Jira/Issue.php | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Jira/Issue.php b/Jira/Issue.php index 886b580..b59027c 100644 --- a/Jira/Issue.php +++ b/Jira/Issue.php @@ -132,8 +132,8 @@ public function getSummary() */ public function getIssueType() { - if (isset($this->fields['issuetype'])) { - return $this->fields['issuetype']; + if (isset($this->fields['Issuetype'])) { + return $this->fields['Issuetype']; } } @@ -144,8 +144,8 @@ public function getIssueType() */ public function getReporter() { - if (isset($this->fields['reporter'])) { - return $this->fields['reporter']; + if (isset($this->fields['Reporter'])) { + return $this->fields['Reporter']; } } @@ -156,8 +156,8 @@ public function getReporter() */ public function getCreated() { - if (isset($this->fields['created'])) { - return $this->fields['created']; + if (isset($this->fields['Created'])) { + return $this->fields['Created']; } } @@ -169,8 +169,8 @@ public function getCreated() public function getAssignee() { - if (isset($this->fields['assignee'])) { - return $this->fields['assignee']; + if (isset($this->fields['Assignee'])) { + return $this->fields['Assignee']; } } @@ -181,8 +181,8 @@ public function getAssignee() */ public function getUpdated() { - if (isset($this->fields['updated'])) { - return $this->fields['updated']; + if (isset($this->fields['Updated'])) { + return $this->fields['Updated']; } } @@ -193,8 +193,8 @@ public function getUpdated() */ public function getPriority() { - if (isset($this->fields['priority'])) { - return $this->fields['priority']; + if (isset($this->fields['Priority'])) { + return $this->fields['Priority']; } } @@ -265,8 +265,8 @@ public function getFixVersions() */ public function getResolution() { - if (isset($this->fields['resolution'])) { - return $this->fields['resolution']; + if (isset($this->fields['Resolution'])) { + return $this->fields['Resolution']; } } @@ -277,8 +277,8 @@ public function getResolution() */ public function getResolutionDate() { - if (isset($this->fields['resolutiondate'])) { - return $this->fields['resolutiondate']; + if (isset($this->fields['Resolutiondate'])) { + return $this->fields['Resolutiondate']; } } @@ -289,8 +289,8 @@ public function getResolutionDate() */ public function getWatches() { - if (isset($this->fields['watches'])) { - return $this->fields['watches']; + if (isset($this->fields['Watches'])) { + return $this->fields['Watches']; } } From 3055d56bb116d9f40bf51df67083959d9558ecf8 Mon Sep 17 00:00:00 2001 From: Dmitry Davydov Date: Tue, 15 Jul 2014 15:06:43 +0600 Subject: [PATCH 2/3] Fix several get methods (issue fields were not accessible) --- Jira/Issue.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Jira/Issue.php b/Jira/Issue.php index b59027c..11bc909 100644 --- a/Jira/Issue.php +++ b/Jira/Issue.php @@ -132,8 +132,8 @@ public function getSummary() */ public function getIssueType() { - if (isset($this->fields['Issuetype'])) { - return $this->fields['Issuetype']; + if (isset($this->fields['Issue Type'])) { + return $this->fields['Issue Type']; } } @@ -172,7 +172,7 @@ public function getAssignee() if (isset($this->fields['Assignee'])) { return $this->fields['Assignee']; } - } + } /** * get issue updated time @@ -271,6 +271,8 @@ public function getResolution() } /** + * Is the field exists? Maybe there should be 'Planned End'? + * * get resolution date * * @return mixed @@ -287,10 +289,10 @@ public function getResolutionDate() * * @return mixed */ - public function getWatches() + public function getWatchers() { - if (isset($this->fields['Watches'])) { - return $this->fields['Watches']; + if (isset($this->fields['Watchers'])) { + return $this->fields['Watchers']; } } From 26a654c8f03c080d0949a7ff691c053ddffff15f Mon Sep 17 00:00:00 2001 From: Dmitry Davydov Date: Wed, 23 Jul 2014 13:58:05 +0600 Subject: [PATCH 3/3] Add getDueDate method for Jira_Issue --- Jira/Issue.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Jira/Issue.php b/Jira/Issue.php index 11bc909..f621846 100644 --- a/Jira/Issue.php +++ b/Jira/Issue.php @@ -296,6 +296,18 @@ public function getWatchers() } } + /** + * get due date + * + * @return mixed + */ + public function getDueDate() + { + if (isset($this->fields['Due Date'])) { + return $this->fields['Due Date']; + } + } + /** * get information represented in call output due to expand=... suffix * @see https://docs.atlassian.com/jira/REST/latest/