You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whimsical.apache.org by sebb <se...@gmail.com> on 2017/07/16 16:05:26 UTC

Bug in roster/models/committer.rb

https://github.com/apache/whimsy/blob/master/www/roster/models/committer.rb#L65

purports to get the list of committee names using ASF::Committee.list.map(&:id)
However ASF::Committee.list only returns LDAP committees.

Not sure how to fix that.

The code also needs to take projects/members into account for the
response[:committer] array

Re: Bug in roster/models/committer.rb

Posted by sebb <se...@gmail.com>.
On 16 July 2017 at 17:12, Sam Ruby <ru...@intertwingly.net> wrote:
> On Sun, Jul 16, 2017 at 12:05 PM, sebb <se...@gmail.com> wrote:
>> https://github.com/apache/whimsy/blob/master/www/roster/models/committer.rb#L65
>>
>> purports to get the list of committee names using ASF::Committee.list.map(&:id)
>> However ASF::Committee.list only returns LDAP committees.
>>
>> Not sure how to fix that.
>
> ASF::Committee.pmcs returns committee-info.txt PMCs.

OK, thanks.

>> The code also needs to take projects/members into account for the
>> response[:committer] array
>
> Perhaps we need a person.projects?

There's already a Person.projects() which can be used as follows:

person.projects.select{|prj| prj.members.include? person}.map(&:name)

But I agree the model currently knows too much about how LDAP is
structured; it should just be able to ask the Person what memberships
they have.

Given a Person, one should be able to get details of the various
things (s)he is a member of or has:
- PMCs (CI)
- Committee karma
- Committer karma
- Groups (non PMC)
- etc.

Ideally using unambiguous names, which is likely to be tricky...

> - Sam Ruby

Re: Bug in roster/models/committer.rb

Posted by Sam Ruby <ru...@intertwingly.net>.
On Sun, Jul 16, 2017 at 12:05 PM, sebb <se...@gmail.com> wrote:
> https://github.com/apache/whimsy/blob/master/www/roster/models/committer.rb#L65
>
> purports to get the list of committee names using ASF::Committee.list.map(&:id)
> However ASF::Committee.list only returns LDAP committees.
>
> Not sure how to fix that.

ASF::Committee.pmcs returns committee-info.txt PMCs.

> The code also needs to take projects/members into account for the
> response[:committer] array

Perhaps we need a person.projects?

- Sam Ruby