# set custom mingle properties properties = {} for key, value in bugzillaProperties.iteritems(): properties[value] = bug.get(key, '') properties.update(mingleProperties) for prop, value in properties.iteritems(): propName = prop.strip('\'').strip('"') propValue = mapping.get(value, value).strip('\'').strip('"') cardParams = { 'card[properties][][name]': propName, 'card[properties][][value]': propValue } mingle.updateCardByLocation(cardLocation, cardParams) bingle.info(mingle.dumpRequest()) # include bug ID if configured as a property if len(bugIdFieldName): bugId = bug.get('id') cardParams = { 'card[properties][][name]': bugIdFieldName, 'card[properties][][value]': bugId, } mingle.updateCardByLocation(cardLocation, cardParams) bingle.info(mingle.dumpRequest()) # post comment with mingle card it back to bugzilla bug pos = cardLocation.rfind('/')
# set custom mingle properties properties = {} for key, value in bugzillaProperties.iteritems(): properties[value] = bug.get(key, '') properties.update(mingleProperties) for prop, value in properties.iteritems(): propName = prop.strip('\'').strip('"') propValue = mapping.get(value, value).strip('\'').strip('"') cardParams = { 'card[properties][][name]': propName, 'card[properties][][value]': propValue } mingle.updateCardByLocation(cardLocation, cardParams) bingle.info(mingle.dumpRequest()) # include bug ID if configured as a property if len(bugIdFieldName): bugId = bug.get('id') cardParams = { 'card[properties][][name]': bugIdFieldName, 'card[properties][][value]': bugId, } mingle.updateCardByLocation(cardLocation, cardParams) bingle.info(mingle.dumpRequest()) # post comment with mingle card it back to bugzilla bug pos = cardLocation.rfind('/')