{"action":"created","issue":{"url":"https://api.github.com/repos/socialappslab/appcivist-platform/issues/362","repository_url":"https://api.github.com/repos/socialappslab/appcivist-platform","labels_url":"https://api.github.com/repos/socialappslab/appcivist-platform/issues/362/labels{/name}","comments_url":"https://api.github.com/repos/socialappslab/appcivist-platform/issues/362/comments","events_url":"https://api.github.com/repos/socialappslab/appcivist-platform/issues/362/events","html_url":"https://github.com/socialappslab/appcivist-platform/issues/362","id":210253308,"number":362,"title":"Add support for active and archived ballots in campaign ","user":{"login":"cdparra","id":630150,"avatar_url":"https://avatars1.githubusercontent.com/u/630150?v=3","gravatar_id":"","url":"https://api.github.com/users/cdparra","html_url":"https://github.com/cdparra","followers_url":"https://api.github.com/users/cdparra/followers","following_url":"https://api.github.com/users/cdparra/following{/other_user}","gists_url":"https://api.github.com/users/cdparra/gists{/gist_id}","starred_url":"https://api.github.com/users/cdparra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdparra/subscriptions","organizations_url":"https://api.github.com/users/cdparra/orgs","repos_url":"https://api.github.com/users/cdparra/repos","events_url":"https://api.github.com/users/cdparra/events{/privacy}","received_events_url":"https://api.github.com/users/cdparra/received_events","type":"User","site_admin":false},"labels":[{"id":541955843,"url":"https://api.github.com/repos/socialappslab/appcivist-platform/labels/generic","name":"generic","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":{"login":"javierpf","id":740238,"avatar_url":"https://avatars3.githubusercontent.com/u/740238?v=3","gravatar_id":"","url":"https://api.github.com/users/javierpf","html_url":"https://github.com/javierpf","followers_url":"https://api.github.com/users/javierpf/followers","following_url":"https://api.github.com/users/javierpf/following{/other_user}","gists_url":"https://api.github.com/users/javierpf/gists{/gist_id}","starred_url":"https://api.github.com/users/javierpf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javierpf/subscriptions","organizations_url":"https://api.github.com/users/javierpf/orgs","repos_url":"https://api.github.com/users/javierpf/repos","events_url":"https://api.github.com/users/javierpf/events{/privacy}","received_events_url":"https://api.github.com/users/javierpf/received_events","type":"User","site_admin":false},"assignees":[{"login":"javierpf","id":740238,"avatar_url":"https://avatars3.githubusercontent.com/u/740238?v=3","gravatar_id":"","url":"https://api.github.com/users/javierpf","html_url":"https://github.com/javierpf","followers_url":"https://api.github.com/users/javierpf/followers","following_url":"https://api.github.com/users/javierpf/following{/other_user}","gists_url":"https://api.github.com/users/javierpf/gists{/gist_id}","starred_url":"https://api.github.com/users/javierpf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javierpf/subscriptions","organizations_url":"https://api.github.com/users/javierpf/orgs","repos_url":"https://api.github.com/users/javierpf/repos","events_url":"https://api.github.com/users/javierpf/events{/privacy}","received_events_url":"https://api.github.com/users/javierpf/received_events","type":"User","site_admin":false},{"login":"jruax56","id":4049516,"avatar_url":"https://avatars3.githubusercontent.com/u/4049516?v=3","gravatar_id":"","url":"https://api.github.com/users/jruax56","html_url":"https://github.com/jruax56","followers_url":"https://api.github.com/users/jruax56/followers","following_url":"https://api.github.com/users/jruax56/following{/other_user}","gists_url":"https://api.github.com/users/jruax56/gists{/gist_id}","starred_url":"https://api.github.com/users/jruax56/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jruax56/subscriptions","organizations_url":"https://api.github.com/users/jruax56/orgs","repos_url":"https://api.github.com/users/jruax56/repos","events_url":"https://api.github.com/users/jruax56/events{/privacy}","received_events_url":"https://api.github.com/users/jruax56/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/socialappslab/appcivist-platform/milestones/37","html_url":"https://github.com/socialappslab/appcivist-platform/milestone/37","labels_url":"https://api.github.com/repos/socialappslab/appcivist-platform/milestones/37/labels","id":2306460,"number":37,"title":"201703 Sprint 4","description":"","creator":{"login":"cdparra","id":630150,"avatar_url":"https://avatars1.githubusercontent.com/u/630150?v=3","gravatar_id":"","url":"https://api.github.com/users/cdparra","html_url":"https://github.com/cdparra","followers_url":"https://api.github.com/users/cdparra/followers","following_url":"https://api.github.com/users/cdparra/following{/other_user}","gists_url":"https://api.github.com/users/cdparra/gists{/gist_id}","starred_url":"https://api.github.com/users/cdparra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdparra/subscriptions","organizations_url":"https://api.github.com/users/cdparra/orgs","repos_url":"https://api.github.com/users/cdparra/repos","events_url":"https://api.github.com/users/cdparra/events{/privacy}","received_events_url":"https://api.github.com/users/cdparra/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":2,"state":"open","created_at":"2017-02-07T18:00:17Z","updated_at":"2017-03-29T14:41:38Z","due_on":"2017-03-29T07:00:00Z","closed_at":null},"comments":0,"created_at":"2017-02-25T18:44:59Z","updated_at":"2017-03-29T16:52:18Z","closed_at":null,"body":"Add endpoints to create new Ballots in a campaign, archived currently active ballots and list active/archived ballots. As examples, see the Working Group create/archive ballot endpoints: \r\n\r\n`POST      /api/assembly/:aid/group/:gid/ballot controllers.WorkingGroups.nextBallotForWorkingGroup(aid: Long, gid: Long)`\r\n`PUT       /api/assembly/:aid/group/:gid/ballot controllers.WorkingGroups.archiveWorkingGroupsBallot(aid: Long, gid: Long)`\r\n\r\nTo make this possible, let's create the following endpoints (which will make it possible to create ballots not only on campaigns, but on other entities two: \r\n\r\n- [x] (both in appcivist-voting-api and appcivist-platform) Add the entity type (as a String) to the model of Ballot  \r\n- [ ]  `POST      /api/space/:rsid/ballot` => should create a new ballot in the resource space with id `:rsid` (e.g., the resource space of a campaign). The endpoint should allow apps to specify which entities in that resource space are included in the ballot by specifying the type of entity (e.g., CONTRIBUTION_PROPOSAL, CONTRIBUTION_IDEA, CONTRIBUTION_NOTE, CONTRIBUTION_DISCUSSION, CONTRIBUTION_COMMENT, CONTRIBUTION_NOTE, WORKING_GROUP, APPCIVIST_USER) and a list of UUIDs that identify those entities. If neither is specified, the default is to include all contributions of type PROPOSAL with status PUBLISHED. \r\n- [ ]  `PUT      /api/space/:cid/ballot` => should update the ballot and can be used to archive it (change status of the ballot from active to archived). Whenever a ballot changes from active to archived, we should update the history of archived ballots. \r\n- [x] `GET /api/space/:cid/ballot?status='x'&starts_at=xxx&ends_at=yyy` => should list ballots with status = x, and with start/end dates in the range specified by xxx and yyy (if these are not specified, don't filter by date \r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/socialappslab/appcivist-platform/issues/comments/290152155","html_url":"https://github.com/socialappslab/appcivist-platform/issues/362#issuecomment-290152155","issue_url":"https://api.github.com/repos/socialappslab/appcivist-platform/issues/362","id":290152155,"user":{"login":"javierpf","id":740238,"avatar_url":"https://avatars3.githubusercontent.com/u/740238?v=3","gravatar_id":"","url":"https://api.github.com/users/javierpf","html_url":"https://github.com/javierpf","followers_url":"https://api.github.com/users/javierpf/followers","following_url":"https://api.github.com/users/javierpf/following{/other_user}","gists_url":"https://api.github.com/users/javierpf/gists{/gist_id}","starred_url":"https://api.github.com/users/javierpf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javierpf/subscriptions","organizations_url":"https://api.github.com/users/javierpf/orgs","repos_url":"https://api.github.com/users/javierpf/repos","events_url":"https://api.github.com/users/javierpf/events{/privacy}","received_events_url":"https://api.github.com/users/javierpf/received_events","type":"User","site_admin":false},"created_at":"2017-03-29T16:52:18Z","updated_at":"2017-03-29T16:52:18Z","body":"I found this in the current implementation for creating new ballots for a working group. Should this implementation remain in the cases where the resource space belongs to a working group?\r\nif (workingGroup.getBlockMajority()) {\r\n\t\t\tballotConfig.setValue(\"YES/NO/ABSTAIN/BLOCK\");\r\n\t\t\tballotConfig.save();\r\n\t\t\tballotConfig = new BallotConfiguration();\r\n\t\t\tballotConfig.setBallotId(consensusBallot.getId());\r\n\t\t\tballotConfig\r\n\t\t\t\t\t.setKey(GlobalData.CONFIG_COMPONENT_VOTING_SYSTEM_PLURALITY_BLOCK_THRESHOLD);\r\n\t\t\tballotConfig\r\n\t\t\t\t\t.setValue(workingGroup.getMajorityThreshold() != null ? workingGroup\r\n\t\t\t\t\t\t\t.getMajorityThreshold() : \"SIMPLE\");\r\n\t\t\tballotConfig.save();\r\n\t\t} else {\r\n\t\t\tballotConfig.setValue(\"YES/NO/ABSTAIN\");\r\n\t\t\tballotConfig.save();\r\n\t\t}"}}
{"actor":{"display_login":"javierpf"}}