@@ -91,6 +91,7 @@ $iss = new IssueService(new ArrayConfiguration(
91
91
### Project
92
92
- [ Get Project Info] ( #get-project-info )
93
93
- [ Get All Project list] ( #get-all-project-list )
94
+ - [ Get Project Type] ( #get-project-type )
94
95
95
96
### Custom Field
96
97
- [ Get All Field list] ( #get-all-field-list )
@@ -103,6 +104,8 @@ $iss = new IssueService(new ArrayConfiguration(
103
104
- [ Create Sub Task] ( #create-sub-task )
104
105
- [ Add Attachment] ( #add-attachment )
105
106
- [ Update issue] ( #update-issue )
107
+ - [ Change assignee] ( #change-assignee )
108
+ - [ Remove issue] ( #remove-issue )
106
109
- [ Add comment] ( #add-comment )
107
110
- [ Perform a transition on an issue] ( #perform-a-transition-on-an-issue )
108
111
- [ Perform an advanced search, using the JQL] ( #perform-an-advanced-search )
@@ -160,6 +163,36 @@ try {
160
163
161
164
```
162
165
166
+ #### Get Project type
167
+
168
+ ``` php
169
+ <?php
170
+ require 'vendor/autoload.php';
171
+
172
+ use JiraRestApi\Project\ProjectService;
173
+ use JiraRestApi\Project\ProjectType;
174
+ use JiraRestApi\JiraException;
175
+
176
+ try {
177
+ $proj = new ProjectService();
178
+
179
+ // get all project type
180
+ $prjtyps = $proj->getProjectTypes();
181
+
182
+ foreach ($prjtyps as $pt) {
183
+ var_dump($pt);
184
+ }
185
+
186
+ // get specific project type.
187
+ $pt = $proj->getProjectType('software');
188
+ var_dump($pt);
189
+
190
+ } catch (JiraException $e) {
191
+ print("Error Occured! " . $e->getMessage());
192
+ }
193
+
194
+ ```
195
+
163
196
#### Get All Field List
164
197
165
198
``` php
@@ -451,9 +484,15 @@ try {
451
484
->setDescription("This is a shorthand for a set operation on the summary field")
452
485
;
453
486
487
+ // optionally set some query params
488
+ $editParams = array(
489
+ 'notifyUsers' => false
490
+ );
491
+
454
492
$issueService = new IssueService();
455
493
456
- $ret = $issueService->update($issueKey, $issueField);
494
+ // You can set the $paramArray param to disable notifications in example
495
+ $ret = $issueService->update($issueKey, $issueField, $editParams);
457
496
458
497
var_dump($ret);
459
498
} catch (JiraException $e) {
@@ -463,6 +502,56 @@ try {
463
502
464
503
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.
465
504
505
+ #### Change Assignee
506
+
507
+ ``` php
508
+ <?php
509
+ require 'vendor/autoload.php';
510
+
511
+ use JiraRestApi\Issue\IssueService;
512
+ use JiraRestApi\JiraException;
513
+
514
+ $issueKey = "TEST-879";
515
+
516
+ try {
517
+ $issueService = new IssueService();
518
+
519
+ // if assignee is -1, automatic assignee used.
520
+ // A null assignee will remove the assignee.
521
+ $assignee = 'newAssigneeName';
522
+
523
+ $ret = $issueService->changeAssignee($issueKey, $assignee);
524
+
525
+ var_dump($ret);
526
+ } catch (JiraException $e) {
527
+ $this->assertTrue(FALSE, "Change Assignee Failed : " . $e->getMessage());
528
+ }
529
+ ```
530
+
531
+ #### Remove Issue
532
+
533
+ ``` php
534
+ <?php
535
+ require 'vendor/autoload.php';
536
+
537
+ use JiraRestApi\Issue\IssueService;
538
+ use JiraRestApi\JiraException;
539
+
540
+ $issueKey = "TEST-879";
541
+
542
+ try {
543
+ $issueService = new IssueService();
544
+
545
+ $ret = $issueService->deleteIssue($issueKey);
546
+ // if you want to delete issues with sub-tasks
547
+ //$ret = $issueService->deleteIssue($issueKey, array('deleteSubtasks' => 'true'));
548
+
549
+ var_dump($ret);
550
+ } catch (JiraException $e) {
551
+ $this->assertTrue(FALSE, "Change Assignee Failed : " . $e->getMessage());
552
+ }
553
+ ```
554
+
466
555
#### Add comment
467
556
468
557
``` php
0 commit comments