{"action":"created","issue":{"url":"https://api.github.com/repos/google/ggrc-core/issues/7113","repository_url":"https://api.github.com/repos/google/ggrc-core","labels_url":"https://api.github.com/repos/google/ggrc-core/issues/7113/labels{/name}","comments_url":"https://api.github.com/repos/google/ggrc-core/issues/7113/comments","events_url":"https://api.github.com/repos/google/ggrc-core/issues/7113/events","html_url":"https://github.com/google/ggrc-core/pull/7113","id":288161826,"number":7113,"title":"GGRC-3668 Use new API for updating GCA","user":{"login":"iSokrat","id":13063442,"avatar_url":"https://avatars2.githubusercontent.com/u/13063442?v=4","gravatar_id":"","url":"https://api.github.com/users/iSokrat","html_url":"https://github.com/iSokrat","followers_url":"https://api.github.com/users/iSokrat/followers","following_url":"https://api.github.com/users/iSokrat/following{/other_user}","gists_url":"https://api.github.com/users/iSokrat/gists{/gist_id}","starred_url":"https://api.github.com/users/iSokrat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iSokrat/subscriptions","organizations_url":"https://api.github.com/users/iSokrat/orgs","repos_url":"https://api.github.com/users/iSokrat/repos","events_url":"https://api.github.com/users/iSokrat/events{/privacy}","received_events_url":"https://api.github.com/users/iSokrat/received_events","type":"User","site_admin":false},"labels":[{"id":653911749,"url":"https://api.github.com/repos/google/ggrc-core/labels/cla:%20yes","name":"cla: yes","color":"ededed","default":false},{"id":86898803,"url":"https://api.github.com/repos/google/ggrc-core/labels/needs%20work","name":"needs work","color":"f9d0c4","default":false}],"state":"open","locked":false,"assignee":{"login":"m-vitaly","id":24203972,"avatar_url":"https://avatars0.githubusercontent.com/u/24203972?v=4","gravatar_id":"","url":"https://api.github.com/users/m-vitaly","html_url":"https://github.com/m-vitaly","followers_url":"https://api.github.com/users/m-vitaly/followers","following_url":"https://api.github.com/users/m-vitaly/following{/other_user}","gists_url":"https://api.github.com/users/m-vitaly/gists{/gist_id}","starred_url":"https://api.github.com/users/m-vitaly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-vitaly/subscriptions","organizations_url":"https://api.github.com/users/m-vitaly/orgs","repos_url":"https://api.github.com/users/m-vitaly/repos","events_url":"https://api.github.com/users/m-vitaly/events{/privacy}","received_events_url":"https://api.github.com/users/m-vitaly/received_events","type":"User","site_admin":false},"assignees":[{"login":"YuriChupyrkin","id":4204416,"avatar_url":"https://avatars0.githubusercontent.com/u/4204416?v=4","gravatar_id":"","url":"https://api.github.com/users/YuriChupyrkin","html_url":"https://github.com/YuriChupyrkin","followers_url":"https://api.github.com/users/YuriChupyrkin/followers","following_url":"https://api.github.com/users/YuriChupyrkin/following{/other_user}","gists_url":"https://api.github.com/users/YuriChupyrkin/gists{/gist_id}","starred_url":"https://api.github.com/users/YuriChupyrkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YuriChupyrkin/subscriptions","organizations_url":"https://api.github.com/users/YuriChupyrkin/orgs","repos_url":"https://api.github.com/users/YuriChupyrkin/repos","events_url":"https://api.github.com/users/YuriChupyrkin/events{/privacy}","received_events_url":"https://api.github.com/users/YuriChupyrkin/received_events","type":"User","site_admin":false},{"login":"m-vitaly","id":24203972,"avatar_url":"https://avatars0.githubusercontent.com/u/24203972?v=4","gravatar_id":"","url":"https://api.github.com/users/m-vitaly","html_url":"https://github.com/m-vitaly","followers_url":"https://api.github.com/users/m-vitaly/followers","following_url":"https://api.github.com/users/m-vitaly/following{/other_user}","gists_url":"https://api.github.com/users/m-vitaly/gists{/gist_id}","starred_url":"https://api.github.com/users/m-vitaly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-vitaly/subscriptions","organizations_url":"https://api.github.com/users/m-vitaly/orgs","repos_url":"https://api.github.com/users/m-vitaly/repos","events_url":"https://api.github.com/users/m-vitaly/events{/privacy}","received_events_url":"https://api.github.com/users/m-vitaly/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/google/ggrc-core/milestones/77","html_url":"https://github.com/google/ggrc-core/milestone/77","labels_url":"https://api.github.com/repos/google/ggrc-core/milestones/77/labels","id":3110951,"number":77,"title":"1.5.0-Strawberry","description":null,"creator":{"login":"m-vitaly","id":24203972,"avatar_url":"https://avatars0.githubusercontent.com/u/24203972?v=4","gravatar_id":"","url":"https://api.github.com/users/m-vitaly","html_url":"https://github.com/m-vitaly","followers_url":"https://api.github.com/users/m-vitaly/followers","following_url":"https://api.github.com/users/m-vitaly/following{/other_user}","gists_url":"https://api.github.com/users/m-vitaly/gists{/gist_id}","starred_url":"https://api.github.com/users/m-vitaly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-vitaly/subscriptions","organizations_url":"https://api.github.com/users/m-vitaly/orgs","repos_url":"https://api.github.com/users/m-vitaly/repos","events_url":"https://api.github.com/users/m-vitaly/events{/privacy}","received_events_url":"https://api.github.com/users/m-vitaly/received_events","type":"User","site_admin":false},"open_issues":35,"closed_issues":20,"state":"open","created_at":"2018-02-13T11:29:36Z","updated_at":"2018-02-20T21:06:19Z","due_on":null,"closed_at":null},"comments":11,"created_at":"2018-01-12T15:51:39Z","updated_at":"2018-02-21T07:24:21Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/google/ggrc-core/pulls/7113","html_url":"https://github.com/google/ggrc-core/pull/7113","diff_url":"https://github.com/google/ggrc-core/pull/7113.diff","patch_url":"https://github.com/google/ggrc-core/pull/7113.patch"},"body":"# Issue description\r\n\r\nGCA are described in cacheable models as `custom_attribute_values: CMS.Models.CustomAttributeValue.stubs`. These rows should be removed and new GCA API will be in use.\r\n\r\n# Steps to test the changes\r\n\r\n1. Create any new custom attributable object (for example, Control) with filled ca values;\r\n2. Open dev tools:\r\n![screenshot from 2018-01-12 18-05-40](https://user-images.githubusercontent.com/13063442/34881047-79d630da-f7c3-11e7-9309-e78125507ef4.png)\r\n\r\n`custom_attributes` field is the old way to create new ca values.\r\nWe should use `custom_attribute_values` instead.\r\n\r\n# Solution description\r\n\r\nThe app has a lot of places where we manipulate with CA differently. The solution provides the common way to manipulate CA for each Cacheable custom attributable instance.\r\nWe define new concepts, which will describe the work with CA.\r\n\r\n1. **CustomAttributeObject**\r\n\r\nIt's way to connect values of `custom_attribute_values` and `custom_attribute_definitions` in the one instance. With help it, we can manipulate with CA more conveniently and use it inside components without call `ca utils` methods.\r\n\r\nIn the future it can be applied for LCA:\r\nBefore this moment there were a lot of custom attribute utils which transformed `custom_attribute_values` from one form to another and back to original form. It led to creation extra data which we sent to the server. `CaObject` will help us to prevent it.\r\n\r\n![screenshot from 2018-01-12 18-29-05](https://user-images.githubusercontent.com/13063442/34882114-90bfa81e-f7c6-11e7-8191-fe2f20590c3f.png)\r\n\r\n`def`, `errorsMap` and so on - extra data for the server \r\n\r\n**Read docs inside code for more details.**\r\n\r\n2. **CustomAttributeAccess**\r\n\r\nThe instance which help to build, read and write `CaObject`s for instance. With help it we can easy remove old `custom_attributes` way.\r\n\r\n**Read docs inside code for more details.**\r\n\r\n3. **StateValidator**\r\n\r\nIn a few words, it's an object which generates some state object based on functions.\r\nThey have name `Validation Actions`.\r\nFor GCA they can generate state for check on non-emty mandatory field.\r\nFor LCA  they can generate another logic.\r\nThis is very convenient thing for the future for LCA because now validations is set inside one component and is quite bulky.\r\n\r\n **Read docs inside code for more details.**\r\n\r\n# Sanity checklist\r\n\r\n- [x] I have clicked through the app to make sure my changes work and not break the app.\r\n- [x] I have applied the correct milestone and labels.\r\n- [x] My changes fix the issue described in the description (and do nothing else). 🤞\r\n- [x] My changes are covered by tests.\r\n- [x] My changes follow our [performance guidelines](https://github.com/google/ggrc-core/blob/dev/docs/source/contributing/performance.rst).\r\n- [x] My changes follow our [js](https://github.com/google/ggrc-core/blob/dev/docs/source/contributing/javascript.rst) and/or [python](https://github.com/google/ggrc-core/blob/dev/docs/source/contributing/python.rst) guidelines.\r\n- [ ] My commits follow our [commit guidelines](https://github.com/google/ggrc-core/blob/dev/docs/source/contributing/git/how_to_write_a_commit_message.rst).\r\n\r\n<!-- If your PR includes a migration include the additional checklist items\r\n# Migration checklist\r\n- [ ] Migration passes all checks from our [PR review guidelines](https://github.com/google/ggrc-core/blob/dev/docs/source/contributing/git/reviewing_pull_requests.rst#reviewing-a-pr-containing-database-migration-scripts)\r\n-->\r\n\r\n# PR Review checklist\r\n\r\n- [ ] The changes fix the issue and don't cause any apparent regressions.\r\n- [ ] Labels and milestone are correctly set.\r\n- [ ] The solution description matches the changes in the code.\r\n- [ ] There is no apparent way to improve the performance & design of the new code.\r\n- [ ] The pull request is opened against the correct base branch.\r\n- [ ] Upon merging, the Jira ticket's fixversion is correctly set and the ticket is moved to \"QA - In Progress\".\r\n\r\n<!-- If your code is not finished yet can include a TODO check list\r\n# TODO\r\n\r\n- [ ] First item on the TODO\r\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/google/ggrc-core/issues/comments/367235840","html_url":"https://github.com/google/ggrc-core/pull/7113#issuecomment-367235840","issue_url":"https://api.github.com/repos/google/ggrc-core/issues/7113","id":367235840,"user":{"login":"iSokrat","id":13063442,"avatar_url":"https://avatars2.githubusercontent.com/u/13063442?v=4","gravatar_id":"","url":"https://api.github.com/users/iSokrat","html_url":"https://github.com/iSokrat","followers_url":"https://api.github.com/users/iSokrat/followers","following_url":"https://api.github.com/users/iSokrat/following{/other_user}","gists_url":"https://api.github.com/users/iSokrat/gists{/gist_id}","starred_url":"https://api.github.com/users/iSokrat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iSokrat/subscriptions","organizations_url":"https://api.github.com/users/iSokrat/orgs","repos_url":"https://api.github.com/users/iSokrat/repos","events_url":"https://api.github.com/users/iSokrat/events{/privacy}","received_events_url":"https://api.github.com/users/iSokrat/received_events","type":"User","site_admin":false},"created_at":"2018-02-21T07:24:21Z","updated_at":"2018-02-21T07:24:21Z","author_association":"COLLABORATOR","body":"**From** @m-vitaly:\r\n@iSokrat I would like to highlight that there is legacy issue that wasn't fixed in this PR and should be processed accordingly: when user types some tag (ex. <br />) in custom attribute of type RichText it will be saved but will be shown as empty field for user.\r\n**Answer**: Thank's for this interesting note. This issue isn't related to my PR. I've told to QA team about this - they have created the ticket."}}
{"actor":{"display_login":"iSokrat"}}