| @@ 25-47 (lines=23) @@ | ||
| 22 | } |
|
| 23 | } |
|
| 24 | ||
| 25 | public function issueWorklog() |
|
| 26 | { |
|
| 27 | $issueKey = 'TEST-961'; |
|
| 28 | ||
| 29 | try { |
|
| 30 | $workLog = new Worklog(); |
|
| 31 | ||
| 32 | $workLog->setComment('I did some work here.') |
|
| 33 | ->setStarted("2016-05-28 12:35:54") |
|
| 34 | ->setTimeSpent('1d 2h 3m'); |
|
| 35 | ||
| 36 | $issueService = new IssueService(); |
|
| 37 | ||
| 38 | $ret = $issueService->addWorklog($issueKey, $workLog); |
|
| 39 | ||
| 40 | $workLogid = $ret->{'id'}; |
|
| 41 | ||
| 42 | var_dump($ret); |
|
| 43 | } catch (SenhorVerdugoException $e) { |
|
| 44 | $this->assertTrue(false, 'Create Failed : '.$e->getMessage()); |
|
| 45 | } |
|
| 46 | ||
| 47 | } |
|
| 48 | ||
| 49 | ||
| 50 | public function issueLink() |
|
| @@ 70-91 (lines=22) @@ | ||
| 67 | } |
|
| 68 | ||
| 69 | ||
| 70 | public function issueRemoteLink() |
|
| 71 | { |
|
| 72 | $issueKey = 'TEST-316'; |
|
| 73 | ||
| 74 | try { |
|
| 75 | $issueService = new IssueService(); |
|
| 76 | ||
| 77 | $ril = new RemoteIssueLink(); |
|
| 78 | ||
| 79 | $ril->setUrl('http://www.mycompany.com/support?id=1') |
|
| 80 | ->setTitle('Remote Link Title') |
|
| 81 | ->setRelationship('causes') |
|
| 82 | ->setSummary('Crazy customer support issue'); |
|
| 83 | ||
| 84 | $rils = $issueService->createOrUpdateRemoteIssueLink($issueKey, $ril); |
|
| 85 | ||
| 86 | // rils is array of RemoteIssueLink classes |
|
| 87 | var_dump($rils); |
|
| 88 | } catch (SenhorVerdugoException $e) { |
|
| 89 | $this->assertTrue(false, 'Create Failed : '.$e->getMessage()); |
|
| 90 | } |
|
| 91 | } |
|
| 92 | ||
| 93 | public function comment() |
|
| 94 | { |
|
| @@ 8-28 (lines=21) @@ | ||
| 5 | ||
| 6 | class Update extends SenhorVerdugo |
|
| 7 | { |
|
| 8 | public function issueWorklog() |
|
| 9 | { |
|
| 10 | $issueKey = 'TEST-961'; |
|
| 11 | $workLogid = '12345'; |
|
| 12 | ||
| 13 | try { |
|
| 14 | $workLog = new Worklog(); |
|
| 15 | ||
| 16 | $workLog->setComment('I did edit previous worklog here.') |
|
| 17 | ->setStarted("2016-05-29 13:15:34") |
|
| 18 | ->setTimeSpent('3d 4h 5m'); |
|
| 19 | ||
| 20 | $issueService = new IssueService(); |
|
| 21 | ||
| 22 | $ret = $issueService->editWorklog($issueKey, $workLog, $workLogid); |
|
| 23 | ||
| 24 | var_dump($ret); |
|
| 25 | } catch (SenhorVerdugoException $e) { |
|
| 26 | $this->assertTrue(false, 'Edit worklog Failed : '.$e->getMessage()); |
|
| 27 | } |
|
| 28 | } |
|
| 29 | ||
| 30 | /** |
|
| 31 | * Perform a transition on an issue |
|