Skip to content

Commit 68c082d

Browse files
committed
Merge pull request #20 from dvddmt/master
Fix several get methods for issue
2 parents 87d6dea + 26a654c commit 68c082d

File tree

1 file changed

+34
-20
lines changed

1 file changed

+34
-20
lines changed

Jira/Issue.php

+34-20
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ public function getSummary()
132132
*/
133133
public function getIssueType()
134134
{
135-
if (isset($this->fields['issuetype'])) {
136-
return $this->fields['issuetype'];
135+
if (isset($this->fields['Issue Type'])) {
136+
return $this->fields['Issue Type'];
137137
}
138138
}
139139

@@ -144,8 +144,8 @@ public function getIssueType()
144144
*/
145145
public function getReporter()
146146
{
147-
if (isset($this->fields['reporter'])) {
148-
return $this->fields['reporter'];
147+
if (isset($this->fields['Reporter'])) {
148+
return $this->fields['Reporter'];
149149
}
150150
}
151151

@@ -156,8 +156,8 @@ public function getReporter()
156156
*/
157157
public function getCreated()
158158
{
159-
if (isset($this->fields['created'])) {
160-
return $this->fields['created'];
159+
if (isset($this->fields['Created'])) {
160+
return $this->fields['Created'];
161161
}
162162
}
163163

@@ -169,10 +169,10 @@ public function getCreated()
169169

170170
public function getAssignee()
171171
{
172-
if (isset($this->fields['assignee'])) {
173-
return $this->fields['assignee'];
172+
if (isset($this->fields['Assignee'])) {
173+
return $this->fields['Assignee'];
174174
}
175-
}
175+
}
176176

177177
/**
178178
* get issue updated time
@@ -181,8 +181,8 @@ public function getAssignee()
181181
*/
182182
public function getUpdated()
183183
{
184-
if (isset($this->fields['updated'])) {
185-
return $this->fields['updated'];
184+
if (isset($this->fields['Updated'])) {
185+
return $this->fields['Updated'];
186186
}
187187
}
188188

@@ -193,8 +193,8 @@ public function getUpdated()
193193
*/
194194
public function getPriority()
195195
{
196-
if (isset($this->fields['priority'])) {
197-
return $this->fields['priority'];
196+
if (isset($this->fields['Priority'])) {
197+
return $this->fields['Priority'];
198198
}
199199
}
200200

@@ -265,20 +265,22 @@ public function getFixVersions()
265265
*/
266266
public function getResolution()
267267
{
268-
if (isset($this->fields['resolution'])) {
269-
return $this->fields['resolution'];
268+
if (isset($this->fields['Resolution'])) {
269+
return $this->fields['Resolution'];
270270
}
271271
}
272272

273273
/**
274+
* Is the field exists? Maybe there should be 'Planned End'?
275+
*
274276
* get resolution date
275277
*
276278
* @return mixed
277279
*/
278280
public function getResolutionDate()
279281
{
280-
if (isset($this->fields['resolutiondate'])) {
281-
return $this->fields['resolutiondate'];
282+
if (isset($this->fields['Resolutiondate'])) {
283+
return $this->fields['Resolutiondate'];
282284
}
283285
}
284286

@@ -287,10 +289,22 @@ public function getResolutionDate()
287289
*
288290
* @return mixed
289291
*/
290-
public function getWatches()
292+
public function getWatchers()
293+
{
294+
if (isset($this->fields['Watchers'])) {
295+
return $this->fields['Watchers'];
296+
}
297+
}
298+
299+
/**
300+
* get due date
301+
*
302+
* @return mixed
303+
*/
304+
public function getDueDate()
291305
{
292-
if (isset($this->fields['watches'])) {
293-
return $this->fields['watches'];
306+
if (isset($this->fields['Due Date'])) {
307+
return $this->fields['Due Date'];
294308
}
295309
}
296310

0 commit comments

Comments
 (0)