{"action":"created","issue":{"url":"https://api.github.com/repos/grafana/grafana/issues/10677","repository_url":"https://api.github.com/repos/grafana/grafana","labels_url":"https://api.github.com/repos/grafana/grafana/issues/10677/labels{/name}","comments_url":"https://api.github.com/repos/grafana/grafana/issues/10677/comments","events_url":"https://api.github.com/repos/grafana/grafana/issues/10677/events","html_url":"https://github.com/grafana/grafana/pull/10677","id":292713488,"number":10677,"title":"Conditionally select a field to return in ResponseParser for InfluxDB","user":{"login":"lexmag","id":248290,"avatar_url":"https://avatars2.githubusercontent.com/u/248290?v=4","gravatar_id":"","url":"https://api.github.com/users/lexmag","html_url":"https://github.com/lexmag","followers_url":"https://api.github.com/users/lexmag/followers","following_url":"https://api.github.com/users/lexmag/following{/other_user}","gists_url":"https://api.github.com/users/lexmag/gists{/gist_id}","starred_url":"https://api.github.com/users/lexmag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lexmag/subscriptions","organizations_url":"https://api.github.com/users/lexmag/orgs","repos_url":"https://api.github.com/users/lexmag/repos","events_url":"https://api.github.com/users/lexmag/events{/privacy}","received_events_url":"https://api.github.com/users/lexmag/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-01-30T09:41:01Z","updated_at":"2018-05-04T13:07:03Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/grafana/grafana/pulls/10677","html_url":"https://github.com/grafana/grafana/pull/10677","diff_url":"https://github.com/grafana/grafana/pull/10677.diff","patch_url":"https://github.com/grafana/grafana/pull/10677.patch"},"body":"This is a possible fix for #7646 (the field selection could be added later if necessary).\r\nI'm not sure why `value[0]` was ever used before, but for SELECT queries InfluxDB always returns \"time\" first.\r\nAlso it is not possible to request just time—non-time field is required.\r\n\r\nIf, for some reason, returning time is needed I think we could do the following change:\r\n```javascript\r\nvar isReturningTime = query.toLowerCase().indexOf('time as') >= 0;\r\nvar position = if (isReturningTime) { 0 } else { 1 };\r\naddUnique(res, value[position]);\t\t\r\n```\r\nWhat are your thought on it?\r\n\r\n_CC @melinlab_"},"comment":{"url":"https://api.github.com/repos/grafana/grafana/issues/comments/386595590","html_url":"https://github.com/grafana/grafana/pull/10677#issuecomment-386595590","issue_url":"https://api.github.com/repos/grafana/grafana/issues/10677","id":386595590,"user":{"login":"lexmag","id":248290,"avatar_url":"https://avatars2.githubusercontent.com/u/248290?v=4","gravatar_id":"","url":"https://api.github.com/users/lexmag","html_url":"https://github.com/lexmag","followers_url":"https://api.github.com/users/lexmag/followers","following_url":"https://api.github.com/users/lexmag/following{/other_user}","gists_url":"https://api.github.com/users/lexmag/gists{/gist_id}","starred_url":"https://api.github.com/users/lexmag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lexmag/subscriptions","organizations_url":"https://api.github.com/users/lexmag/orgs","repos_url":"https://api.github.com/users/lexmag/repos","events_url":"https://api.github.com/users/lexmag/events{/privacy}","received_events_url":"https://api.github.com/users/lexmag/received_events","type":"User","site_admin":false},"created_at":"2018-05-04T13:07:03Z","updated_at":"2018-05-04T13:07:03Z","author_association":"NONE","body":"Ping. :bowtie:"}}
{"actor":{"display_login":"lexmag"}}