Example #1
0
            'product': product,
            'component': component,
            'status': ['UNCONFIRMED', 'NEW'],
            'last_change_time': fromTime,
        }])
    }
    for bug in bingle.getBugEntries(bugzillaPayload):
        bingle.info("Bug XML: %s" % bug)

        bugCardName = bingle.generateBugCardName(
            bug.get('id', '---'),
            bug.get('summary').encode('ascii', 'ignore'))

        # see if there's a mingle card matching this bug
        if len(bugIdFieldName) > 0:
            foundBug = mingle.findCardNumByBugId(bugCard, bug.get('id'),
                                                 bugIdFieldName)
        else:
            foundBug = mingle.findCardNumByName(bugCard, bugCardName)
        bingle.info(mingle.dumpRequest())
        if len(foundBug) > 0:
            bingle.info('Existing card(s) %s match bug %s, so skip it.' %
                        (','.join([str(m['Number'])
                                   for m in foundBug]), bug.get('id')))
            continue
        else:
            bingle.info('Did not find card matching bug %s, so add it.' %
                        (bug.get('id')))

        # retrieve bug comments
        comment_payload = {
            'method': 'Bug.comments',
Example #2
0
    fromTime = bingle.getTimeFromPickle()
    bugzillaPayload = {'method': 'Bug.search', 'params': json.dumps([{
        'product': product,
        'component': component,
        'status': ['UNCONFIRMED', 'NEW'],
        'last_change_time': fromTime,
    }])}
    for bug in bingle.getBugEntries(bugzillaPayload):
        bingle.info("Bug XML: %s" % bug)

        bugCardName = bingle.generateBugCardName(
            bug.get('id', '---'), bug.get('summary').encode('ascii', 'ignore'))

        # see if there's a mingle card matching this bug
        if len(bugIdFieldName) > 0:
            foundBug = mingle.findCardNumByBugId(
                bugCard, bug.get('id'), bugIdFieldName)
        else:
            foundBug = mingle.findCardNumByName(
                bugCard, bugCardName)
        bingle.info(mingle.dumpRequest())
        if len(foundBug) > 0:
            bingle.info('Existing card(s) %s match bug %s, so skip it.' % (
                ','.join([str(m['Number']) for m in foundBug]),
                bug.get('id')))
            continue
        else:
            bingle.info('Did not find card matching bug %s, so add it.'
                        % (bug.get('id')))

        # retrieve bug comments
        comment_payload = {'method': 'Bug.comments', 'params': json.dumps(