assigning of package bug targets needs input validation

Bug #4845 reported by John Steele Scott (t-tec)
70
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Medium
Diogo Matsubara

Bug Description

I was at https://launchpad.net/distros/ubuntu/+source/apt-proxy/+bug/4844/+distrotask trying to add apt-proxy in Ubuntu as the package for this bug, but launchpad gave me an oops.

Tags: lp-bugs oops
Revision history for this message
Christian Reis (kiko) wrote :

I'm a bit confused with this report, because bug 4844 /is/ on apt-proxy in Ubuntu. Can you clarify?

Revision history for this message
John Steele Scott (t-tec) (john-t-tec-deactivatedaccount) wrote :

Ah, okay. Well I must've reported the bug against Ubuntu, and then at the end, forgotten that I'd done that, and tried to mark the bug as being in Ubuntu again. So maybe this oops happens if you assign a bug to a distro that it's already assigned to?

Revision history for this message
Christian Reis (kiko) wrote :

I think this was fixed the past week by Matsubara. It now says "invalid value" which isn't the best, but could be worse. I'll leave it to him to confirm and close this out.

Changed in launchpad:
assignee: nobody → matsubara
Revision history for this message
Diogo Matsubara (matsubara) wrote :

It's triggering a database constraint. I'll check it.

Traceback follows:

IntegrityError: ERROR: duplicate key violates unique constraint "bugtask_distinct_sourcepackage_assignment" INSERT INTO BugTask (id, status, assignee, distribution, sourcepackagename, dateassigned, owner, binarypackagename, product, severity, bugwatch, distrorelease, statusexplanation, datecreated, priority, milestone, bug, targetnamecache) VALUES (5426, 10, NULL, 1, 21407, CURRENT_TIMESTAMP AT TIME ZONE 'UTC', 247596, NULL, NULL, 30, NULL, NULL, NULL, CURRENT_TIMESTAMP AT TIME ZONE 'UTC', NULL, NULL, 4844, 'apt-proxy (Ubuntu)')

Brad Bollenbach (bradb)
Changed in launchpad:
status: New → Accepted
Revision history for this message
Diogo Matsubara (matsubara) wrote :

If someone requests a fix in distribution, and fill in the distribution (e.g. Ubuntu) and sourcepackagename (e.g. apt-proxy) fields and someone else request a fix in the same distribution without filling the sourcepackagename, the bug ends up with two bugtasks: sourcepackage (distro) and distro. (e.g. apt-proxy (ubuntu) and Ubuntu)

Does that make sense? Shouldn't we allow only the distro or the distro and sourcepackage?

Revision history for this message
Brad Bollenbach (bradb) wrote : Re: [Bug 4845] oops trying to add distro package

Le 5-Dec-05 à 7:53 AM, Diogo Matsubara a écrit :

> Public bug report changed:
> https://launchpad.net/malone/bugs/4845
>
> Comment:
> If someone requests a fix in distribution, and fill in the
> distribution
> (e.g. Ubuntu) and sourcepackagename (e.g. apt-proxy) fields and
> someone
> else request a fix in the same distribution without filling the
> sourcepackagename, the bug ends up with two bugtasks: sourcepackage
> (distro) and distro. (e.g. apt-proxy (ubuntu) and Ubuntu)
>
> Does that make sense? Shouldn't we allow only the distro or the distro
> and sourcepackage?

I can't think of a reason why you would want to have an "Ubuntu" task
and a "Ubuntu <packagename>" task open on the same bug.

Stuart, is it hard to fix this in terms of adjusting the db
constraints accordingly?

Cheers,

--
Brad Bollenbach

Revision history for this message
Stuart Bishop (stub) wrote : Re: oops trying to add distro package

Database constraints are only the safety net - the real work is fixing the UI.

That said, the constraint may be tricky and it may end up becoming a use case for OscarTheGrounch. But decide on the UI and sort that first

Changed in malone:
status: Confirmed → In Progress
Changed in malone:
status: In Progress → Fix Committed
Dafydd Harries (daf)
Changed in malone:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.