{"action":"created","issue":{"url":"https://api.github.com/repos/unicef/etools-partner-reporting-portal/issues/466","repository_url":"https://api.github.com/repos/unicef/etools-partner-reporting-portal","labels_url":"https://api.github.com/repos/unicef/etools-partner-reporting-portal/issues/466/labels{/name}","comments_url":"https://api.github.com/repos/unicef/etools-partner-reporting-portal/issues/466/comments","events_url":"https://api.github.com/repos/unicef/etools-partner-reporting-portal/issues/466/events","html_url":"https://github.com/unicef/etools-partner-reporting-portal/issues/466","id":296568799,"number":466,"title":"Allow IMO to create/edit partner projects+activities.","user":{"login":"chachra","id":73096,"avatar_url":"https://avatars0.githubusercontent.com/u/73096?v=4","gravatar_id":"","url":"https://api.github.com/users/chachra","html_url":"https://github.com/chachra","followers_url":"https://api.github.com/users/chachra/followers","following_url":"https://api.github.com/users/chachra/following{/other_user}","gists_url":"https://api.github.com/users/chachra/gists{/gist_id}","starred_url":"https://api.github.com/users/chachra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chachra/subscriptions","organizations_url":"https://api.github.com/users/chachra/orgs","repos_url":"https://api.github.com/users/chachra/repos","events_url":"https://api.github.com/users/chachra/events{/privacy}","received_events_url":"https://api.github.com/users/chachra/received_events","type":"User","site_admin":false},"labels":[{"id":827889996,"url":"https://api.github.com/repos/unicef/etools-partner-reporting-portal/labels/Frontend","name":"Frontend","color":"d4c5f9","default":false},{"id":801505033,"url":"https://api.github.com/repos/unicef/etools-partner-reporting-portal/labels/change%20requests","name":"change requests","color":"f5d23d","default":false},{"id":805754227,"url":"https://api.github.com/repos/unicef/etools-partner-reporting-portal/labels/cluster%20reporting","name":"cluster reporting","color":"0e8a16","default":false},{"id":567035322,"url":"https://api.github.com/repos/unicef/etools-partner-reporting-portal/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"state":"open","locked":false,"assignee":{"login":"n1207n","id":3138217,"avatar_url":"https://avatars0.githubusercontent.com/u/3138217?v=4","gravatar_id":"","url":"https://api.github.com/users/n1207n","html_url":"https://github.com/n1207n","followers_url":"https://api.github.com/users/n1207n/followers","following_url":"https://api.github.com/users/n1207n/following{/other_user}","gists_url":"https://api.github.com/users/n1207n/gists{/gist_id}","starred_url":"https://api.github.com/users/n1207n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n1207n/subscriptions","organizations_url":"https://api.github.com/users/n1207n/orgs","repos_url":"https://api.github.com/users/n1207n/repos","events_url":"https://api.github.com/users/n1207n/events{/privacy}","received_events_url":"https://api.github.com/users/n1207n/received_events","type":"User","site_admin":false},"assignees":[{"login":"n1207n","id":3138217,"avatar_url":"https://avatars0.githubusercontent.com/u/3138217?v=4","gravatar_id":"","url":"https://api.github.com/users/n1207n","html_url":"https://github.com/n1207n","followers_url":"https://api.github.com/users/n1207n/followers","following_url":"https://api.github.com/users/n1207n/following{/other_user}","gists_url":"https://api.github.com/users/n1207n/gists{/gist_id}","starred_url":"https://api.github.com/users/n1207n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n1207n/subscriptions","organizations_url":"https://api.github.com/users/n1207n/orgs","repos_url":"https://api.github.com/users/n1207n/repos","events_url":"https://api.github.com/users/n1207n/events{/privacy}","received_events_url":"https://api.github.com/users/n1207n/received_events","type":"User","site_admin":false},{"login":"marcindo","id":18008873,"avatar_url":"https://avatars0.githubusercontent.com/u/18008873?v=4","gravatar_id":"","url":"https://api.github.com/users/marcindo","html_url":"https://github.com/marcindo","followers_url":"https://api.github.com/users/marcindo/followers","following_url":"https://api.github.com/users/marcindo/following{/other_user}","gists_url":"https://api.github.com/users/marcindo/gists{/gist_id}","starred_url":"https://api.github.com/users/marcindo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcindo/subscriptions","organizations_url":"https://api.github.com/users/marcindo/orgs","repos_url":"https://api.github.com/users/marcindo/repos","events_url":"https://api.github.com/users/marcindo/events{/privacy}","received_events_url":"https://api.github.com/users/marcindo/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2018-02-13T00:04:37Z","updated_at":"2018-02-23T19:29:10Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"If a user is an IMO for say cluster A & B in Response plan Z then they should be allowed to add/edit projects (and their indicators) and activities (and their indicators) for partners that are associated with clusters X or Y.\r\n\r\nThe IMO cannot do that for partners that are in cluster C though. Or even for partners in response plan Y.\r\n\r\nThe \"My Planned Action\" navigation and all associated sub-navigations is still hidden from the IMO and only partner facing. Hence this add/edit capability for partner projects and partner activities will be exposed under the \"response parameters > partners\" section.\r\n\r\n\"response parameters > partners > projects\" IMO will see a \"add project\" button.\r\n\r\n\"response parameters > partners > partner activities\" they will see a \"add activity\" button.\r\n\r\nAs already, the IMO can submit data and reports for any indicator report associated with their cluster already.\r\n\r\n\r\n**Technical notes**\r\n\r\nProject/partner activity create API endpoints need to allow a \"partner_id\" to be posted as well, and will associated that new activity or project with that partner. Doing all necessary data validations of course.\r\n\r\nBackend should validate everything, including that this user is an IMO and only for those requests an additional \"partner_id\" (for creation only) will be expected. For edit, validate the fact that this IMO user is an IMO for a cluster this partner project/activities partner belongs to.\r\n\r\n**Frontend changes**\r\n- If this is an IMO user then show a \"add project\" and \"add activity\" button under /app/EG/cluster-reporting/plan/43/response-parameters/partners/projects and /app/EG/cluster-reporting/plan/43/response-parameters/partners/activities routes under response parameters > partners\r\n\r\n- clicking those buttons should give the exact same modal as a partner would get except now with a \"dropdown\" to select one partner.\r\n\r\n![cluster_reporting___prp](https://user-images.githubusercontent.com/73096/36515149-d2fb23fe-172c-11e8-820b-5761ea48454f.png)\r\n\r\nSame for partner activity add modal as well. Would post to different url now thats it, would be eg.\r\n```\r\n# PartnerProject create (POST)\r\nr'^(?P<response_plan_id>\\d+)/partner-project-list/partner/(?P<partner_id>\\d+)/$\r\n\r\n# PartnerProject update (PUT)\r\nr'^partner-project-details/partner/(?P<partner_id>\\d+)/(?P<pk>\\d+)/$'\r\n\r\n# PartnerActivity create (POST)\r\nr'^(?P<response_plan_id>\\d+)/create-partner-activity/(?P<create_mode>\\w+)$'\r\n\r\n# PartnerActivity update (PUT)\r\nr'^(?P<response_plan_id>\\d+)/partner-activity/(?P<pk>\\d+)/$'\r\n```\r\n\r\n- If IMO user then in the project details and partner activity details views there would be a \"edit project\" and \"edit activity\" button. Routes for those: /app/EG/cluster-reporting/plan/43/response-parameters/partners/project/77/overview and /app/EG/cluster-reporting/plan/43/response-parameters/partners/activity/1732/overview\r\n\r\n- the modals that open for these are exactly the same as would happen for partner under \"my planned action\".\r\n"},"comment":{"url":"https://api.github.com/repos/unicef/etools-partner-reporting-portal/issues/comments/368114640","html_url":"https://github.com/unicef/etools-partner-reporting-portal/issues/466#issuecomment-368114640","issue_url":"https://api.github.com/repos/unicef/etools-partner-reporting-portal/issues/466","id":368114640,"user":{"login":"n1207n","id":3138217,"avatar_url":"https://avatars0.githubusercontent.com/u/3138217?v=4","gravatar_id":"","url":"https://api.github.com/users/n1207n","html_url":"https://github.com/n1207n","followers_url":"https://api.github.com/users/n1207n/followers","following_url":"https://api.github.com/users/n1207n/following{/other_user}","gists_url":"https://api.github.com/users/n1207n/gists{/gist_id}","starred_url":"https://api.github.com/users/n1207n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n1207n/subscriptions","organizations_url":"https://api.github.com/users/n1207n/orgs","repos_url":"https://api.github.com/users/n1207n/repos","events_url":"https://api.github.com/users/n1207n/events{/privacy}","received_events_url":"https://api.github.com/users/n1207n/received_events","type":"User","site_admin":false},"created_at":"2018-02-23T19:29:09Z","updated_at":"2018-02-23T19:29:09Z","author_association":"CONTRIBUTOR","body":"@marcindo,\r\n\r\nThe update API for PartnerProject as IMO is `http://localhost:8080/api/partner/partner-project-details/partner/9/43/` where `9` is partner_id and `43` is project_id.\r\n\r\nIf you're on PartnerProject details page, shouldn't Polymer have access to both ids?"}}
{"actor":{"display_login":"n1207n"}}