{"action":"created","issue":{"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/issues/3800","repository_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic","labels_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/issues/3800/labels{/name}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/issues/3800/comments","events_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/issues/3800/events","html_url":"https://github.com/ManageIQ/manageiq-ui-classic/pull/3800","id":315859857,"number":3800,"title":"[WIP] Fix inconstancy of flash messages for Analysis Profiles and Schedules","user":{"login":"hstastna","id":13417815,"avatar_url":"https://avatars0.githubusercontent.com/u/13417815?v=4","gravatar_id":"","url":"https://api.github.com/users/hstastna","html_url":"https://github.com/hstastna","followers_url":"https://api.github.com/users/hstastna/followers","following_url":"https://api.github.com/users/hstastna/following{/other_user}","gists_url":"https://api.github.com/users/hstastna/gists{/gist_id}","starred_url":"https://api.github.com/users/hstastna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hstastna/subscriptions","organizations_url":"https://api.github.com/users/hstastna/orgs","repos_url":"https://api.github.com/users/hstastna/repos","events_url":"https://api.github.com/users/hstastna/events{/privacy}","received_events_url":"https://api.github.com/users/hstastna/received_events","type":"User","site_admin":false},"labels":[{"id":505074429,"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/labels/bug","name":"bug","color":"ee0701","default":true},{"id":736077187,"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/labels/gaprindashvili/yes","name":"gaprindashvili/yes","color":"000000","default":false},{"id":534302577,"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/labels/settings","name":"settings","color":"5319e7","default":false},{"id":505531653,"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/labels/wip","name":"wip","color":"eeeeee","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-04-19T12:42:04Z","updated_at":"2018-05-07T08:18:00Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/pulls/3800","html_url":"https://github.com/ManageIQ/manageiq-ui-classic/pull/3800","diff_url":"https://github.com/ManageIQ/manageiq-ui-classic/pull/3800.diff","patch_url":"https://github.com/ManageIQ/manageiq-ui-classic/pull/3800.patch"},"body":"**Fixes BZ:** https://bugzilla.redhat.com/show_bug.cgi?id=1516895\r\n\r\nFix inconstancy of flash messages between addition vs. deletion of _Analysis Profiles_ and _Schedules_, under _Configuration -> Settings_ accordion.\r\n\r\n---\r\n\r\nDeleting the profile named \"Name1\" with description \"Desc1\":\r\n![profile_del](https://user-images.githubusercontent.com/13417815/38991976-9db96c70-43df-11e8-9f0e-aebc72303c93.png)\r\n\r\n**Before:**\r\n![profile_before](https://user-images.githubusercontent.com/13417815/38992220-60807eec-43e0-11e8-9086-e84cf4fb52cf.png)\r\n\r\n**After:**\r\n![profile_after](https://user-images.githubusercontent.com/13417815/38991927-79cd3a94-43df-11e8-8121-d966ccb3933c.png)\r\n\r\n---\r\n\r\n**Details:**\r\nThe problem with inconstancy is related to all of the records which have name AND also description. The inconstancy was caused in `get_record_display_name` method where description of the record is checked **first** (before name) and returned, no chance to check also the name of the record. And as the name of the method says, we should get the NAME of the record, if it exists. We should get description only if there is no name or label.\r\n\r\n**NOTE:**\r\nThe problem could have been fixed by changing the order of checking the record name, label etc. but I assume that it is on purpose the way it is so I did not change it and fixed it the other way. Feel free to correct me if I am wrong."},"comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/issues/comments/386993474","html_url":"https://github.com/ManageIQ/manageiq-ui-classic/pull/3800#issuecomment-386993474","issue_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/issues/3800","id":386993474,"user":{"login":"hstastna","id":13417815,"avatar_url":"https://avatars0.githubusercontent.com/u/13417815?v=4","gravatar_id":"","url":"https://api.github.com/users/hstastna","html_url":"https://github.com/hstastna","followers_url":"https://api.github.com/users/hstastna/followers","following_url":"https://api.github.com/users/hstastna/following{/other_user}","gists_url":"https://api.github.com/users/hstastna/gists{/gist_id}","starred_url":"https://api.github.com/users/hstastna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hstastna/subscriptions","organizations_url":"https://api.github.com/users/hstastna/orgs","repos_url":"https://api.github.com/users/hstastna/repos","events_url":"https://api.github.com/users/hstastna/events{/privacy}","received_events_url":"https://api.github.com/users/hstastna/received_events","type":"User","site_admin":false},"created_at":"2018-05-07T08:18:00Z","updated_at":"2018-05-07T08:18:00Z","author_association":"CONTRIBUTOR","body":"@h-kataria I have additional questions: which Add/edit method did you mean in your previous comment? And also, as I understand your comment, we now want to change flash messages so that it shows Description, not the name of saved/deleted Analysis Profile. Am I right? Thank you!"}}
{"actor":{"display_login":"hstastna"}}