Closed
Bug 481316
Opened 16 years ago
Closed 16 years ago
Users can only watch one category in a specified language
Categories
(support.mozilla.org :: Knowledge Base Software, task)
Tracking
(Not tracked)
VERIFIED
FIXED
0.9.5
People
(Reporter: ecooper, Assigned: ecooper)
References
()
Details
(Whiteboard: tiki_fixed)
Attachments
(2 files)
Due to how Tikilib::add_user_watch adds watches, users currently can't watch one category in more than one language.
STR:
1. Login and visit "My Watches"
2. Add a watch for the "Additional Categories" category in the Albanian language
3. Add a watch for the "Additional Categories" category in the Assamese language
Expected:
Two watches for the "Additional Categories" category--one for Albanian and one for Assamese.
Actual:
The Assamese watch will replace the Albanian watch
Updated•16 years ago
|
OS: Linux → All
Assignee | ||
Comment 1•16 years ago
|
||
Tikilib::add_user_watch deletes the watch you're adding to prevent duplicates.
If you constrain that delete by watch 'type' as well, it will fix this bug. Unfortunately, it will also cause duplicate primary keys (which go by event and object, which made sense when watches were just for objects and not objects from a particular language). Fixing this may require expanding the primary key to include `type` or some other schema change to the tiki_user_watches table.
Assignee | ||
Comment 2•16 years ago
|
||
Unless we want (which we may want to in the future) to rework how watches work in tiki, this schema change is needed.
Attachment #367514 -
Flags: review?(laura)
Assignee | ||
Updated•16 years ago
|
Attachment #367514 -
Attachment is patch: false
Assignee | ||
Comment 3•16 years ago
|
||
And this is the patch to go with the new SQL.
Attachment #367515 -
Flags: review?(laura)
Comment 4•16 years ago
|
||
Comment on attachment 367514 [details]
Adding `type` as a primary key for tiki_user_watches
This is ok but it's going to take a while to run in prod - just give IT a heads up when we push.
Attachment #367514 -
Flags: review?(laura) → review+
Updated•16 years ago
|
Attachment #367515 -
Flags: review?(laura) → review+
Assignee | ||
Comment 5•16 years ago
|
||
I'll file an IT bug in the morning to get the SQL run on prod so we can test the patch.
It's also noteworthy to mention that the SQL *needs* to be run before the patch.
Assignee | ||
Comment 6•16 years ago
|
||
The SQL update was run in bug 483969.
The patch is in r23582/r23583.
Just to reiterate, we'll need the SQL run on prod *before* the 1.0 code is pushed to prod.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment 7•16 years ago
|
||
Verified FIXED on https://support-stage.mozilla.org/tiki-user_watches.php?locale=en-US
Status: RESOLVED → VERIFIED
Updated•15 years ago
|
Whiteboard: tiki_bug
Updated•15 years ago
|
Whiteboard: tiki_bug → tiki_fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•