~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/browser/bugalsoaffects.py

  • Committer: Curtis Hovey
  • Date: 2011-12-18 15:13:07 UTC
  • mto: This revision was merged to the branch mainline in revision 14547.
  • Revision ID: curtis.hovey@canonical.com-20111218151307-sdm2gzobt5tplbe0
Moved badges to lp.app.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    SimpleVocabulary,
30
30
    )
31
31
 
32
 
from lp import _
 
32
from canonical.launchpad import _
 
33
from lp.app.browser.multistep import (
 
34
    MultiStepView,
 
35
    StepView,
 
36
    )
 
37
from canonical.launchpad.webapp import canonical_url
 
38
from canonical.launchpad.webapp.interfaces import ILaunchBag
 
39
from canonical.launchpad.webapp.menu import structured
33
40
from lp.app.browser.launchpadform import (
34
41
    action,
35
42
    custom_widget,
36
43
    LaunchpadFormView,
37
44
    )
38
 
from lp.app.browser.multistep import (
39
 
    MultiStepView,
40
 
    StepView,
41
 
    )
42
45
from lp.app.enums import ServiceUsage
43
46
from lp.app.interfaces.launchpad import ILaunchpadCelebrities
44
47
from lp.app.validators.email import email_validator
84
87
from lp.services.features import getFeatureFlag
85
88
from lp.services.fields import StrippedTextLine
86
89
from lp.services.propertycache import cachedproperty
87
 
from lp.services.webapp import canonical_url
88
 
from lp.services.webapp.interfaces import ILaunchBag
89
 
from lp.services.webapp.menu import structured
90
90
 
91
91
 
92
92
class BugAlsoAffectsProductMetaView(MultiStepView):
663
663
        if data.get('add_packaging', False):
664
664
            # Create a packaging link so that Launchpad will suggest the
665
665
            # upstream project to the user.
666
 
            series = self.context.target.distribution.currentseries
667
 
            if series:
668
 
                getUtility(IPackagingUtil).createPackaging(
669
 
                    productseries=data['product'].development_focus,
670
 
                    sourcepackagename=self.context.target.sourcepackagename,
671
 
                    distroseries=series, packaging=PackagingType.PRIME,
672
 
                    owner=self.user)
 
666
            packaging_util = getUtility(IPackagingUtil)
 
667
            packaging_util.createPackaging(
 
668
                productseries=data['product'].development_focus,
 
669
                sourcepackagename=self.context.target.sourcepackagename,
 
670
                distroseries=self.context.target.distribution.currentseries,
 
671
                packaging=PackagingType.PRIME, owner=self.user)
673
672
        return super(ProductBugTaskCreationStep, self).main_action(data)
674
673
 
675
674
    @property