File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -107,8 +107,8 @@ public function addVersion($name)
107
107
108
108
public function addComment ($ comment )
109
109
{
110
- if (is_null ($ this ->comments )) {
111
- $ this ->comments = new \JiraRestApi \Issue \Comments ();
110
+ if (is_null ($ this ->comment )) {
111
+ $ this ->comment = new \JiraRestApi \Issue \Comments ();
112
112
}
113
113
114
114
array_push ($ this ->versions , $ v );
@@ -129,11 +129,16 @@ public function addLabel($label)
129
129
130
130
public function setIssueType ($ name )
131
131
{
132
- if (is_null ($ this ->issuetype )) {
133
- $ this ->issuetype = new \JiraRestApi \Issue \IssueType ();
134
- }
132
+ if (is_string ($ name )) {
133
+ if (is_null ($ this ->issuetype )) {
134
+ $ this ->issuetype = new \JiraRestApi \Issue \IssueType ();
135
+ }
135
136
136
- $ this ->issuetype ->name = $ name ;
137
+ $ this ->issuetype ->name = $ name ;
138
+ }
139
+ else {
140
+ $ this ->issuetype = $ name ;
141
+ }
137
142
138
143
return $ this ;
139
144
}
@@ -189,7 +194,7 @@ public function getIssueType()
189
194
public $ components ;
190
195
191
196
/** @var Comments */
192
- public $ comments ;
197
+ public $ comment ;
193
198
194
199
/** @var object */
195
200
public $ votes ;
You can’t perform that action at this time.
0 commit comments