Skip to content

Commit f62bad2

Browse files
authored
Merge pull request lesstif#56 from CobbleCity/master
Allow to assign issues if the field is not on edit dialog
2 parents f543216 + 5207166 commit f62bad2

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

src/Issue/IssueService.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,44 @@ public function addComment($issueIdOrKey, $comment)
203203

204204
return $comment;
205205
}
206+
207+
/**
208+
* Change a issue assignee
209+
*
210+
* @param issueIdOrKey Issue id or key
211+
* @param assignee array of assigne field informations
212+
*
213+
*/
214+
public function changeAssignee($issueIdOrKey, $assignee)
215+
{
216+
$this->log->addInfo("changeAssignee=\n");
217+
218+
$data = json_encode($assignee);
219+
220+
$ret = $this->exec($this->uri."/$issueIdOrKey/assignee", $data, 'PUT');
221+
222+
$this->log->addInfo('change assignee of '.$issueIdOrKey.' to '.json_encode($assignee).' result='.var_export($ret, true));
223+
224+
return $ret;
225+
}
206226

227+
/**
228+
* Delete a issue.
229+
*
230+
* @param issueIdOrKey Issue id or key
231+
*
232+
*/
233+
public function deleteIssue($issueIdOrKey)
234+
{
235+
$this->log->addInfo("deleteIssue=\n");
236+
237+
$ret = $this->exec($this->uri."/$issueIdOrKey", '', 'DELETE');
238+
239+
$this->log->addInfo('delete issue '.$issueIdOrKey.' result='.var_export($ret, true));
240+
241+
return $ret;
242+
}
243+
207244
/**
208245
* Get a list of the transitions possible for this issue by the current user, along with fields that are required and their types.
209246
*

0 commit comments

Comments
 (0)