@@ -20,7 +20,7 @@ function getConfig() {
2020 'CURLOPT_SSL_VERIFYHOST' => false,
2121 'CURLOPT_SSL_VERIFYPEER' => false,
2222 'CURLOPT_VERBOSE' => true,
23- 'LOG_FILE' => 'QQjira -rest-client.log',
23+ 'LOG_FILE' => 'jira -rest-client.log',
2424 'LOG_LEVEL' => 'DEBUG'
2525 );
2626}
4545 $p = $proj->get('TEST');
4646
4747 print_r($p);
48- } catch (HTTPException $e) {
48+ } catch (JIRAException $e) {
4949 print("Error Occured! " . $e->getMessage());
5050}
5151?>
@@ -64,14 +64,13 @@ try {
6464
6565 $prjs = $proj->getAllProjects();
6666
67- $i = 0;
6867 foreach ($prjs as $p) {
6968 echo sprintf("Project Key:%s, Id:%s, Name:%s, projectCategory: %s\n",
7069 $p->key, $p->id, $p->name, $p->projectCategory['name']
7170 );
7271
7372 }
74- } catch (HTTPException $e) {
73+ } catch (JIRAException $e) {
7574 print("Error Occured! " . $e->getMessage());
7675}
7776?>
9190 $issue = $issueService->get('TEST-867');
9291
9392 print_r($issue->fields);
94- } catch (HTTPException $e) {
93+ } catch (JIRAException $e) {
9594 print("Error Occured! " . $e->getMessage());
9695}
9796
@@ -109,7 +108,7 @@ use JiraRestApi\Issue\IssueService;
109108use JiraRestApi\Issue\IssueField;
110109try {
111110 $issueField = new IssueField();
112- $issueField->setProjectId("12000 ")
111+ $issueField->setProjectKey("TEST ")
113112 ->setSummary("something's wrong")
114113 ->setAssigneeName("lesstif")
115114 ->setPriorityName("Critical")
@@ -124,7 +123,7 @@ try {
124123
125124 //If success, Returns a link to the created issue.
126125 print_r($ret);
127- } catch (HTTPException $e) {
126+ } catch (JIRAException $e) {
128127 print("Error Occured! " . $e->getMessage());
129128}
130129
0 commit comments