We had a situation where we wanted to import members from multiple groups so as we can have members of all those groups into one unified group which will reduce manual members adding process. For this problem we came up with a solution; we designed an app called Import Members which will import members from other groups.
Add-on provides following features:
1) Migrating memberships from multiple groups to one.
As the member from source groups should be a member in target group
2) Associate selected stream(s) of members with the new group.
To get the updates.
How the app works?
The scope of this app is restricted to groups and it will appear under action tab.
The app shall be opened into the group which should be target group in which user wants to merge the other groups.
Steps followed to perform the same operation:
1.Click on Import Members from group's action section, it will open an app in popup as below
2.Select the source groups from the place picker that will be invoked once you click on 'Select Source Group(s)'.
User can select upto 10 groups to be merged into one.
3. Select the stream(s) which you want members to associate with the new group.
In our app Email Watches is the custom stream which is used for getting email notifications for activities.
You will find some more examples of custom streams here : Examples of Custom Streams
4. Submit the import request.
Once process is submitted user gets notification about report of the process.
Whenever the process is done, the user is sent all report in email. (which might take some time depending on number of members to import)
Once user click on 'Submit request' we do request to node server to process the request:
In app.xml we have added a jive connects api setting to call the service in above file.
as you could see; we have used custom service named importService as a middleware for request and response to the app.
code snippet from server side:
Only superAdmins and groupAdmins will have access to this app.
We have added logger to log all the operations which includes: operation done, group name, successIds, failureIds, User Id, Time etc
As part of the merge operation, the target group will have all the content type enabled.
Please find the code under :GitHub - ThoughtWorksInc/import-members licensed under AGPL.
For getting started with Jive node sdk: Getting Started with the Jive Node SDK