getsentry / sentry-jira

A Plugin for sentry that lets you create JIRA issues
Other
95 stars 32 forks source link

forms.py:189 'NoneType' object has no attribute 'keys' #41

Open nsu opened 11 years ago

nsu commented 11 years ago

For whatever reason, the issue_type dict doesn't have a 'fields' key when it gets to line 189 in forms.py. This causes the get() call to return None, which doesn't have .keys() method.

I wrote a quick fix to keep things running, but I'm not sure if this is a symptom of a deeper problem.

Sentry v5.4.1 sentry-jira@master

thurloat commented 11 years ago

Sounds like the JIRA API isn't returning in an expected format (issue_type fields are populated via api response).

What version of JIRA are you running?

nsu commented 11 years ago

Looks like we're on JIRA v5.2.9#852

thurloat commented 11 years ago

Feel like adding a gist with the quick fix you added to keep things running?

thurloat commented 11 years ago

@nsu I just had another thought about this after re-reading the JIRA API docs.

"The fields in the createmeta correspond to the fields in the create screen for the project/issuetype. Fields not in the screen will not be in the createmeta."

Sounds weird, but is it possible that your JIRA configuration has a custom issue creation form, and no fields defined on it? That seems to be the only way (outside of possibly a permissions issue) that this problem could manifest.