Skip to content

Commit daca33a

Browse files
Adding upper limit to description for jira issue (#184)
1 parent 9c49a57 commit daca33a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

jbi/actions/default.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
logger = logging.getLogger(__name__)
1818

19+
JIRA_DESCRIPTION_CHAR_LIMIT = 32767
1920
JIRA_REQUIRED_PERMISSIONS = {
2021
"ADD_COMMENTS",
2122
"CREATE_ISSUES",
@@ -187,10 +188,14 @@ def create_and_link_issue( # pylint: disable=too-many-locals
187188
},
188189
)
189190
comment_list = self.bugzilla_client.get_comments(idlist=[bug_obj.id])
191+
description = comment_list["bugs"][str(bug_obj.id)]["comments"][0]["text"][
192+
:JIRA_DESCRIPTION_CHAR_LIMIT
193+
]
194+
190195
fields = {
191196
**bug_obj.map_as_jira_issue(), # type: ignore
192197
"issuetype": {"name": bug_obj.issue_type()},
193-
"description": comment_list["bugs"][str(bug_obj.id)]["comments"][0]["text"],
198+
"description": description,
194199
"project": {"key": self.jira_project_key},
195200
}
196201

0 commit comments

Comments
 (0)