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"))
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. basebuglistfilt er import URLBugListFilter
In [6]: milestones = dict(get_ open_milestones ("ubuntu" ))
In [7]: milestones alpha-1' : 1319, alpha-2' : 1320, alpha-3' : 1321, alpha-4' : 1322, alpha-5' : 1323, alpha-6' : 1324, 8.10-beta' : 1325}
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-
'intrepid-
'intrepid-
'intrepid-
'intrepid-
'intrepid-
'later': 196,
'ubuntu-8.04.1': 1264,
'ubuntu-8.04.2': 1425,
'ubuntu-8.10': 1326,
'ubuntu-
In [8]: myfilter = URLBugListFilter()
In [10]: myfilter. add_option( "milestone" , (milestones[ "Ubuntu: gutsy-updates"], milestones[ "later" ]))
In [11]: myfilter.urlopt milestone% 3Alist= 814&field. milestone% 3Alist= 196'
Out[11]: 'field.
This is now implemented in the intrepid.merge branch.
Markus