{"action":"closed","number":909,"pull_request":{"url":"https://api.github.com/repos/uktrade/data-hub-frontend/pulls/909","id":151907549,"html_url":"https://github.com/uktrade/data-hub-frontend/pull/909","diff_url":"https://github.com/uktrade/data-hub-frontend/pull/909.diff","patch_url":"https://github.com/uktrade/data-hub-frontend/pull/909.patch","issue_url":"https://api.github.com/repos/uktrade/data-hub-frontend/issues/909","number":909,"state":"closed","locked":false,"title":"Fix companies filtering on Firefox","user":{"login":"richtier","id":5485798,"avatar_url":"https://avatars0.githubusercontent.com/u/5485798?v=4","gravatar_id":"","url":"https://api.github.com/users/richtier","html_url":"https://github.com/richtier","followers_url":"https://api.github.com/users/richtier/followers","following_url":"https://api.github.com/users/richtier/following{/other_user}","gists_url":"https://api.github.com/users/richtier/gists{/gist_id}","starred_url":"https://api.github.com/users/richtier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richtier/subscriptions","organizations_url":"https://api.github.com/users/richtier/orgs","repos_url":"https://api.github.com/users/richtier/repos","events_url":"https://api.github.com/users/richtier/events{/privacy}","received_events_url":"https://api.github.com/users/richtier/received_events","type":"User","site_admin":false},"body":"[this task](https://uktrade.atlassian.net/browse/DH-974)\r\n\r\ntodo:\r\n - [x] make forms explicitly recieve action prop\r\n\r\n## The cause\r\n\r\nThe urls generated upon filtering are different:\r\n\r\nbrowser| url\r\n------------ | -------------\r\nChrome | http://localhost:3000/companies?custom=true&name=cool&sector=af22c9d2-5f95-e211-a939-e4115bead28a&sortby=modified_on%3Aasc\r\nFirefox | http://localhost:3000/companies?custom=true&name=cool&sector=af22c9d2-5f95-e211-a939-e4115bead28a&sortby=modified_on%3Aasc?custom=true&name=cool&sector=af22c9d2-5f95-e211-a939-e4115bead28a&sortby=modified_on%3Aasc\r\n\r\nThe cause of this different behaviour is the HTML `<form>` elements were being rendered without the `action` attribute. Firefox and Chrome do different things in this situation:\r\n\r\nbrowser| behaviour\r\n------------ | -------------\r\nChrome | treat the form element's action attribute as an empty string\r\nFirefox | treat the form element's action attribute as the current url (including the qureystring)\r\n\r\nThis affect's how the [`auto-submit`](https://github.com/uktrade/data-hub-frontend/blob/develop/assets/javascripts/modules/auto-submit.js#L37) will generate the url to submit the form:\r\n\r\nbrowser| behaviour\r\n------------ | -------------\r\nChrome | concatenate the empty string with the query, resulting in a valid url\r\nFirefox | concatenate the current url (including the querystring) with the query, resulting in an invalid url with duplicate query fields, which the server does not comprehend.\r\n\r\n## The fix\r\n\r\nSetting the form element's action attribute to the current url (without the querystring).","created_at":"2017-11-10T13:29:24Z","updated_at":"2017-11-10T16:15:37Z","closed_at":"2017-11-10T16:15:37Z","merged_at":"2017-11-10T16:15:37Z","merge_commit_sha":"e172e39559d3e46d409267d587548ad065ac0ae4","assignee":{"login":"richtier","id":5485798,"avatar_url":"https://avatars0.githubusercontent.com/u/5485798?v=4","gravatar_id":"","url":"https://api.github.com/users/richtier","html_url":"https://github.com/richtier","followers_url":"https://api.github.com/users/richtier/followers","following_url":"https://api.github.com/users/richtier/following{/other_user}","gists_url":"https://api.github.com/users/richtier/gists{/gist_id}","starred_url":"https://api.github.com/users/richtier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richtier/subscriptions","organizations_url":"https://api.github.com/users/richtier/orgs","repos_url":"https://api.github.com/users/richtier/repos","events_url":"https://api.github.com/users/richtier/events{/privacy}","received_events_url":"https://api.github.com/users/richtier/received_events","type":"User","site_admin":false},"assignees":[{"login":"richtier","id":5485798,"avatar_url":"https://avatars0.githubusercontent.com/u/5485798?v=4","gravatar_id":"","url":"https://api.github.com/users/richtier","html_url":"https://github.com/richtier","followers_url":"https://api.github.com/users/richtier/followers","following_url":"https://api.github.com/users/richtier/following{/other_user}","gists_url":"https://api.github.com/users/richtier/gists{/gist_id}","starred_url":"https://api.github.com/users/richtier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richtier/subscriptions","organizations_url":"https://api.github.com/users/richtier/orgs","repos_url":"https://api.github.com/users/richtier/repos","events_url":"https://api.github.com/users/richtier/events{/privacy}","received_events_url":"https://api.github.com/users/richtier/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"ztolley","id":56056,"avatar_url":"https://avatars1.githubusercontent.com/u/56056?v=4","gravatar_id":"","url":"https://api.github.com/users/ztolley","html_url":"https://github.com/ztolley","followers_url":"https://api.github.com/users/ztolley/followers","following_url":"https://api.github.com/users/ztolley/following{/other_user}","gists_url":"https://api.github.com/users/ztolley/gists{/gist_id}","starred_url":"https://api.github.com/users/ztolley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ztolley/subscriptions","organizations_url":"https://api.github.com/users/ztolley/orgs","repos_url":"https://api.github.com/users/ztolley/repos","events_url":"https://api.github.com/users/ztolley/events{/privacy}","received_events_url":"https://api.github.com/users/ztolley/received_events","type":"User","site_admin":false},{"login":"yeahfro","id":1150417,"avatar_url":"https://avatars0.githubusercontent.com/u/1150417?v=4","gravatar_id":"","url":"https://api.github.com/users/yeahfro","html_url":"https://github.com/yeahfro","followers_url":"https://api.github.com/users/yeahfro/followers","following_url":"https://api.github.com/users/yeahfro/following{/other_user}","gists_url":"https://api.github.com/users/yeahfro/gists{/gist_id}","starred_url":"https://api.github.com/users/yeahfro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yeahfro/subscriptions","organizations_url":"https://api.github.com/users/yeahfro/orgs","repos_url":"https://api.github.com/users/yeahfro/repos","events_url":"https://api.github.com/users/yeahfro/events{/privacy}","received_events_url":"https://api.github.com/users/yeahfro/received_events","type":"User","site_admin":false},{"login":"feedmypixel","id":2305016,"avatar_url":"https://avatars0.githubusercontent.com/u/2305016?v=4","gravatar_id":"","url":"https://api.github.com/users/feedmypixel","html_url":"https://github.com/feedmypixel","followers_url":"https://api.github.com/users/feedmypixel/followers","following_url":"https://api.github.com/users/feedmypixel/following{/other_user}","gists_url":"https://api.github.com/users/feedmypixel/gists{/gist_id}","starred_url":"https://api.github.com/users/feedmypixel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feedmypixel/subscriptions","organizations_url":"https://api.github.com/users/feedmypixel/orgs","repos_url":"https://api.github.com/users/feedmypixel/repos","events_url":"https://api.github.com/users/feedmypixel/events{/privacy}","received_events_url":"https://api.github.com/users/feedmypixel/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/uktrade/data-hub-frontend/pulls/909/commits","review_comments_url":"https://api.github.com/repos/uktrade/data-hub-frontend/pulls/909/comments","review_comment_url":"https://api.github.com/repos/uktrade/data-hub-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uktrade/data-hub-frontend/issues/909/comments","statuses_url":"https://api.github.com/repos/uktrade/data-hub-frontend/statuses/9cb5593fc2cebe22b2b90c5635b2e12ab7014446","head":{"label":"uktrade:DH-974-fix-firefox-promise","ref":"DH-974-fix-firefox-promise","sha":"9cb5593fc2cebe22b2b90c5635b2e12ab7014446","user":{"login":"uktrade","id":15107524,"avatar_url":"https://avatars2.githubusercontent.com/u/15107524?v=4","gravatar_id":"","url":"https://api.github.com/users/uktrade","html_url":"https://github.com/uktrade","followers_url":"https://api.github.com/users/uktrade/followers","following_url":"https://api.github.com/users/uktrade/following{/other_user}","gists_url":"https://api.github.com/users/uktrade/gists{/gist_id}","starred_url":"https://api.github.com/users/uktrade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uktrade/subscriptions","organizations_url":"https://api.github.com/users/uktrade/orgs","repos_url":"https://api.github.com/users/uktrade/repos","events_url":"https://api.github.com/users/uktrade/events{/privacy}","received_events_url":"https://api.github.com/users/uktrade/received_events","type":"Organization","site_admin":false},"repo":{"id":83823675,"name":"data-hub-frontend","full_name":"uktrade/data-hub-frontend","owner":{"login":"uktrade","id":15107524,"avatar_url":"https://avatars2.githubusercontent.com/u/15107524?v=4","gravatar_id":"","url":"https://api.github.com/users/uktrade","html_url":"https://github.com/uktrade","followers_url":"https://api.github.com/users/uktrade/followers","following_url":"https://api.github.com/users/uktrade/following{/other_user}","gists_url":"https://api.github.com/users/uktrade/gists{/gist_id}","starred_url":"https://api.github.com/users/uktrade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uktrade/subscriptions","organizations_url":"https://api.github.com/users/uktrade/orgs","repos_url":"https://api.github.com/users/uktrade/repos","events_url":"https://api.github.com/users/uktrade/events{/privacy}","received_events_url":"https://api.github.com/users/uktrade/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uktrade/data-hub-frontend","description":"The frontend rendering application for Data Hub","fork":false,"url":"https://api.github.com/repos/uktrade/data-hub-frontend","forks_url":"https://api.github.com/repos/uktrade/data-hub-frontend/forks","keys_url":"https://api.github.com/repos/uktrade/data-hub-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uktrade/data-hub-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uktrade/data-hub-frontend/teams","hooks_url":"https://api.github.com/repos/uktrade/data-hub-frontend/hooks","issue_events_url":"https://api.github.com/repos/uktrade/data-hub-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/uktrade/data-hub-frontend/events","assignees_url":"https://api.github.com/repos/uktrade/data-hub-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/uktrade/data-hub-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/uktrade/data-hub-frontend/tags","blobs_url":"https://api.github.com/repos/uktrade/data-hub-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uktrade/data-hub-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uktrade/data-hub-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/uktrade/data-hub-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uktrade/data-hub-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/uktrade/data-hub-frontend/languages","stargazers_url":"https://api.github.com/repos/uktrade/data-hub-frontend/stargazers","contributors_url":"https://api.github.com/repos/uktrade/data-hub-frontend/contributors","subscribers_url":"https://api.github.com/repos/uktrade/data-hub-frontend/subscribers","subscription_url":"https://api.github.com/repos/uktrade/data-hub-frontend/subscription","commits_url":"https://api.github.com/repos/uktrade/data-hub-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/uktrade/data-hub-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/uktrade/data-hub-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/uktrade/data-hub-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/uktrade/data-hub-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/uktrade/data-hub-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uktrade/data-hub-frontend/merges","archive_url":"https://api.github.com/repos/uktrade/data-hub-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uktrade/data-hub-frontend/downloads","issues_url":"https://api.github.com/repos/uktrade/data-hub-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/uktrade/data-hub-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/uktrade/data-hub-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/uktrade/data-hub-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uktrade/data-hub-frontend/labels{/name}","releases_url":"https://api.github.com/repos/uktrade/data-hub-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/uktrade/data-hub-frontend/deployments","created_at":"2017-03-03T17:26:35Z","updated_at":"2017-08-16T08:31:47Z","pushed_at":"2017-11-10T16:15:37Z","git_url":"git://github.com/uktrade/data-hub-frontend.git","ssh_url":"git@github.com:uktrade/data-hub-frontend.git","clone_url":"https://github.com/uktrade/data-hub-frontend.git","svn_url":"https://github.com/uktrade/data-hub-frontend","homepage":"","size":3547,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":27,"forks":1,"open_issues":27,"watchers":0,"default_branch":"develop"}},"base":{"label":"uktrade:develop","ref":"develop","sha":"f187469bf7689bd98fd5a8721b1aacc7e18bc87d","user":{"login":"uktrade","id":15107524,"avatar_url":"https://avatars2.githubusercontent.com/u/15107524?v=4","gravatar_id":"","url":"https://api.github.com/users/uktrade","html_url":"https://github.com/uktrade","followers_url":"https://api.github.com/users/uktrade/followers","following_url":"https://api.github.com/users/uktrade/following{/other_user}","gists_url":"https://api.github.com/users/uktrade/gists{/gist_id}","starred_url":"https://api.github.com/users/uktrade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uktrade/subscriptions","organizations_url":"https://api.github.com/users/uktrade/orgs","repos_url":"https://api.github.com/users/uktrade/repos","events_url":"https://api.github.com/users/uktrade/events{/privacy}","received_events_url":"https://api.github.com/users/uktrade/received_events","type":"Organization","site_admin":false},"repo":{"id":83823675,"name":"data-hub-frontend","full_name":"uktrade/data-hub-frontend","owner":{"login":"uktrade","id":15107524,"avatar_url":"https://avatars2.githubusercontent.com/u/15107524?v=4","gravatar_id":"","url":"https://api.github.com/users/uktrade","html_url":"https://github.com/uktrade","followers_url":"https://api.github.com/users/uktrade/followers","following_url":"https://api.github.com/users/uktrade/following{/other_user}","gists_url":"https://api.github.com/users/uktrade/gists{/gist_id}","starred_url":"https://api.github.com/users/uktrade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uktrade/subscriptions","organizations_url":"https://api.github.com/users/uktrade/orgs","repos_url":"https://api.github.com/users/uktrade/repos","events_url":"https://api.github.com/users/uktrade/events{/privacy}","received_events_url":"https://api.github.com/users/uktrade/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uktrade/data-hub-frontend","description":"The frontend rendering application for Data Hub","fork":false,"url":"https://api.github.com/repos/uktrade/data-hub-frontend","forks_url":"https://api.github.com/repos/uktrade/data-hub-frontend/forks","keys_url":"https://api.github.com/repos/uktrade/data-hub-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uktrade/data-hub-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uktrade/data-hub-frontend/teams","hooks_url":"https://api.github.com/repos/uktrade/data-hub-frontend/hooks","issue_events_url":"https://api.github.com/repos/uktrade/data-hub-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/uktrade/data-hub-frontend/events","assignees_url":"https://api.github.com/repos/uktrade/data-hub-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/uktrade/data-hub-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/uktrade/data-hub-frontend/tags","blobs_url":"https://api.github.com/repos/uktrade/data-hub-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uktrade/data-hub-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uktrade/data-hub-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/uktrade/data-hub-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uktrade/data-hub-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/uktrade/data-hub-frontend/languages","stargazers_url":"https://api.github.com/repos/uktrade/data-hub-frontend/stargazers","contributors_url":"https://api.github.com/repos/uktrade/data-hub-frontend/contributors","subscribers_url":"https://api.github.com/repos/uktrade/data-hub-frontend/subscribers","subscription_url":"https://api.github.com/repos/uktrade/data-hub-frontend/subscription","commits_url":"https://api.github.com/repos/uktrade/data-hub-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/uktrade/data-hub-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/uktrade/data-hub-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/uktrade/data-hub-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/uktrade/data-hub-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/uktrade/data-hub-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uktrade/data-hub-frontend/merges","archive_url":"https://api.github.com/repos/uktrade/data-hub-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uktrade/data-hub-frontend/downloads","issues_url":"https://api.github.com/repos/uktrade/data-hub-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/uktrade/data-hub-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/uktrade/data-hub-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/uktrade/data-hub-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uktrade/data-hub-frontend/labels{/name}","releases_url":"https://api.github.com/repos/uktrade/data-hub-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/uktrade/data-hub-frontend/deployments","created_at":"2017-03-03T17:26:35Z","updated_at":"2017-08-16T08:31:47Z","pushed_at":"2017-11-10T16:15:37Z","git_url":"git://github.com/uktrade/data-hub-frontend.git","ssh_url":"git@github.com:uktrade/data-hub-frontend.git","clone_url":"https://github.com/uktrade/data-hub-frontend.git","svn_url":"https://github.com/uktrade/data-hub-frontend","homepage":"","size":3547,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":27,"forks":1,"open_issues":27,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/uktrade/data-hub-frontend/pulls/909"},"html":{"href":"https://github.com/uktrade/data-hub-frontend/pull/909"},"issue":{"href":"https://api.github.com/repos/uktrade/data-hub-frontend/issues/909"},"comments":{"href":"https://api.github.com/repos/uktrade/data-hub-frontend/issues/909/comments"},"review_comments":{"href":"https://api.github.com/repos/uktrade/data-hub-frontend/pulls/909/comments"},"review_comment":{"href":"https://api.github.com/repos/uktrade/data-hub-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uktrade/data-hub-frontend/pulls/909/commits"},"statuses":{"href":"https://api.github.com/repos/uktrade/data-hub-frontend/statuses/9cb5593fc2cebe22b2b90c5635b2e12ab7014446"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"richtier","id":5485798,"avatar_url":"https://avatars0.githubusercontent.com/u/5485798?v=4","gravatar_id":"","url":"https://api.github.com/users/richtier","html_url":"https://github.com/richtier","followers_url":"https://api.github.com/users/richtier/followers","following_url":"https://api.github.com/users/richtier/following{/other_user}","gists_url":"https://api.github.com/users/richtier/gists{/gist_id}","starred_url":"https://api.github.com/users/richtier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richtier/subscriptions","organizations_url":"https://api.github.com/users/richtier/orgs","repos_url":"https://api.github.com/users/richtier/repos","events_url":"https://api.github.com/users/richtier/events{/privacy}","received_events_url":"https://api.github.com/users/richtier/received_events","type":"User","site_admin":false},"comments":0,"review_comments":4,"maintainer_can_modify":false,"commits":1,"additions":32,"deletions":21,"changed_files":12}}
{"actor":{"display_login":"richtier"}}