getsentry / sentry-jira

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

Supporting more complex custom fields (select type) #33

Closed thurloat closed 11 years ago

thurloat commented 11 years ago

a custom field that is of type select will require parsing of allowedValues, and sending back the result in a JSON object to the API.

currently, if you fill out the field, it will fail with a message like: "Could not find valid 'id' or 'value' in Parent Option object"

sample field schema that will be supported:

{
   u'required':False,
   u'schema':{
      u'type':u'string',
      u'custom':      u'com.atlassian.jira.plugin.system.customfieldtypes:select',
      u'customId':10420
   },
   u'name':u'Severity',
   u'operations':[
      u'set'
   ],
   u'allowedValues':[
      {
         u'self':         u'https://xxx/rest/api/2/customFieldOption/10010',
         u'value':u'Critical',
         u'id':u'10010'
      },
      {
         u'self':         u'https://xxx/rest/api/2/customFieldOption/10011',
         u'value':u'Major',
         u'id':u'10011'
      },
      {
         u'self':         u'https://xxx/rest/api/2/customFieldOption/10012',
         u'value':u'Minor',
         u'id':u'10012'
      },
      {
         u'self':         u'https://xxx/rest/api/2/customFieldOption/10013',
         u'value':u'Trivial',
         u'id':u'10013'
      }
   ]
}

cc @wolfe

thurloat commented 11 years ago

fixed in master :crown: -- let me know how it's working for you @wolfe

thurloat commented 11 years ago

Had to hack around the API some more, opened a ticket against the JIRA API here: https://jira.atlassian.com/browse/JRA-30892