{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/87052807","pull_request_review_id":7680550,"id":87052807,"diff_hunk":"@@ -310,6 +317,15 @@ def test_field_with_two_kwargs(self):\n         field = data['relationships']['two_url_kwargs']['links']\n         assert_in('/v2/nodes/{}/node_links/{}/'.format(node._id, node._id), field['related']['href'])\n \n+    def test_field_with_two_filters(self):\n+        req = make_drf_request_with_version(version='2.0')\n+        project = factories.ProjectFactory()\n+        node = factories.NodeFactory(parent=project)\n+        data = self.BasicNodeSerializer(node, context={'request': req}).data['data']\n+        field = data['relationships']['field_with_filters']['links']\n+        assert_in(urllib.quote('filter[target]=hello', safe='?='), field['related']['href'])","path":"api_tests/base/test_serializers.py","position":30,"original_position":30,"commit_id":"eaa4b80db6f642d5d69a2cccfa28c1343b9a813c","original_commit_id":"eaa4b80db6f642d5d69a2cccfa28c1343b9a813c","user":{"login":"brianjgeiger","id":6599111,"avatar_url":"https://avatars.githubusercontent.com/u/6599111?v=3","gravatar_id":"","url":"https://api.github.com/users/brianjgeiger","html_url":"https://github.com/brianjgeiger","followers_url":"https://api.github.com/users/brianjgeiger/followers","following_url":"https://api.github.com/users/brianjgeiger/following{/other_user}","gists_url":"https://api.github.com/users/brianjgeiger/gists{/gist_id}","starred_url":"https://api.github.com/users/brianjgeiger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianjgeiger/subscriptions","organizations_url":"https://api.github.com/users/brianjgeiger/orgs","repos_url":"https://api.github.com/users/brianjgeiger/repos","events_url":"https://api.github.com/users/brianjgeiger/events{/privacy}","received_events_url":"https://api.github.com/users/brianjgeiger/received_events","type":"User","site_admin":false},"body":"Ah, right.","created_at":"2016-11-08T18:29:25Z","updated_at":"2016-11-08T18:29:26Z","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/6535#discussion_r87052807","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6535","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/87052807"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/6535#discussion_r87052807"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6535"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6535","id":92820530,"html_url":"https://github.com/CenterForOpenScience/osf.io/pull/6535","diff_url":"https://github.com/CenterForOpenScience/osf.io/pull/6535.diff","patch_url":"https://github.com/CenterForOpenScience/osf.io/pull/6535.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6535","number":6535,"state":"open","locked":false,"title":"Hotfix - Filter URL serialization in Relationship Field [#OSF-7194]","user":{"login":"erinspace","id":801594,"avatar_url":"https://avatars.githubusercontent.com/u/801594?v=3","gravatar_id":"","url":"https://api.github.com/users/erinspace","html_url":"https://github.com/erinspace","followers_url":"https://api.github.com/users/erinspace/followers","following_url":"https://api.github.com/users/erinspace/following{/other_user}","gists_url":"https://api.github.com/users/erinspace/gists{/gist_id}","starred_url":"https://api.github.com/users/erinspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erinspace/subscriptions","organizations_url":"https://api.github.com/users/erinspace/orgs","repos_url":"https://api.github.com/users/erinspace/repos","events_url":"https://api.github.com/users/erinspace/events{/privacy}","received_events_url":"https://api.github.com/users/erinspace/received_events","type":"User","site_admin":false},"body":"<!-- Before submit your Pull Request, make sure you picked\r\n     the right branch:\r\n\r\n     - For hotfixes, select \"master\" as the target branch\r\n     - For new features, select \"develop\" as the target branch\r\n     - For release feature fixes, select the relevant release branch (release/X.Y.Z) as the target branch -->\r\n\r\n## Purpose\r\nFilters added to the query params by the `RelationshipSeralizer` were using the normal way to add arguments, with `filter` as the name and the entire filter as the value: `filter=[field_name]=example`. This is done using the `extend_querystring_params` function which adds query string params with `furl`. So, pass the right thing to `extend_querystring_params`, and make sure it works with multiple filters!\r\n\r\n### Before\r\n![screen shot 2016-11-08 at 1 27 59 pm](https://cloud.githubusercontent.com/assets/801594/20111718/3c999e82-a5b7-11e6-90f0-ef50713bb547.png)\r\n\r\n### After\r\n![screen shot 2016-11-08 at 1 27 29 pm](https://cloud.githubusercontent.com/assets/801594/20111722/44022b6c-a5b7-11e6-8914-666df2ae6090.png)\r\n\r\n\r\n## Changes\r\n- Update `format_filters` method so that it returns a list of dicts with checked filter params, instead of a string with all the checked filters bundled together\r\n- Add each of those checked filters to the url via `extend_querystring_params`\r\n- Test to make sure adding multiple filters via the `RelationshipSerializer` looks as we expect\r\n\r\n\r\n## Side effects\r\nAny use of `format_filters` (couldn't find any others) will need to expect a list of dicts with formatted values instead of a pre-formatted string.\r\n\r\n## Ticket\r\nhttps://openscience.atlassian.net/browse/OSF-7194","created_at":"2016-11-08T17:14:30Z","updated_at":"2016-11-08T18:29:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36d02adc416ddd1ae929f860e8141b000396ecb6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6535/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6535/comments","review_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6535/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/eaa4b80db6f642d5d69a2cccfa28c1343b9a813c","head":{"label":"erinspace:hotfix/filter_serialization","ref":"hotfix/filter_serialization","sha":"eaa4b80db6f642d5d69a2cccfa28c1343b9a813c","user":{"login":"erinspace","id":801594,"avatar_url":"https://avatars.githubusercontent.com/u/801594?v=3","gravatar_id":"","url":"https://api.github.com/users/erinspace","html_url":"https://github.com/erinspace","followers_url":"https://api.github.com/users/erinspace/followers","following_url":"https://api.github.com/users/erinspace/following{/other_user}","gists_url":"https://api.github.com/users/erinspace/gists{/gist_id}","starred_url":"https://api.github.com/users/erinspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erinspace/subscriptions","organizations_url":"https://api.github.com/users/erinspace/orgs","repos_url":"https://api.github.com/users/erinspace/repos","events_url":"https://api.github.com/users/erinspace/events{/privacy}","received_events_url":"https://api.github.com/users/erinspace/received_events","type":"User","site_admin":false},"repo":{"id":27143923,"name":"osf.io","full_name":"erinspace/osf.io","owner":{"login":"erinspace","id":801594,"avatar_url":"https://avatars.githubusercontent.com/u/801594?v=3","gravatar_id":"","url":"https://api.github.com/users/erinspace","html_url":"https://github.com/erinspace","followers_url":"https://api.github.com/users/erinspace/followers","following_url":"https://api.github.com/users/erinspace/following{/other_user}","gists_url":"https://api.github.com/users/erinspace/gists{/gist_id}","starred_url":"https://api.github.com/users/erinspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erinspace/subscriptions","organizations_url":"https://api.github.com/users/erinspace/orgs","repos_url":"https://api.github.com/users/erinspace/repos","events_url":"https://api.github.com/users/erinspace/events{/privacy}","received_events_url":"https://api.github.com/users/erinspace/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/erinspace/osf.io","description":"Facilitating Open Science","fork":true,"url":"https://api.github.com/repos/erinspace/osf.io","forks_url":"https://api.github.com/repos/erinspace/osf.io/forks","keys_url":"https://api.github.com/repos/erinspace/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erinspace/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erinspace/osf.io/teams","hooks_url":"https://api.github.com/repos/erinspace/osf.io/hooks","issue_events_url":"https://api.github.com/repos/erinspace/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/erinspace/osf.io/events","assignees_url":"https://api.github.com/repos/erinspace/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/erinspace/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/erinspace/osf.io/tags","blobs_url":"https://api.github.com/repos/erinspace/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erinspace/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erinspace/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/erinspace/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erinspace/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/erinspace/osf.io/languages","stargazers_url":"https://api.github.com/repos/erinspace/osf.io/stargazers","contributors_url":"https://api.github.com/repos/erinspace/osf.io/contributors","subscribers_url":"https://api.github.com/repos/erinspace/osf.io/subscribers","subscription_url":"https://api.github.com/repos/erinspace/osf.io/subscription","commits_url":"https://api.github.com/repos/erinspace/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/erinspace/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/erinspace/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/erinspace/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/erinspace/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/erinspace/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erinspace/osf.io/merges","archive_url":"https://api.github.com/repos/erinspace/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erinspace/osf.io/downloads","issues_url":"https://api.github.com/repos/erinspace/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/erinspace/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/erinspace/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/erinspace/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erinspace/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/erinspace/osf.io/releases{/id}","deployments_url":"https://api.github.com/repos/erinspace/osf.io/deployments","created_at":"2014-11-25T20:10:31Z","updated_at":"2016-07-28T16:18:47Z","pushed_at":"2016-11-08T17:16:48Z","git_url":"git://github.com/erinspace/osf.io.git","ssh_url":"git@github.com:erinspace/osf.io.git","clone_url":"https://github.com/erinspace/osf.io.git","svn_url":"https://github.com/erinspace/osf.io","homepage":"http://osf.io","size":140005,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"develop"}},"base":{"label":"CenterForOpenScience:master","ref":"master","sha":"a95b2407f93a8131eea8dc5e099682b5c05184b0","user":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"repo":{"id":10199599,"name":"osf.io","full_name":"CenterForOpenScience/osf.io","owner":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CenterForOpenScience/osf.io","description":"Facilitating Open Science","fork":false,"url":"https://api.github.com/repos/CenterForOpenScience/osf.io","forks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/forks","keys_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/teams","hooks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/hooks","issue_events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/events","assignees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/tags","blobs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/languages","stargazers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/stargazers","contributors_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contributors","subscribers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscribers","subscription_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscription","commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/merges","archive_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/downloads","issues_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/releases{/id}","deployments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/deployments","created_at":"2013-05-21T15:53:37Z","updated_at":"2016-10-24T15:49:35Z","pushed_at":"2016-11-08T18:29:25Z","git_url":"git://github.com/CenterForOpenScience/osf.io.git","ssh_url":"git@github.com:CenterForOpenScience/osf.io.git","clone_url":"https://github.com/CenterForOpenScience/osf.io.git","svn_url":"https://github.com/CenterForOpenScience/osf.io","homepage":"http://osf.io","size":273151,"stargazers_count":277,"watchers_count":277,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":209,"mirror_url":null,"open_issues_count":180,"forks":209,"open_issues":180,"watchers":277,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6535"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/6535"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6535"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/6535/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6535/comments"},"review_comment":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/6535/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/eaa4b80db6f642d5d69a2cccfa28c1343b9a813c"}}}}
{"actor":{"display_login":"brianjgeiger"}}