{"action":"opened","issue":{"url":"https://api.github.com/repos/mdn/browser-compat-data/issues/1185","repository_url":"https://api.github.com/repos/mdn/browser-compat-data","labels_url":"https://api.github.com/repos/mdn/browser-compat-data/issues/1185/labels{/name}","comments_url":"https://api.github.com/repos/mdn/browser-compat-data/issues/1185/comments","events_url":"https://api.github.com/repos/mdn/browser-compat-data/issues/1185/events","html_url":"https://github.com/mdn/browser-compat-data/issues/1185","id":299787612,"number":1185,"title":"Add \"bugs\" field to features, to allow lookup of bug information","user":{"login":"a2sheppy","id":1641439,"avatar_url":"https://avatars2.githubusercontent.com/u/1641439?v=4","gravatar_id":"","url":"https://api.github.com/users/a2sheppy","html_url":"https://github.com/a2sheppy","followers_url":"https://api.github.com/users/a2sheppy/followers","following_url":"https://api.github.com/users/a2sheppy/following{/other_user}","gists_url":"https://api.github.com/users/a2sheppy/gists{/gist_id}","starred_url":"https://api.github.com/users/a2sheppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a2sheppy/subscriptions","organizations_url":"https://api.github.com/users/a2sheppy/orgs","repos_url":"https://api.github.com/users/a2sheppy/repos","events_url":"https://api.github.com/users/a2sheppy/events{/privacy}","received_events_url":"https://api.github.com/users/a2sheppy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-23T17:22:28Z","updated_at":"2018-02-23T17:22:28Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"We often have to include information about bugs in the compatibility data for given features. A common approach currently is to just include that information in the \"notes\" field. But that's imprecise and makes it hard to associate the bugs with versions in which they were introduced and/or fixed.\r\n\r\nI propose the addition of a new \"bugs\" record, which would look something like this:\r\n\r\n```\r\n\"firefox\": {\r\n  \"version_added\": \"25\",\r\n  \"bugs\": [\r\n    {\r\n      \"id\": \"2231143\",\r\n      \"version_added\": \"25\",\r\n      \"version_fixed\": \"28\",\r\n      \"note\": \"Until version 28, this property returned a value one lower than it should have.\"\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\nThe `\"version_fixed\"` can also accept a value of `false` to indicate that the bug hasn't been fixed yet (`false` would be the default value, so that omitting `version_fixed` would indicate the bug is still present).\r\n\r\nAs a corollary to this, I also suggest amending `browsers-schema.json` for the browser data like this:\r\n\r\n```\r\n    \"browser_statement\": {\r\n      \"type\": \"object\",\r\n      \"properties\": {\r\n        \"bug_url\": { \"type\": \"string\", \"format\": \"uri\" },\r\n        \"releases\": {\r\n          \"type\": \"object\",\r\n          \"additionalProperties\": { \"$ref\": \"#/definitions/release_statement\" }\r\n        }\r\n      },\r\n      \"required\": [\"releases\"],\r\n      \"additionalProperties\": false\r\n    },\r\n```\r\n\r\nNote the addition of the once-per-browser entry `\"bug_url\"`. This would contain a string with a slow to insert a bug number to generate the URL for a given bug. The syntax could be the same as the one we use for search keywords: `\"https://bugdatabase.tld/getbug?id=%s\"`, where the `\"%s\"` gets replaced with the bug number to generate the URL for that bug.\r\n\r\nBy having the bug information available in the JSON as well as information on how to get links to bugs, we don't have to embed bug links into the notes, but can simply list them in the `\"bugs\"` section, which gives everything we need to know."}}
{"actor":{"display_login":"a2sheppy"}}