#88 Adding check for JIRA issue fields before checking
Merged by sidpremkumar. Opened by sidpremkumar.
sidpremkumar/sync-to-jira Empty-jira-description-fix  into  develop

Download 88.patch

If a JIRA ticket has no description bad things happen. This ensures that we check our values before we compare.

Although, hold on. Maybe this can be super-simplified with just this change:

description = result.fields.description or ""  # Guard against None
if issue.id in description or issue.title == result.fields.summary:

WDYT?

Although, hold on. Maybe this can be super-simplified with just this change:
description = result.fields.description or "" # Guard against None
if issue.id in description or issue.title == result.fields.summary:

WDYT?

This is easier but I was hoping to catch any case (which I can't imagine, but I couldn't imagine this case either) where the result.fields.summary is None as well. Might be overkill though?

Ack. You could do

description = issue.fields.description or ""
summary = issue.fields.summary or ""
if issue.id in description or issue.title == summary

Is that equivalent?

Ack. You could do
description = issue.fields.description or ""
summary = issue.fields.summary or ""
if issue.id in description or issue.title == summary

Is that equivalent?

+1

rebased onto 48e200e92baf5483925ba12fc0fbd71a97cb4c6d

Pull-Request has been merged by sidpremkumar

Metadata