Closed
Bug 615787
Opened 14 years ago
Closed 14 years ago
Document._clean_category() without an ID updates all docs without parents :(
Categories
(support.mozilla.org :: Knowledge Base Software, task, P1)
Tracking
(Not tracked)
VERIFIED
FIXED
2.3.1
People
(Reporter: rbillings, Assigned: jsocol)
References
Details
(Keywords: dataloss)
Articles are created with 'troubleshooting', as we migrated articles. For unknown reasons the categories are flipping. At last count all articles had been flipped to the 'Navigation' category.
Reporter | ||
Updated•14 years ago
|
Priority: -- → P1
Assignee | ||
Comment 2•14 years ago
|
||
Now everything has moved to Troubleshooting.
Assignee | ||
Comment 3•14 years ago
|
||
On support-stage, everything is in Troubleshooting. Trying to find a way to switch it all somewhere else.
Assignee | ||
Updated•14 years ago
|
Summary: Production randomly changing KB article categories → Document._clean_category() without an ID updates all docs without parents :(
Assignee | ||
Comment 4•14 years ago
|
||
master: https://github.com/jsocol/kitsune/commit/0403ec 2.3.x: https://github.com/jsocol/kitsune/commit/d960727
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 5•14 years ago
|
||
For posterity: In Document._clean_category() we call something like self.translations.all().update(category=self.category) Unfortunately, when you call that on an unsaved article, the SQL it generates to get translations.all() is something like: "SELECT id, ... WHERE parent_id IS NULL". So it was changing all documents without a parent, which is 1) all of English, and 2) any docs in other languages that aren't translations. This sucks. It's dataloss, but maybe we can get close to correct with a big-ol-SQL file doing some updates. We still have Paul's migration data, we should be able to do something like pull out ID and Category and run it as an update. Filing a new bug for that. Any articles created last night after the migration will have to be manually moved back.
Keywords: dataloss
Comment 6•14 years ago
|
||
... I feel so... betrayed... Django should warn about this ... at least in their documentation. Maybe they do and we all missed it.
Reporter | ||
Comment 7•14 years ago
|
||
Verified creating a new document with a non-default category did not switch existing US documents without a parent.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•