Can I work on this bug?
Hi Yogest, Thanks for offering to contribute! Yes this bug is open for you to take over. Some django / orm / database skills are required to fix this. Please go ahead and setup your environment following the instructions here http://mozillians.rtfd.org/ and when you're ready comment here so I can assign the bug to you. Thanks!
Assignee: nobody → yogesh.kamble
I set up local environment. You are saying,skills which are listed in "Skills members have in common:" on group page should list common skills among group. For Example: Member1: python, jquery, mongodb Member2: python, Mysql, Java Member3: C, Jquery Member4: Python, Mysql, Django Member5: C#, jquery, C++ In this case what should be the excepted result in "Skills members have in common:"?
Result should be: jquery python mysql c c# c++ django java mongo Please note that skills are all lowercase.
In terms of mysql I need to run following query """ select gr.name, skill.name, count(skill.name) from groups_group as gr inner join groups_groupmembership as member on member.group_id = gr.id inner join profile_skills as pro_sk on pro_sk.userprofile_id = member.userprofile_id inner join profile as pro on pro.id = member.userprofile_id inner join auth_user as user on user.id = pro.user_id inner join groups_skill as skill on skill.id = pro_sk.skill_id where gr.url="python-group" group by skill.name order by count(skill.name) desc,skill.name; """ I will create ORM query for above one and will add in "show" method in groups/views.py. please correct me if I am wrong. this is my first bug.
Sample result of query in above comment is """ +--------------+---------+-------------------+ | name | name | count(skill.name) | +--------------+---------+-------------------+ | python group | jquery | 2 | | python group | python | 2 | | python group | c | 1 | | python group | java | 1 | | python group | mongodb | 1 | | python group | mysql | 1 | +--------------+---------+-------------------+ 6 rows in set (0.00 sec) """
ORM query """ skills = (Skill.objects .filter(members__in=group.members.all()) .annotate(skill_count=Count('name')) .order_by('-skill_count', 'name')) """
Yogesh thanks for working on this. Can you please submit a pull request with your changes, so we can review? Thanks!
Status: NEW → ASSIGNED
pull request sent https://github.com/mozilla/mozillians/pull/1043 please take a look at it.
What info I have to provide ?
Yogesh you don't have to provide any more info. We'll review your pull request as soon as possible, but please give us a few days because things are pretty busy atm.
I reviewed the pull request and added comments. We're getting there but it's not ready yet.
I will debug the code again and make necessary changes and will send pull request.
I updated the code. please have a look at the pull request https://github.com/mozilla/mozillians/pull/1043/files
Thanks for update yogesh. I don't believe that the new changes answer the comments in https://github.com/mozilla/mozillians/pull/1043#issuecomment-50768715 as I still get the same errors.
Commits pushed to master at https://github.com/mozilla/mozillians https://github.com/mozilla/mozillians/commit/13b49b624aea2f1bb6c056e37d76a4eeaf91dff7 [fix bug 1030673] List common skills among group members. https://github.com/mozilla/mozillians/commit/535675eee3812b15133af5cd956d4c6d2376fb47 Merge pull request #1088 from akatsoulas/1030673 [fix bug 1030673] List common skills among group members.
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Cannot verify that on stage: For this  group "django" skill should be listed after "html5" since "django" skill has more members among the "a miserable little pile of secrets" compared to eg. homebrewing (django 2 members, homebrewing 1 member).  https://mozillians.allizom.org/en-US/group/a-misrable-little-pile-of-secrets/
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Commits pushed to master at https://github.com/mozilla/mozillians https://github.com/mozilla/mozillians/commit/ecac07c57ec5fe58c14a56c5850392a0ead2e74e [fix bug 1030673] Fix common skills calculation for each group. https://github.com/mozilla/mozillians/commit/eb3593059a204a507b56ab26fdac2b171984a512 Merge pull request #1093 from akatsoulas/1030673 [fix bug 1030673] Fix common skills calculation for each group.
Status: REOPENED → RESOLVED
Last Resolved: 4 years ago → 4 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.