{"action":"created","comment":{"url":"https://api.github.com/repos/sigmah-dev/sigmah/pulls/comments/72637773","id":72637773,"diff_hunk":"@@ -0,0 +1,102 @@\n+package org.sigmah.server.handler;\n+\n+/*\n+ * #%L\n+ * Sigmah\n+ * %%\n+ * Copyright (C) 2010 - 2016 URD\n+ * %%\n+ * This program is free software: you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as\n+ * published by the Free Software Foundation, either version 3 of the\n+ * License, or (at your option) any later version.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public\n+ * License along with this program.  If not, see\n+ * <http://www.gnu.org/licenses/gpl-3.0.html>.\n+ * #L%\n+ */\n+\n+import com.google.inject.persist.Transactional;\n+\n+import java.util.ArrayList;\n+import java.util.HashSet;\n+import java.util.List;\n+import java.util.Set;\n+\n+import javax.inject.Inject;\n+\n+import org.sigmah.server.dao.ProfileDAO;\n+import org.sigmah.server.dao.ProjectDAO;\n+import org.sigmah.server.dao.UserDAO;\n+import org.sigmah.server.dispatch.impl.UserDispatch;\n+import org.sigmah.server.domain.Project;\n+import org.sigmah.server.domain.User;\n+import org.sigmah.server.domain.profile.Profile;\n+import org.sigmah.server.handler.base.AbstractCommandHandler;\n+import org.sigmah.shared.command.UpdateProjectTeamMembers;\n+import org.sigmah.shared.command.result.TeamMembersResult;\n+import org.sigmah.shared.dispatch.CommandException;\n+import org.sigmah.shared.dto.UserDTO;\n+import org.sigmah.shared.dto.profile.ProfileDTO;\n+\n+public class UpdateProjectTeamMembersHandler extends AbstractCommandHandler<UpdateProjectTeamMembers, TeamMembersResult> {\n+\tprivate final ProfileDAO profileDAO;\n+\tprivate final ProjectDAO projectDAO;\n+\tprivate final UserDAO userDAO;\n+\n+\t@Inject\n+\tUpdateProjectTeamMembersHandler(ProfileDAO profileDAO, ProjectDAO projectDAO, UserDAO userDAO) {\n+\t\tthis.profileDAO = profileDAO;\n+\t\tthis.projectDAO = projectDAO;\n+\t\tthis.userDAO = userDAO;\n+\t}\n+\n+\t@Override\n+\t@Transactional\n+\tprotected TeamMembersResult execute(UpdateProjectTeamMembers command, UserDispatch.UserExecutionContext context) throws CommandException {\n+\t\t// TODO: Verify if the user is allowed to update team members\n+\t\tProject project = projectDAO.findById(command.getProjectId());\n+\t\tSet<Integer> teamMemberIds = new HashSet<>();\n+\t\tSet<Integer> teamMemberProfileIds = new HashSet<>();\n+\n+\t\t// TODO: Verify that the users are related to the org unit of the project","path":"src/main/java/org/sigmah/server/handler/UpdateProjectTeamMembersHandler.java","position":68,"original_position":68,"commit_id":"c510ee544f7de9d45d69d69f1dc44839bc417c84","original_commit_id":"c510ee544f7de9d45d69d69f1dc44839bc417c84","user":{"login":"numero-six","id":10960008,"avatar_url":"https://avatars.githubusercontent.com/u/10960008?v=3","gravatar_id":"","url":"https://api.github.com/users/numero-six","html_url":"https://github.com/numero-six","followers_url":"https://api.github.com/users/numero-six/followers","following_url":"https://api.github.com/users/numero-six/following{/other_user}","gists_url":"https://api.github.com/users/numero-six/gists{/gist_id}","starred_url":"https://api.github.com/users/numero-six/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numero-six/subscriptions","organizations_url":"https://api.github.com/users/numero-six/orgs","repos_url":"https://api.github.com/users/numero-six/repos","events_url":"https://api.github.com/users/numero-six/events{/privacy}","received_events_url":"https://api.github.com/users/numero-six/received_events","type":"User","site_admin":false},"body":"those 2 `TODO`s should be done or removed.","created_at":"2016-07-28T14:53:26Z","updated_at":"2016-07-28T14:53:26Z","html_url":"https://github.com/sigmah-dev/sigmah/pull/23#discussion_r72637773","pull_request_url":"https://api.github.com/repos/sigmah-dev/sigmah/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/sigmah-dev/sigmah/pulls/comments/72637773"},"html":{"href":"https://github.com/sigmah-dev/sigmah/pull/23#discussion_r72637773"},"pull_request":{"href":"https://api.github.com/repos/sigmah-dev/sigmah/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/sigmah-dev/sigmah/pulls/23","id":71072544,"html_url":"https://github.com/sigmah-dev/sigmah/pull/23","diff_url":"https://github.com/sigmah-dev/sigmah/pull/23.diff","patch_url":"https://github.com/sigmah-dev/sigmah/pull/23.patch","issue_url":"https://api.github.com/repos/sigmah-dev/sigmah/issues/23","number":23,"state":"open","locked":false,"title":"First sprint from AtolCD","user":{"login":"ftavin","id":15834125,"avatar_url":"https://avatars.githubusercontent.com/u/15834125?v=3","gravatar_id":"","url":"https://api.github.com/users/ftavin","html_url":"https://github.com/ftavin","followers_url":"https://api.github.com/users/ftavin/followers","following_url":"https://api.github.com/users/ftavin/following{/other_user}","gists_url":"https://api.github.com/users/ftavin/gists{/gist_id}","starred_url":"https://api.github.com/users/ftavin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ftavin/subscriptions","organizations_url":"https://api.github.com/users/ftavin/orgs","repos_url":"https://api.github.com/users/ftavin/repos","events_url":"https://api.github.com/users/ftavin/events{/privacy}","received_events_url":"https://api.github.com/users/ftavin/received_events","type":"User","site_admin":false},"body":"Mantis issues:\r\n- adding team members (#620)\r\n- adding secondary OrgUnits (#243)\r\n- adding framework in db (#106)\r\n\r\nTools for devs:\r\n- adding docker-compose.yml file\r\n- removal of unuseful permutations during maven compilation with sigmah-dev profile\r\n","created_at":"2016-05-23T14:41:42Z","updated_at":"2016-07-28T14:53:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1b540ba214da7ad118407051196ed27d62ab1fa","assignee":{"login":"numero-six","id":10960008,"avatar_url":"https://avatars.githubusercontent.com/u/10960008?v=3","gravatar_id":"","url":"https://api.github.com/users/numero-six","html_url":"https://github.com/numero-six","followers_url":"https://api.github.com/users/numero-six/followers","following_url":"https://api.github.com/users/numero-six/following{/other_user}","gists_url":"https://api.github.com/users/numero-six/gists{/gist_id}","starred_url":"https://api.github.com/users/numero-six/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numero-six/subscriptions","organizations_url":"https://api.github.com/users/numero-six/orgs","repos_url":"https://api.github.com/users/numero-six/repos","events_url":"https://api.github.com/users/numero-six/events{/privacy}","received_events_url":"https://api.github.com/users/numero-six/received_events","type":"User","site_admin":false},"assignees":[{"login":"numero-six","id":10960008,"avatar_url":"https://avatars.githubusercontent.com/u/10960008?v=3","gravatar_id":"","url":"https://api.github.com/users/numero-six","html_url":"https://github.com/numero-six","followers_url":"https://api.github.com/users/numero-six/followers","following_url":"https://api.github.com/users/numero-six/following{/other_user}","gists_url":"https://api.github.com/users/numero-six/gists{/gist_id}","starred_url":"https://api.github.com/users/numero-six/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numero-six/subscriptions","organizations_url":"https://api.github.com/users/numero-six/orgs","repos_url":"https://api.github.com/users/numero-six/repos","events_url":"https://api.github.com/users/numero-six/events{/privacy}","received_events_url":"https://api.github.com/users/numero-six/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/sigmah-dev/sigmah/pulls/23/commits","review_comments_url":"https://api.github.com/repos/sigmah-dev/sigmah/pulls/23/comments","review_comment_url":"https://api.github.com/repos/sigmah-dev/sigmah/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sigmah-dev/sigmah/issues/23/comments","statuses_url":"https://api.github.com/repos/sigmah-dev/sigmah/statuses/c510ee544f7de9d45d69d69f1dc44839bc417c84","head":{"label":"atolcd:tranche1-atol","ref":"tranche1-atol","sha":"c510ee544f7de9d45d69d69f1dc44839bc417c84","user":{"login":"atolcd","id":1773101,"avatar_url":"https://avatars.githubusercontent.com/u/1773101?v=3","gravatar_id":"","url":"https://api.github.com/users/atolcd","html_url":"https://github.com/atolcd","followers_url":"https://api.github.com/users/atolcd/followers","following_url":"https://api.github.com/users/atolcd/following{/other_user}","gists_url":"https://api.github.com/users/atolcd/gists{/gist_id}","starred_url":"https://api.github.com/users/atolcd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atolcd/subscriptions","organizations_url":"https://api.github.com/users/atolcd/orgs","repos_url":"https://api.github.com/users/atolcd/repos","events_url":"https://api.github.com/users/atolcd/events{/privacy}","received_events_url":"https://api.github.com/users/atolcd/received_events","type":"Organization","site_admin":false},"repo":{"id":59489139,"name":"urd-sigmah","full_name":"atolcd/urd-sigmah","owner":{"login":"atolcd","id":1773101,"avatar_url":"https://avatars.githubusercontent.com/u/1773101?v=3","gravatar_id":"","url":"https://api.github.com/users/atolcd","html_url":"https://github.com/atolcd","followers_url":"https://api.github.com/users/atolcd/followers","following_url":"https://api.github.com/users/atolcd/following{/other_user}","gists_url":"https://api.github.com/users/atolcd/gists{/gist_id}","starred_url":"https://api.github.com/users/atolcd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atolcd/subscriptions","organizations_url":"https://api.github.com/users/atolcd/orgs","repos_url":"https://api.github.com/users/atolcd/repos","events_url":"https://api.github.com/users/atolcd/events{/privacy}","received_events_url":"https://api.github.com/users/atolcd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atolcd/urd-sigmah","description":"Open source project management software for the international aid sector","fork":true,"url":"https://api.github.com/repos/atolcd/urd-sigmah","forks_url":"https://api.github.com/repos/atolcd/urd-sigmah/forks","keys_url":"https://api.github.com/repos/atolcd/urd-sigmah/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atolcd/urd-sigmah/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atolcd/urd-sigmah/teams","hooks_url":"https://api.github.com/repos/atolcd/urd-sigmah/hooks","issue_events_url":"https://api.github.com/repos/atolcd/urd-sigmah/issues/events{/number}","events_url":"https://api.github.com/repos/atolcd/urd-sigmah/events","assignees_url":"https://api.github.com/repos/atolcd/urd-sigmah/assignees{/user}","branches_url":"https://api.github.com/repos/atolcd/urd-sigmah/branches{/branch}","tags_url":"https://api.github.com/repos/atolcd/urd-sigmah/tags","blobs_url":"https://api.github.com/repos/atolcd/urd-sigmah/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atolcd/urd-sigmah/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atolcd/urd-sigmah/git/refs{/sha}","trees_url":"https://api.github.com/repos/atolcd/urd-sigmah/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atolcd/urd-sigmah/statuses/{sha}","languages_url":"https://api.github.com/repos/atolcd/urd-sigmah/languages","stargazers_url":"https://api.github.com/repos/atolcd/urd-sigmah/stargazers","contributors_url":"https://api.github.com/repos/atolcd/urd-sigmah/contributors","subscribers_url":"https://api.github.com/repos/atolcd/urd-sigmah/subscribers","subscription_url":"https://api.github.com/repos/atolcd/urd-sigmah/subscription","commits_url":"https://api.github.com/repos/atolcd/urd-sigmah/commits{/sha}","git_commits_url":"https://api.github.com/repos/atolcd/urd-sigmah/git/commits{/sha}","comments_url":"https://api.github.com/repos/atolcd/urd-sigmah/comments{/number}","issue_comment_url":"https://api.github.com/repos/atolcd/urd-sigmah/issues/comments{/number}","contents_url":"https://api.github.com/repos/atolcd/urd-sigmah/contents/{+path}","compare_url":"https://api.github.com/repos/atolcd/urd-sigmah/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atolcd/urd-sigmah/merges","archive_url":"https://api.github.com/repos/atolcd/urd-sigmah/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atolcd/urd-sigmah/downloads","issues_url":"https://api.github.com/repos/atolcd/urd-sigmah/issues{/number}","pulls_url":"https://api.github.com/repos/atolcd/urd-sigmah/pulls{/number}","milestones_url":"https://api.github.com/repos/atolcd/urd-sigmah/milestones{/number}","notifications_url":"https://api.github.com/repos/atolcd/urd-sigmah/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atolcd/urd-sigmah/labels{/name}","releases_url":"https://api.github.com/repos/atolcd/urd-sigmah/releases{/id}","deployments_url":"https://api.github.com/repos/atolcd/urd-sigmah/deployments","created_at":"2016-05-23T14:22:22Z","updated_at":"2016-05-23T14:24:40Z","pushed_at":"2016-06-27T08:03:17Z","git_url":"git://github.com/atolcd/urd-sigmah.git","ssh_url":"git@github.com:atolcd/urd-sigmah.git","clone_url":"https://github.com/atolcd/urd-sigmah.git","svn_url":"https://github.com/atolcd/urd-sigmah","homepage":"http://www.sigmah.org","size":29783,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sigmah-dev:master","ref":"master","sha":"4043e0493f776b2698bb67e5718fd7b7f257240a","user":{"login":"sigmah-dev","id":6734961,"avatar_url":"https://avatars.githubusercontent.com/u/6734961?v=3","gravatar_id":"","url":"https://api.github.com/users/sigmah-dev","html_url":"https://github.com/sigmah-dev","followers_url":"https://api.github.com/users/sigmah-dev/followers","following_url":"https://api.github.com/users/sigmah-dev/following{/other_user}","gists_url":"https://api.github.com/users/sigmah-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/sigmah-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sigmah-dev/subscriptions","organizations_url":"https://api.github.com/users/sigmah-dev/orgs","repos_url":"https://api.github.com/users/sigmah-dev/repos","events_url":"https://api.github.com/users/sigmah-dev/events{/privacy}","received_events_url":"https://api.github.com/users/sigmah-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":18803079,"name":"sigmah","full_name":"sigmah-dev/sigmah","owner":{"login":"sigmah-dev","id":6734961,"avatar_url":"https://avatars.githubusercontent.com/u/6734961?v=3","gravatar_id":"","url":"https://api.github.com/users/sigmah-dev","html_url":"https://github.com/sigmah-dev","followers_url":"https://api.github.com/users/sigmah-dev/followers","following_url":"https://api.github.com/users/sigmah-dev/following{/other_user}","gists_url":"https://api.github.com/users/sigmah-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/sigmah-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sigmah-dev/subscriptions","organizations_url":"https://api.github.com/users/sigmah-dev/orgs","repos_url":"https://api.github.com/users/sigmah-dev/repos","events_url":"https://api.github.com/users/sigmah-dev/events{/privacy}","received_events_url":"https://api.github.com/users/sigmah-dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sigmah-dev/sigmah","description":"Open source project management software for the international aid sector","fork":false,"url":"https://api.github.com/repos/sigmah-dev/sigmah","forks_url":"https://api.github.com/repos/sigmah-dev/sigmah/forks","keys_url":"https://api.github.com/repos/sigmah-dev/sigmah/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sigmah-dev/sigmah/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sigmah-dev/sigmah/teams","hooks_url":"https://api.github.com/repos/sigmah-dev/sigmah/hooks","issue_events_url":"https://api.github.com/repos/sigmah-dev/sigmah/issues/events{/number}","events_url":"https://api.github.com/repos/sigmah-dev/sigmah/events","assignees_url":"https://api.github.com/repos/sigmah-dev/sigmah/assignees{/user}","branches_url":"https://api.github.com/repos/sigmah-dev/sigmah/branches{/branch}","tags_url":"https://api.github.com/repos/sigmah-dev/sigmah/tags","blobs_url":"https://api.github.com/repos/sigmah-dev/sigmah/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sigmah-dev/sigmah/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sigmah-dev/sigmah/git/refs{/sha}","trees_url":"https://api.github.com/repos/sigmah-dev/sigmah/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sigmah-dev/sigmah/statuses/{sha}","languages_url":"https://api.github.com/repos/sigmah-dev/sigmah/languages","stargazers_url":"https://api.github.com/repos/sigmah-dev/sigmah/stargazers","contributors_url":"https://api.github.com/repos/sigmah-dev/sigmah/contributors","subscribers_url":"https://api.github.com/repos/sigmah-dev/sigmah/subscribers","subscription_url":"https://api.github.com/repos/sigmah-dev/sigmah/subscription","commits_url":"https://api.github.com/repos/sigmah-dev/sigmah/commits{/sha}","git_commits_url":"https://api.github.com/repos/sigmah-dev/sigmah/git/commits{/sha}","comments_url":"https://api.github.com/repos/sigmah-dev/sigmah/comments{/number}","issue_comment_url":"https://api.github.com/repos/sigmah-dev/sigmah/issues/comments{/number}","contents_url":"https://api.github.com/repos/sigmah-dev/sigmah/contents/{+path}","compare_url":"https://api.github.com/repos/sigmah-dev/sigmah/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sigmah-dev/sigmah/merges","archive_url":"https://api.github.com/repos/sigmah-dev/sigmah/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sigmah-dev/sigmah/downloads","issues_url":"https://api.github.com/repos/sigmah-dev/sigmah/issues{/number}","pulls_url":"https://api.github.com/repos/sigmah-dev/sigmah/pulls{/number}","milestones_url":"https://api.github.com/repos/sigmah-dev/sigmah/milestones{/number}","notifications_url":"https://api.github.com/repos/sigmah-dev/sigmah/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sigmah-dev/sigmah/labels{/name}","releases_url":"https://api.github.com/repos/sigmah-dev/sigmah/releases{/id}","deployments_url":"https://api.github.com/repos/sigmah-dev/sigmah/deployments","created_at":"2014-04-15T14:29:34Z","updated_at":"2016-06-09T12:34:41Z","pushed_at":"2016-07-28T10:21:00Z","git_url":"git://github.com/sigmah-dev/sigmah.git","ssh_url":"git@github.com:sigmah-dev/sigmah.git","clone_url":"https://github.com/sigmah-dev/sigmah.git","svn_url":"https://github.com/sigmah-dev/sigmah","homepage":"http://www.sigmah.org","size":29826,"stargazers_count":14,"watchers_count":14,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":14,"forks":23,"open_issues":14,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sigmah-dev/sigmah/pulls/23"},"html":{"href":"https://github.com/sigmah-dev/sigmah/pull/23"},"issue":{"href":"https://api.github.com/repos/sigmah-dev/sigmah/issues/23"},"comments":{"href":"https://api.github.com/repos/sigmah-dev/sigmah/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/sigmah-dev/sigmah/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/sigmah-dev/sigmah/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sigmah-dev/sigmah/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/sigmah-dev/sigmah/statuses/c510ee544f7de9d45d69d69f1dc44839bc417c84"}}}}
{"actor":{"display_login":"numero-six"}}