Comment 2 for bug 200457

Revision history for this message
Markus Korn (thekorn) wrote :

I changed the behaviour of get_open_milestones. If you run dict(get_open_milestones(<args>)) you will now get a dict with the identifier as key and the id as value. It also contains a short-form of the identifier:

In [4]: from launchpadbugs.utils import get_open_milestones

In [5]: from launchpadbugs.basebuglistfilter import URLBugListFilter

In [6]: milestones = dict(get_open_milestones("ubuntu"))

In [7]: milestones
Out[7]:
{'Ubuntu: dapper-updates': 135,
 'Ubuntu: edgy-updates': 197,
 'Ubuntu: gutsy-updates': 814,
 'Ubuntu: intrepid-alpha-1': 1319,
 'Ubuntu: intrepid-alpha-2': 1320,
 'Ubuntu: intrepid-alpha-3': 1321,
 'Ubuntu: intrepid-alpha-4': 1322,
 'Ubuntu: intrepid-alpha-5': 1323,
 'Ubuntu: intrepid-alpha-6': 1324,
 'Ubuntu: later': 196,
 'Ubuntu: ubuntu-8.04.1': 1264,
 'Ubuntu: ubuntu-8.04.2': 1425,
 'Ubuntu: ubuntu-8.10': 1326,
 'Ubuntu: ubuntu-8.10-beta': 1325,
 'dapper-updates': 135,
 'edgy-updates': 197,
 'gutsy-updates': 814,
 'intrepid-alpha-1': 1319,
 'intrepid-alpha-2': 1320,
 'intrepid-alpha-3': 1321,
 'intrepid-alpha-4': 1322,
 'intrepid-alpha-5': 1323,
 'intrepid-alpha-6': 1324,
 'later': 196,
 'ubuntu-8.04.1': 1264,
 'ubuntu-8.04.2': 1425,
 'ubuntu-8.10': 1326,
 'ubuntu-8.10-beta': 1325}

In [8]: myfilter = URLBugListFilter()

In [10]: myfilter.add_option("milestone", (milestones["Ubuntu: gutsy-updates"], milestones["later"]))

In [11]: myfilter.urlopt
Out[11]: 'field.milestone%3Alist=814&field.milestone%3Alist=196'

This is now implemented in the intrepid.merge branch.

Markus