l.b.i.bugtaskfilter : module documentation

Part of lp.bugs.interfaces

Fiter bugtasks based on context.
Function simple_weight_calculator All tasks have the same weighting.
Function filter_bugtasks_by_context Return the bugtasks filtered so there is only one bug task per bug.
def simple_weight_calculator(bugtask):
All tasks have the same weighting.
def filter_bugtasks_by_context(context, bugtasks):
Return the bugtasks filtered so there is only one bug task per bug.

The context is used to return the most relevent bugtask for that context.

An initial constraint is to not require any database queries from this method.

Current contexts that impact selection:
IProduct IProductSeries IDistribution IDistroSeries ISourcePackage
Others:
get the first bugtask for any particular bug

If the context is a Product, then return the product bug task if there is one. If the context is a ProductSeries, then return the productseries task if there is one, and if there isn't, look for the product task. A similar approach is taked for Distribution and distroseries.

For source packages, we look for the source package task, followed by the distro source package, then the distroseries task, and lastly the distro task.

If there is no specific matching task, we return the first task (the one with the smallest database id).

API Documentation for Launchpad, generated by pydoctor at 2018-10-15 00:00:04.