~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-08-03 05:00:46 UTC
  • mfrom: (13543.10.3 ghostly-series-tasks)
  • Revision ID: launchpad@pqm.canonical.com-20110803050046-d5b26bk2fqw9zm3a
[r=stevenk][bug=817336] Always show a row for a series task's parent
 context, even if there is no actual task for the parent.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3247
3247
        # iteration.
3248
3248
        bugtasks_by_package = bug.getBugTasksByPackageName(all_bugtasks)
3249
3249
 
 
3250
        latest_parent = None
 
3251
 
3250
3252
        for bugtask in all_bugtasks:
 
3253
            # Series bug targets only display the series name, so they
 
3254
            # must always be preceded by their parent context. Normally
 
3255
            # the parent will have a task, but if not we need to show a
 
3256
            # fake one.
 
3257
            if ISeriesBugTarget.providedBy(bugtask.target):
 
3258
                parent = bugtask.target.bugtarget_parent
 
3259
            else:
 
3260
                latest_parent = parent = bugtask.target
 
3261
 
 
3262
            if parent != latest_parent:
 
3263
                latest_parent = parent
 
3264
                bugtask_and_nomination_views.append(
 
3265
                    getMultiAdapter(
 
3266
                        (parent, self.request),
 
3267
                        name='+bugtasks-and-nominations-table-row'))
 
3268
 
3251
3269
            conjoined_master = bugtask.getConjoinedMaster(
3252
3270
                bugtasks, bugtasks_by_package)
3253
3271
            view = self._getTableRowView(