-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a Concept of a Team #28
Comments
There already is a concept of a 'team' in Advocated. We have a 'teams' database which contains documents like this:
We currently have two teams. IBM Analytics and Bluemix, corresponding to the two Slack accounts that use this service. We can use this concept of 'teams' to divide totals between users who belong to these groups. But I suspect you are looking for a different grouping of people. For instance, even in our own Slack group we may want to create a grouping of users that reflects the CDS Developer Advocates, for instance. To avoid clashes with nomenclature here, if we call this new grouping of users 'group', for example, then we could make a sure that all the CDS Dev Advocates have a What do you think @bradley-holt ? |
@glynnbird Works for me! I agree that "group" would be better to avoid confusion with the existing concept of "team." As you mentioned, we will want to have multiple groups per Slack team. We may even want to have people in different Slack teams be in the same group (unlikely, but possible). So, these should be independent concepts. |
cool! Thanks for the clarification |
The v2 of Advocated does have teams (in terms of Slack domains) but not groups as discussed above. It's actually really hard to do. First of all the user data isn't replicated to the mobile device anymore: it used to be in the same database as the events/blogs etc but now it's in the "envoyusers" database. So although I could add a It might be best to tackle groups at "report time". If we know that X users represent a group, we can get totals of, say, expenditure for "where userid in X". This isn't a query that Cloudant does well: Cloudant Query doesn't have aggregation and a mapreduce view doesn't help. We can, however, create custom MapReduce functions like this: map = function(doc) {
var users= ['bradley','glynn','matt'];
if (user.indexOf(doc.userid) >=-1 ) {
// emit stuff
}
} It's a bit of a hack but it gives us reports and keeps the logic "server side" :) |
Create a concept of a "team" (
team
field) to which each user will be attached. Each user needs to only belong to one team. Users may not add or remove themselves from teams. Only system administrators can edit who is in a team. Perhaps for now this is by way of directly editing the database?The text was updated successfully, but these errors were encountered: