~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-12-07 04:56:36 UTC
  • mfrom: (14443.1.4 external-bugs)
  • Revision ID: launchpad@pqm.canonical.com-20111207045636-swdc5437km7787kx
[r=sinzui][bug=900603] Migrate external bugtracker config stuff from
        +bugs-index to +bugs, and drop +bugs-index.

Show diffs side-by-side

added added

removed removed

Lines of Context:
175
175
    )
176
176
from lp.app.browser.stringformatter import FormattersAPI
177
177
from lp.app.browser.tales import (
 
178
    BugTrackerFormatterAPI,
178
179
    DateTimeFormatterAPI,
179
180
    ObjectImageDisplayAPI,
180
181
    PersonFormatterAPI,
2554
2555
        return False
2555
2556
 
2556
2557
    @property
 
2558
    def can_have_external_bugtracker(self):
 
2559
        return (IProduct.providedBy(self.context)
 
2560
                or IProductSeries.providedBy(self.context))
 
2561
 
 
2562
    @property
 
2563
    def bugtracker(self):
 
2564
        """Description of the context's bugtracker.
 
2565
 
 
2566
        :returns: str which may contain HTML.
 
2567
        """
 
2568
        if self.bug_tracking_usage == ServiceUsage.LAUNCHPAD:
 
2569
            return 'Launchpad'
 
2570
        elif self.external_bugtracker:
 
2571
            return BugTrackerFormatterAPI(self.external_bugtracker).link(None)
 
2572
        else:
 
2573
            return 'None specified'
 
2574
 
 
2575
    @property
2557
2576
    def upstream_launchpad_project(self):
2558
2577
        """The linked upstream `IProduct` for the package.
2559
2578