Project

General

Profile

Bug #3256

Usergroup members missing when showing a usergroup

Added by Jan Orel over 5 years ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
API
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

GET api/usergroups/2 gives:

'{ "usergroup": { "updated_at": "2013-10-15T12:24:10Z",
"created_at": "2013-10-11T14:34:19Z",
"name": "abc",
"id": 2}}'

I am missing member ids there.

Also documentation is missing while updating usergroup user (adding a "user_ids" attribute to the hash when you update the group)

Associated revisions

Revision af452a6f (diff)
Added by Jan Orel over 5 years ago

fixes #3256 - include members in usergroup show

Revision 503d3add (diff)
Added by Jan Orel over 5 years ago

fixes #3256 - include members in usergroup show

(cherry picked from commit af452a6fdf01582f2c904c10b3c84ffcfe3b93f9)

History

#1 Updated by Jan Orel over 5 years ago

My naive patch:

diff --git a/app/views/api/v1/usergroups/show.json.rabl b/app/views/api/v1/usergroups/show.json.rabl
index 770384f..176ccc2 100644
--- a/app/views/api/v1/usergroups/show.json.rabl
+++ b/app/views/api/v1/usergroups/show.json.rabl
@@ -1,3 +1,7 @@
 object @usergroup

-attributes :name, :id, :created_at, :updated_at
\ No newline at end of file
+attributes :name, :id, :created_at, :updated_at
+
+child :usergroup_members do
+  attributes :member_id, :value
+end

#2 Updated by Ohad Levy over 5 years ago

Please send it as a PR.. Thanks!

#4 Updated by Dominic Cleal over 5 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 1.15.0
  • Legacy Backlogs Release (now unused) set to 1

#5 Updated by Anonymous over 5 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF