@@ -122,6 +122,7 @@ def create_ticket(
122
122
summary : str ,
123
123
description : str ,
124
124
project_key : str ,
125
+ reporter_id :str ,
125
126
issue_type : str ,
126
127
priority : str ,
127
128
components : list ,
@@ -135,7 +136,7 @@ def create_ticket(
135
136
"issuetype" : {"name" : issue_type },
136
137
"summary" : summary ,
137
138
"reporter" : {
138
- "accountId " : "712020:f32d03f8-f91a-465d-871b-45135b7b955f"
139
+ "id " : reporter_id
139
140
},
140
141
"parent" : {"key" : robot },
141
142
"priority" : {"name" : priority },
@@ -222,6 +223,14 @@ def post_attachment_to_ticket(self, issue_id: str, attachment_path: str) -> None
222
223
nargs = 1 ,
223
224
help = "Email connected to JIRA account." ,
224
225
)
226
+ # TODO: write function to get reporter_id from email.
227
+ parser .add_argument (
228
+ "reporter_id" ,
229
+ metavar = "REPORTER_ID" ,
230
+ type = str ,
231
+ nargs = 1 ,
232
+ help = "JIRA Reporter ID."
233
+ )
225
234
# TODO: improve help comment on jira board id.
226
235
parser .add_argument (
227
236
"board_id" ,
@@ -237,7 +246,7 @@ def post_attachment_to_ticket(self, issue_id: str, attachment_path: str) -> None
237
246
api_token = args .jira_api_token [0 ]
238
247
email = args .email [0 ]
239
248
board_id = args .board_id [0 ]
240
-
249
+ reporter_id = args . reporter_id [ 0 ]
241
250
ticket = JiraTicket (url , api_token , email )
242
251
error_runs = get_error_runs_from_robot (ip )
243
252
one_run = error_runs [- 1 ] # Most recent run with error.
@@ -257,6 +266,7 @@ def post_attachment_to_ticket(self, issue_id: str, attachment_path: str) -> None
257
266
summary ,
258
267
whole_description_str ,
259
268
project_key ,
269
+ reporter_id ,
260
270
"Bug" ,
261
271
"Medium" ,
262
272
components ,
0 commit comments