IntegrityError with unknown milestone when changing bug's project

Bug #157606 reported by Stéphane Loeuillet
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Unassigned

Bug Description

This bug :
https://bugs.edge.launchpad.net/launchpad/+bug/156117/

Is registered against "launchpad" product
As it is PPA related, I tried to change product to "soyuz"

It makes launchpad crash :
OOPS-665EB3 (IntegrityError: ERROR: insert or update on table "bugtask" violates foreign key constraint "bugtask_product_milestone_fk" DETAIL: Key (product,milestone)=(1003,401) is not present in table "milestone".)

OOPS-759D202, OOPS-757EC110

I did not see Milestone=Launchpad: 1.1.11
I suppose it is because of the Milestone that it crashed (no such milestone in Soyuz)

Recent occurrence: OOPS-1532EC1035

Related branches

Revision history for this message
Celso Providelo (cprov) wrote :

It doesn't seem to be related directly with the target product & milestone, I've just changed it successfully.
Perhaps it is related with the lack of permission to unset target milestone (launchpad.1.1.11) while changing the product, this action it executed behind the scenes.

Revision history for this message
Stéphane Loeuillet (leroutier) wrote :

I can't say for sure why it crashed for me but not for you.
This permission problem could be the culprit.

I suppose you'll have to dig into the OOPS to figure it out at 100%

Changed in launchpad:
importance: Undecided → Medium
status: New → Confirmed
description: updated
Changed in malone:
assignee: nobody → bjornt
Changed in malone:
assignee: Björn Tillenius (bjornt) → nobody
Ursula Junque (ursinha)
description: updated
Revision history for this message
Curtis Hovey (sinzui) wrote :

I do not think it is possible to get an oops following the paths in the older oopses because the code changed. Milestones are rejected when the product is retargeted. The is still a problem though. The integrity error has happened this year and it was caused by a mismatch of products: OOPS-1532EC1035 shows that the user reported an issue against update-manager (id=963), but the milestone that was selected actually belongs to Landscape (id=1964). I am puzzled the by landscape fields in the report.

Changed in launchpad:
importance: Medium → Critical
Curtis Hovey (sinzui)
Changed in launchpad:
milestone: none → 11.03
assignee: nobody → Curtis Hovey (sinzui)
status: Triaged → In Progress
Revision history for this message
Curtis Hovey (sinzui) wrote :

I can produce this oops still. I misread the field names an *who* was making the change. The form fields are named after the project because the view works with multiple bugtasks. There is no issue when the milestone field is included in the form.

The oops shows a non-privileged user changing the project using +editstatus. He does not have permission to set the status or the milestone, the fields are not included. The view is passing the existing milestone instead of clearing it.

Curtis Hovey (sinzui)
Changed in launchpad:
milestone: 11.03 → 11.04
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
Curtis Hovey (sinzui)
Changed in launchpad:
assignee: Curtis Hovey (sinzui) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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