{"action":"created","issue":{"url":"https://api.github.com/repos/edx/edx-platform/issues/13420","repository_url":"https://api.github.com/repos/edx/edx-platform","labels_url":"https://api.github.com/repos/edx/edx-platform/issues/13420/labels{/name}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/13420/comments","events_url":"https://api.github.com/repos/edx/edx-platform/issues/13420/events","html_url":"https://github.com/edx/edx-platform/pull/13420","id":175654516,"number":13420,"title":"TNL-5457: Drop thread responses in Discussions API","user":{"login":"robrap","id":14576445,"avatar_url":"https://avatars.githubusercontent.com/u/14576445?v=3","gravatar_id":"","url":"https://api.github.com/users/robrap","html_url":"https://github.com/robrap","followers_url":"https://api.github.com/users/robrap/followers","following_url":"https://api.github.com/users/robrap/following{/other_user}","gists_url":"https://api.github.com/users/robrap/gists{/gist_id}","starred_url":"https://api.github.com/users/robrap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robrap/subscriptions","organizations_url":"https://api.github.com/users/robrap/orgs","repos_url":"https://api.github.com/users/robrap/repos","events_url":"https://api.github.com/users/robrap/events{/privacy}","received_events_url":"https://api.github.com/users/robrap/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-08T03:05:34Z","updated_at":"2016-09-08T19:45:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/13420","html_url":"https://github.com/edx/edx-platform/pull/13420","diff_url":"https://github.com/edx/edx-platform/pull/13420.diff","patch_url":"https://github.com/edx/edx-platform/pull/13420.patch"},"body":"### Description\r\n \r\n[TNL-5457](https://openedx.atlassian.net/browse/TNL-5457)\r\n\r\nThis PR covers the following:\r\n1. Fixing search (and Discussion API tests) to not take parameters it isn't using, and\r\n2. Fix Discussions API to not request thread responses where they aren't needed.\r\n\r\n### Sandbox\r\n- [ ]  [https://robrap-base.sandbox.edx.org](https://robrap-base.sandbox.edx.org)\r\n\r\n### Testing\r\n- [ ] Mobile app testing\r\n- [ ] safecommit violation code review process\r\n- [ ] Unit, integration, acceptance tests as appropriate\r\n- [ ] Performance\r\n\r\n### Reviewers\r\nIf you've been tagged for review, please check your corresponding box once you've given the :+1:.\r\n- [ ] Code review: @BenjiLee\r\n- [ ] Code review: @jcdyer\r\n\r\nFYI: This ticket is on the backlog, but the coding was done as part of reviewing https://github.com/edx/edx-platform/pull/13421.\r\n\r\n### Post-review\r\n- [ ] Rebase and squash commits"},"comment":{"url":"https://api.github.com/repos/edx/edx-platform/issues/comments/245717134","html_url":"https://github.com/edx/edx-platform/pull/13420#issuecomment-245717134","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/13420","id":245717134,"user":{"login":"robrap","id":14576445,"avatar_url":"https://avatars.githubusercontent.com/u/14576445?v=3","gravatar_id":"","url":"https://api.github.com/users/robrap","html_url":"https://github.com/robrap","followers_url":"https://api.github.com/users/robrap/followers","following_url":"https://api.github.com/users/robrap/following{/other_user}","gists_url":"https://api.github.com/users/robrap/gists{/gist_id}","starred_url":"https://api.github.com/users/robrap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robrap/subscriptions","organizations_url":"https://api.github.com/users/robrap/orgs","repos_url":"https://api.github.com/users/robrap/repos","events_url":"https://api.github.com/users/robrap/events{/privacy}","received_events_url":"https://api.github.com/users/robrap/received_events","type":"User","site_admin":false},"created_at":"2016-09-08T19:45:37Z","updated_at":"2016-09-08T19:45:37Z","body":"@BenjiLee @jcdyer: This is a continuation of the earlier work to make the default for with_responses be False for Discussion API, and override where necessary.\r\n\r\nI tested manually using DRF and comparing to master (locally) for the following.  Note that I also first tested with with_responses=False in the 3 places I override to true, to prove it was in fact needed.\r\n\r\n```\r\n# Sample calls that don't require with_responses=True\r\nGET http://0.0.0.0:8000/api/discussion/v1/courses/course-v1:dapi+GetCommentsTasks+test_d0499/\r\nhttp://0.0.0.0:8000/api/discussion/v1/course_topics/course-v1:dapi+GetCommentsTasks+test_d0499\r\nhttp://0.0.0.0:8000/api/discussion/v1/threads/?course_id=course-v1%3Adapi%2BGetCommentsTasks%2Btest_d0499\r\n\r\n# Requires with_responses=True\r\nGET http://0.0.0.0:8000/api/discussion/v1/threads/579273aa56c02c437b0000d3\r\nGET http://0.0.0.0:8000/api/discussion/v1/comments/?thread_id=579273aa56c02c437b0000d3&endorsed=False \r\nGET http://0.0.0.0:8000/api/discussion/v1/comments/579273d056c02c437b0000ec\r\n```\r\n\r\nAlso note that there are calls in discussion_api/views.py that claim they will return a \"children\" array, including getting/updating a comment.  I confirmed on Prod that get thread, get comment, etc. always return an empty children array, even when child_count > 0.  Should we have another ticket to remove this if it isn't being used by the Mobile App?  When the webapp uses Discussions API, we can add a param to fill this in if necessary.  Thoughts?"}}
{"actor":{"display_login":"robrap"}}