Refactor duplicate fields for the user's last activity in /rest/user endpoint
Categories
(bugzilla.mozilla.org :: API, task)
Tracking
()
People
(Reporter: suhaib, Assigned: dkl)
References
Details
Attachments
(1 file)
I found that there are duplicate fields for the user's last activity:
-
last_activity(undocumented): https://github.com/mozilla-bteam/bmo/blob/2bc570fe52aafa1eb45441fa55aef657bed461cc/extensions/UserProfile/Extension.pm#L269-L278 -
last_activity_time(documented): https://github.com/mozilla-bteam/bmo/blob/2bc570fe52aafa1eb45441fa55aef657bed461cc/Bugzilla/WebService/User.pm#L309
The last_activity field has the same situation as in bug 1787954 where it does not show up if you request the field without including the id field (e.g., include_fields=last_activity). However, if you request the id field alone (e.g., include_fields=id), the last_activity field will always show up (without even including it).
If we do not want to drop the last_activity to maintain backward compatibility. I think we could drop the last_activity implementation in Bugzilla::Extension::UserProfile and make last_activity as an alias to last_activity_time.
| Reporter | ||
Updated•3 years ago
|
| Assignee | ||
Comment 1•3 years ago
|
||
There is definitely a duplication here and will fix. The ids issue will be resolved by bug 1787954.
| Assignee | ||
Comment 2•3 years ago
|
||
| Assignee | ||
Comment 3•3 years ago
|
||
Description
•