Closed
Bug 1120480
Opened 10 years ago
Closed 10 years ago
taken_by returns a user id that we can't compare
Categories
(support.mozilla.org :: Questions, task)
support.mozilla.org
Questions
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: rik, Assigned: mythmon)
References
Details
(Whiteboard: p=0 c=questions u=api s=2015.1)
We need to compare taken_by with the current user. We don't know the user id and the question api returns one.
So we either need a user id returned by the User API or a username returned by the Question API.
Assignee | ||
Comment 1•10 years ago
|
||
This is an easy fix. I'll do it now.
Whiteboard: p=0 c=questions u=api s=2015.1
Assignee | ||
Comment 2•10 years ago
|
||
This PR makes it so all references to users on the question and answer serializers use `{username: 'bob', display_name: 'Bobert'}` style for ever field that references a user.
https://github.com/mozilla/kitsune/pull/2305
Comment 3•10 years ago
|
||
Will this work for the solver_id as well and give the username instead of the id?
Assignee | ||
Comment 4•10 years ago
|
||
I'll make a pass to make sure that users aren't referenced by id in output or in filtering. You should be able to use queries like /api/2/question/?solver=mythmon. If it isn't working like that today, that's a bug.
Comment 5•10 years ago
|
||
metadata currently shows {"name":"solver_id","value":"997124"} if the thread is solved ("is_solved":true and "solution": not null)
It would be nice if this could be the username
Assignee | ||
Comment 6•10 years ago
|
||
a) Those fields shouldn't be in metadata, but should be full fledged fields of their own.
b) You're right. And in fact a commit I have written by haven't deployed yet turns solver into an object that has username and display_name.
Comment 7•10 years ago
|
||
Deployed to prod:
https://github.com/mozilla/kitsune/commit/c3dc6db867ecc25a86104d089cbb848afab1c783
https://github.com/mozilla/kitsune/commit/1a08263c9ebdfa44bc6b39d6f5118d1c75bf66e1
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•