Skip to content

Commit 6ad2883

Browse files
committed
v2.0.1 refine_fields: 작업, 버그 분기 처리
1 parent 0cd488f commit 6ad2883

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

middleware/laas/jira_fields_schema.py

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,29 @@ class Issue(BaseModel):
6161

6262
def refined_fields(self, reporter_id, assignee_id, slack_link):
6363
self.description += f'\n\n*Slack Link*: {slack_link}\n_이 이슈는 Wanted Jira Bolt로부터 자동 생성되었습니다._'
64-
return {
65-
'project': {'key': 'PI'},
66-
'reporter': {'id': reporter_id},
67-
'assignee': {'id': assignee_id},
68-
'issuetype': {'name': self.issue_type},
69-
'description': self.description,
70-
'summary': self.summary,
71-
'duedate': str(self.due_date) if self.due_date else None,
72-
'customfield_10106': {'value': self.environment} if self.environment else None,
73-
'customfield_10177': [{'value': prop} for prop in self.bug_property] if self.bug_property else None,
74-
}
75-
64+
if self.issue_type == '버그':
65+
return {
66+
'project': {'key': 'PI'},
67+
'reporter': {'id': reporter_id},
68+
'assignee': {'id': assignee_id},
69+
'issuetype': {'name': self.issue_type},
70+
'description': self.description,
71+
'summary': self.summary,
72+
'duedate': str(self.due_date) if self.due_date else None,
73+
'customfield_10106': {'value': self.environment} if self.environment else None,
74+
'customfield_10177': [{'value': prop} for prop in self.bug_property] if self.bug_property else None,
75+
}
76+
else:
77+
return {
78+
'project': {'key': 'PI'},
79+
'reporter': {'id': reporter_id},
80+
'assignee': {'id': assignee_id},
81+
'issuetype': {'name': self.issue_type},
82+
'description': self.description,
83+
'summary': self.summary,
84+
'duedate': str(self.due_date) if self.due_date else None,
85+
}
86+
7687
def refined_blocks(self, jira_response, item_user, reaction_user, workspace):
7788
blocks = [
7889
{

0 commit comments

Comments
 (0)