~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/scripts/bugzilla.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-08-02 04:21:43 UTC
  • mfrom: (13571.2.4 createtask-and-addtask)
  • Revision ID: launchpad@pqm.canonical.com-20110802042143-26jeqxhukor1eg0e
[r=benji][no-qa] Bug.addTask and BugTaskSet.createTask now take an
 IBugTarget directly instead of a target key.

Show diffs side-by-side

added added

removed removed

Lines of Context:
534
534
            if re.match(r'^deb\d+$', bug.alias):
535
535
                watch = self.bugwatchset.createBugWatch(
536
536
                    lp_bug, lp_bug.owner, self.debbugs, bug.alias[3:])
 
537
                debtarget = self.debian
 
538
                if target['sourcepackagename']:
 
539
                    debtarget = debtarget.getSourcePackage(
 
540
                        target['sourcepackagename'])
537
541
                debtask = self.bugtaskset.createTask(
538
 
                    lp_bug,
539
 
                    owner=lp_bug.owner,
540
 
                    distribution=self.debian,
541
 
                    sourcepackagename=target['sourcepackagename'])
 
542
                    lp_bug, lp_bug.owner, debtarget)
542
543
                debtask.datecreated = bug.creation_ts
543
544
                debtask.bugwatch = watch
544
545
            else:
560
561
            if len(watches) > 0:
561
562
                if product:
562
563
                    upstreamtask = self.bugtaskset.createTask(
563
 
                        lp_bug, product=product, owner=lp_bug.owner)
 
564
                        lp_bug, lp_bug.owner, product)
564
565
                    upstreamtask.datecreated = bug.creation_ts
565
566
                    upstreamtask.bugwatch = watches[0]
566
567
                else: