milestone parsing broken if you cannot change it

Bug #243057 reported by Brian Murray on 2008-06-25
2
Affects Status Importance Assigned to Milestone
python-launchpad-bugs
High
Markus Korn

Bug Description

I ran across bug 83143 today and noticed that it has a milestone called 'obsolete-milestone', however the intrepid.merge branch of python-launchpad-bugs indicates that the milestone is none.

TEST CASE:
In [1]: import launchpadbugs.connector as Connector
In [2]: Bug = Connector.ConnectBug()
In [3]: bug = Bug(83143)
In [4]: print bug.milestone
None

While obsolete-milestone is an Inactive milestone, I think these should still show up when accessing bug.milestone. Additionally, I could also see people wanting to filter on Inactive milestones. Is there a reason they are ignored?

Markus Korn (thekorn) wrote :

Hi Brain,
thanks for reporting this, this is a bug and is not related to inactive milestones. Parsing of milestones if the user is not allowed to change them seems to be broken. I' going to fix this asap.

Markus

Changed in python-launchpad-bugs:
assignee: nobody → thekorn
importance: Undecided → High
status: New → In Progress
Markus Korn (thekorn) wrote :

this verifies my first guess:

In [1]: from launchpadbugs.lpconstants import HTTPCONNECTION

In [2]: from launchpadbugs.connector import ConnectBug

In [3]: Bug = ConnectBug()

In [4]: bug = Bug(83143)

In [5]: bug.url
Out[5]: 'https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/83143'

In [6]: bug.milestone

In [7]: Bug.set_connection_mode(HTTPCONNECTION.MODE.EDGE)

In [8]: bug = Bug(83143)

In [9]: bug.url
Out[9]: 'https://bugs.edge.launchpad.net/ubuntu/+source/network-manager/+bug/83143'

In [10]: bug.milestone

In [11]: Bug.authentication = cookie

In [12]: bug = Bug(83143)

In [13]: bug.url
Out[13]: 'https://bugs.edge.launchpad.net/ubuntu/+source/network-manager/+bug/83143'

In [14]: bug.milestone
Out[14]: 'Ubuntu: obsolete-milestone'

In [15]: Bug.set_connection_mode(HTTPCONNECTION.MODE.STABLE)

In [16]: bug = Bug(83143)

In [17]: bug.url
Out[17]: 'https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/83143'

In [18]: bug.milestone
Out[18]: 'Ubuntu: obsolete-milestone'

Markus Korn (thekorn) wrote :

fixed in intrepid.merge:
------------------------------------------------------------
revno: 134
committer: Markus Korn <email address hidden>
branch nick: intrepid.merge
timestamp: Thu 2008-06-26 08:27:07 +0200
message:
  * launchpadbugs/html_bug.py: InfoTable: fixed parsing of maintainer is user
    is not allowed to change values (LP: #243057)
------------------------------------------------------------

Markus Korn (thekorn) wrote :

and .main
------------------------------------------------------------
revno: 104
committer: Markus Korn <email address hidden>
branch nick: main
timestamp: Thu 2008-06-26 08:38:11 +0200
message:
  * launchpadbugs/html_bug.py: InfoTable: fixed parsing of maintainer is user
    is not allowed to change values (LP: #243057)
------------------------------------------------------------

Changed in python-launchpad-bugs:
status: In Progress → Fix Committed
Brian Murray (brian-murray) wrote :

Using the text connector and trying to find the milestone for bug 211759 fails with the following error message:

<type 'exceptions.AttributeError'>: There is no row of the info-table linked to this bugreport (https://launchpad.net/bugs/211759/+text)

It works fine with bug 83143 though.

Markus Korn (thekorn) wrote :

This is not related to this bug and parsing in general. The major problem in the +text view of launchpad bugpages is that pages like https://bugs.edge.launchpad.net/bugs/211759/+text, unlike https://bugs.edge.launchpad.net/bugs/211759, are not redirected, so there is no way to find which of the many tasks should be shown as bug.info.

Redirection examples:
https://bugs.edge.launchpad.net/bugs/211759 --> https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/211759
but
https://bugs.edge.launchpad.net/bugs/211759/+text is not redirected

if https://bugs.edge.launchpad.net/bugs/211759/+text would be redirected to https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/211759/+text then it would be possible to use LPTasks.current_from_url() to parse 'distro' and 'package' out of the url to identify the task shown as bug.info

Markus

Markus Korn (thekorn) wrote :

Fix released in py-lp-bugs 0.3

The issue in comment #5 is a different bug, if it is still a problem, please open a new one.
Markus

Changed in python-launchpad-bugs:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers