{"action":"created","issue":{"url":"https://api.github.com/repos/decidim/decidim/issues/2720","repository_url":"https://api.github.com/repos/decidim/decidim","labels_url":"https://api.github.com/repos/decidim/decidim/issues/2720/labels{/name}","comments_url":"https://api.github.com/repos/decidim/decidim/issues/2720/comments","events_url":"https://api.github.com/repos/decidim/decidim/issues/2720/events","html_url":"https://github.com/decidim/decidim/pull/2720","id":296755653,"number":2720,"title":"Fix meeting update and creation when its participatory space has a scope without subscopes","user":{"login":"josepjaume","id":111746,"avatar_url":"https://avatars0.githubusercontent.com/u/111746?v=4","gravatar_id":"","url":"https://api.github.com/users/josepjaume","html_url":"https://github.com/josepjaume","followers_url":"https://api.github.com/users/josepjaume/followers","following_url":"https://api.github.com/users/josepjaume/following{/other_user}","gists_url":"https://api.github.com/users/josepjaume/gists{/gist_id}","starred_url":"https://api.github.com/users/josepjaume/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josepjaume/subscriptions","organizations_url":"https://api.github.com/users/josepjaume/orgs","repos_url":"https://api.github.com/users/josepjaume/repos","events_url":"https://api.github.com/users/josepjaume/events{/privacy}","received_events_url":"https://api.github.com/users/josepjaume/received_events","type":"User","site_admin":false},"labels":[{"id":697676613,"url":"https://api.github.com/repos/decidim/decidim/labels/backport","name":"backport","color":"b60205","default":false},{"id":426339700,"url":"https://api.github.com/repos/decidim/decidim/labels/type:%20bug","name":"type: bug","color":"ee0701","default":false}],"state":"closed","locked":false,"assignee":{"login":"josepjaume","id":111746,"avatar_url":"https://avatars0.githubusercontent.com/u/111746?v=4","gravatar_id":"","url":"https://api.github.com/users/josepjaume","html_url":"https://github.com/josepjaume","followers_url":"https://api.github.com/users/josepjaume/followers","following_url":"https://api.github.com/users/josepjaume/following{/other_user}","gists_url":"https://api.github.com/users/josepjaume/gists{/gist_id}","starred_url":"https://api.github.com/users/josepjaume/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josepjaume/subscriptions","organizations_url":"https://api.github.com/users/josepjaume/orgs","repos_url":"https://api.github.com/users/josepjaume/repos","events_url":"https://api.github.com/users/josepjaume/events{/privacy}","received_events_url":"https://api.github.com/users/josepjaume/received_events","type":"User","site_admin":false},"assignees":[{"login":"josepjaume","id":111746,"avatar_url":"https://avatars0.githubusercontent.com/u/111746?v=4","gravatar_id":"","url":"https://api.github.com/users/josepjaume","html_url":"https://github.com/josepjaume","followers_url":"https://api.github.com/users/josepjaume/followers","following_url":"https://api.github.com/users/josepjaume/following{/other_user}","gists_url":"https://api.github.com/users/josepjaume/gists{/gist_id}","starred_url":"https://api.github.com/users/josepjaume/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josepjaume/subscriptions","organizations_url":"https://api.github.com/users/josepjaume/orgs","repos_url":"https://api.github.com/users/josepjaume/repos","events_url":"https://api.github.com/users/josepjaume/events{/privacy}","received_events_url":"https://api.github.com/users/josepjaume/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-02-13T14:27:23Z","updated_at":"2018-02-14T14:35:40Z","closed_at":"2018-02-14T11:11:17Z","author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/decidim/decidim/pulls/2720","html_url":"https://github.com/decidim/decidim/pull/2720","diff_url":"https://github.com/decidim/decidim/pull/2720.diff","patch_url":"https://github.com/decidim/decidim/pull/2720.patch"},"body":"#### :tophat: What? Why?\r\nThis fixes meetings when trying to be update in processes with a single scope. Before this patch, only descendants of a scope are allowed, but not the *scope* itself which is implicit when there's no subscopes.\r\n\r\n#### :pushpin: Related Issues\r\n*None*\r\n\r\n#### :clipboard: Subtasks\r\n*None*\r\n\r\n### :camera: Screenshots (optional)\r\n*None*"},"comment":{"url":"https://api.github.com/repos/decidim/decidim/issues/comments/365625516","html_url":"https://github.com/decidim/decidim/pull/2720#issuecomment-365625516","issue_url":"https://api.github.com/repos/decidim/decidim/issues/2720","id":365625516,"user":{"login":"leio10","id":453545,"avatar_url":"https://avatars0.githubusercontent.com/u/453545?v=4","gravatar_id":"","url":"https://api.github.com/users/leio10","html_url":"https://github.com/leio10","followers_url":"https://api.github.com/users/leio10/followers","following_url":"https://api.github.com/users/leio10/following{/other_user}","gists_url":"https://api.github.com/users/leio10/gists{/gist_id}","starred_url":"https://api.github.com/users/leio10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leio10/subscriptions","organizations_url":"https://api.github.com/users/leio10/orgs","repos_url":"https://api.github.com/users/leio10/repos","events_url":"https://api.github.com/users/leio10/events{/privacy}","received_events_url":"https://api.github.com/users/leio10/received_events","type":"User","site_admin":false},"created_at":"2018-02-14T14:35:40Z","updated_at":"2018-02-14T14:35:40Z","author_association":"CONTRIBUTOR","body":"Hi @josepjaume, I think that maybe this PR could have some issues:\r\n- You have removed the `decidim_scope_id` attribute overriding. It was intended to return the participatory space `scope_id` if there is no scope selected yet. I can't check it now, but I guess that with this PR, when creating a new meeting, the participatory space scope could not be marked as selected.\r\n- The scope `ancestor_of?` method uses the `part_of` column, that [should include the current scope `id`](https://github.com/decidim/decidim/blob/b8d9fc5481f520529322727d86705fef4fcaf531/decidim-core/app/models/decidim/scope.rb#L81). So, I think that logic shouldn't be changing with this PR. In the past, I had problems with the `part_of` calculation code, so maybe the bug fixed by this PR was detected in a Decidim instance with these kind of problems.\r\n\r\nIf I'm right, probably we should find a clearer way to implement this code or improve tests to avoid it could be broken again.\r\nOn the other hand, if these changes are correct, maybe they have to be applied to other components, since they share the same logic (for example [here](https://github.com/decidim/decidim/blob/master/decidim-proposals/app/forms/decidim/proposals/admin/proposal_form.rb)).\r\n\r\nIn any case, this reopen the question about if there is a way to define this code in a single place to be used in all the components with scoped resources."}}
{"actor":{"display_login":"leio10"}}