~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/browser/widgets/bugtask.py

  • Committer: Stuart Bishop
  • Date: 2011-09-28 12:49:24 UTC
  • mfrom: (9893.10.1 trivial)
  • mto: This revision was merged to the branch mainline in revision 14178.
  • Revision ID: stuart.bishop@canonical.com-20110928124924-m5a22fymqghw6c5i
Merged trivial into distinct-db-users.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
    "BugTaskAssigneeWidget",
11
11
    "BugTaskBugWatchWidget",
12
12
    "BugTaskSourcePackageNameWidget",
 
13
    "BugTaskTargetWidget",
13
14
    "BugWatchEditForm",
14
15
    "DBItemDisplayWidget",
15
16
    "NewLineToSpacesWidget",
66
67
    StrippedTextWidget,
67
68
    URIWidget,
68
69
    )
 
70
from lp.app.widgets.launchpadtarget import LaunchpadTargetWidget
69
71
from lp.bugs.interfaces.bugwatch import (
70
72
    IBugWatchSet,
71
73
    NoBugTrackerFound,
72
74
    UnrecognizedBugTrackerURL,
73
75
    )
 
76
from lp.bugs.vocabulary import UsesBugsDistributionVocabulary
74
77
from lp.registry.interfaces.distribution import IDistributionSet
75
78
from lp.services.features import getFeatureFlag
76
79
from lp.services.fields import URIField
473
476
            contents='\n'.join(rendered_items))
474
477
 
475
478
 
 
479
class BugTaskTargetWidget(LaunchpadTargetWidget):
 
480
 
 
481
    def getDistributionVocabulary(self):
 
482
        distro = self.context.context.distribution
 
483
        vocabulary = UsesBugsDistributionVocabulary(distro)
 
484
        return vocabulary
 
485
 
 
486
 
476
487
class BugTaskSourcePackageNameWidget(VocabularyPickerWidget):
477
488
    """A widget for associating a bugtask with a SourcePackageName.
478
489