@@ -104,6 +104,8 @@ $iss = new IssueService(new ArrayConfiguration(
104
104
- [ Create Sub Task] ( #create-sub-task )
105
105
- [ Add Attachment] ( #add-attachment )
106
106
- [ Update issue] ( #update-issue )
107
+ - [ Change assignee] ( #change-assignee )
108
+ - [ Remove issue] ( #remove-issue )
107
109
- [ Add comment] ( #add-comment )
108
110
- [ Perform a transition on an issue] ( #perform-a-transition-on-an-issue )
109
111
- [ Perform an advanced search, using the JQL] ( #perform-an-advanced-search )
@@ -494,6 +496,54 @@ try {
494
496
495
497
If you want to change the custom field type when updating an issue, you can call the * addCustomField* function just as you did for creating issue.
496
498
499
+ #### Change Assignee
500
+
501
+ ``` php
502
+ <?php
503
+ require 'vendor/autoload.php';
504
+
505
+ use JiraRestApi\Issue\IssueService;
506
+ use JiraRestApi\JiraException;
507
+
508
+ $issueKey = "TEST-879";
509
+
510
+ try {
511
+ $issueService = new IssueService();
512
+
513
+ // if assignee is -1, automatic assignee used.
514
+ // A null assignee will remove the assignee.
515
+ $assignee = 'newAssigneeName';
516
+
517
+ $ret = $issueService->changeAssignee($this->key, $assignee);
518
+
519
+ var_dump($ret);
520
+ } catch (JiraException $e) {
521
+ $this->assertTrue(FALSE, "Change Assignee Failed : " . $e->getMessage());
522
+ }
523
+ ```
524
+
525
+ #### Remove Issue
526
+
527
+ ``` php
528
+ <?php
529
+ require 'vendor/autoload.php';
530
+
531
+ use JiraRestApi\Issue\IssueService;
532
+ use JiraRestApi\JiraException;
533
+
534
+ $issueKey = "TEST-879";
535
+
536
+ try {
537
+ $issueService = new IssueService();
538
+
539
+ $ret = $issueService->deleteIssue($this->key);
540
+
541
+ var_dump($ret);
542
+ } catch (JiraException $e) {
543
+ $this->assertTrue(FALSE, "Change Assignee Failed : " . $e->getMessage());
544
+ }
545
+ ```
546
+
497
547
#### Add comment
498
548
499
549
``` php
0 commit comments