{"action":"created","issue":{"url":"https://api.github.com/repos/django-helpdesk/django-helpdesk/issues/613","repository_url":"https://api.github.com/repos/django-helpdesk/django-helpdesk","labels_url":"https://api.github.com/repos/django-helpdesk/django-helpdesk/issues/613/labels{/name}","comments_url":"https://api.github.com/repos/django-helpdesk/django-helpdesk/issues/613/comments","events_url":"https://api.github.com/repos/django-helpdesk/django-helpdesk/issues/613/events","html_url":"https://github.com/django-helpdesk/django-helpdesk/issues/613","id":317530808,"node_id":"MDU6SXNzdWUzMTc1MzA4MDg=","number":613,"title":"Tickets - Run Query in Use Saved Query not working in Django 2","user":{"login":"ssboy","id":10169464,"node_id":"MDQ6VXNlcjEwMTY5NDY0","avatar_url":"https://avatars2.githubusercontent.com/u/10169464?v=4","gravatar_id":"","url":"https://api.github.com/users/ssboy","html_url":"https://github.com/ssboy","followers_url":"https://api.github.com/users/ssboy/followers","following_url":"https://api.github.com/users/ssboy/following{/other_user}","gists_url":"https://api.github.com/users/ssboy/gists{/gist_id}","starred_url":"https://api.github.com/users/ssboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssboy/subscriptions","organizations_url":"https://api.github.com/users/ssboy/orgs","repos_url":"https://api.github.com/users/ssboy/repos","events_url":"https://api.github.com/users/ssboy/events{/privacy}","received_events_url":"https://api.github.com/users/ssboy/received_events","type":"User","site_admin":false},"labels":[{"id":73287,"node_id":"MDU6TGFiZWw3MzI4Nw==","url":"https://api.github.com/repos/django-helpdesk/django-helpdesk/labels/bug","name":"bug","color":"db7f7f","default":true}],"state":"closed","locked":false,"assignee":{"login":"gwasser","id":4760531,"node_id":"MDQ6VXNlcjQ3NjA1MzE=","avatar_url":"https://avatars3.githubusercontent.com/u/4760531?v=4","gravatar_id":"","url":"https://api.github.com/users/gwasser","html_url":"https://github.com/gwasser","followers_url":"https://api.github.com/users/gwasser/followers","following_url":"https://api.github.com/users/gwasser/following{/other_user}","gists_url":"https://api.github.com/users/gwasser/gists{/gist_id}","starred_url":"https://api.github.com/users/gwasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwasser/subscriptions","organizations_url":"https://api.github.com/users/gwasser/orgs","repos_url":"https://api.github.com/users/gwasser/repos","events_url":"https://api.github.com/users/gwasser/events{/privacy}","received_events_url":"https://api.github.com/users/gwasser/received_events","type":"User","site_admin":false},"assignees":[{"login":"gwasser","id":4760531,"node_id":"MDQ6VXNlcjQ3NjA1MzE=","avatar_url":"https://avatars3.githubusercontent.com/u/4760531?v=4","gravatar_id":"","url":"https://api.github.com/users/gwasser","html_url":"https://github.com/gwasser","followers_url":"https://api.github.com/users/gwasser/followers","following_url":"https://api.github.com/users/gwasser/following{/other_user}","gists_url":"https://api.github.com/users/gwasser/gists{/gist_id}","starred_url":"https://api.github.com/users/gwasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwasser/subscriptions","organizations_url":"https://api.github.com/users/gwasser/orgs","repos_url":"https://api.github.com/users/gwasser/repos","events_url":"https://api.github.com/users/gwasser/events{/privacy}","received_events_url":"https://api.github.com/users/gwasser/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-04-25T08:39:28Z","updated_at":"2018-06-27T06:45:51Z","closed_at":"2018-06-27T06:45:51Z","author_association":"CONTRIBUTOR","body":"I'm using the master branch project in Pycharm Ide; Django 2.0; Python 3.4; PostgreSQL (but it's the same thing using SQLite). I can save the filter but when try to use it is not applied. No message appears next to the 'apply filter' button. I tried on herokuapp demo installation and the same filter is applied normally ... the success message appears at the side of the 'apply filter' button. I have tried logged as superuser and as staff: same problem. Can anyone try to reproduce the situation on own master project installation? Thanks.\r\n** UPDATE: \r\nThis is an encoding problem that reside in the bytes literal prefix ('b) before the query field in helpdesk_savedsearch table. Django 2 saves the filter with that prefix, Django 1.11 instead no. When the filter is read under Python3 with Django2:\r\n`staff.py -> line 834: query_params = json.loads(b64decode(str(saved_query.query)).decode())`\r\nthe returned params are empty. Without the bytes literal prefix all its ok. \r\nBe careful: the run_report function in staff.py contains the same code at line n. 1141.\r\nI have apply a provisory workaround at lines 834 and 1141:\r\n`query_params = json.loads(b64decode(str(saved_query.query).lstrip(\"b\\\\'\")).decode())`\r\nI'm sorry but I still do not know helpdesk code well enough to find a consistent solution valid for all the various combinations versions of both Python and Django. \r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/django-helpdesk/django-helpdesk/issues/comments/400561235","html_url":"https://github.com/django-helpdesk/django-helpdesk/issues/613#issuecomment-400561235","issue_url":"https://api.github.com/repos/django-helpdesk/django-helpdesk/issues/613","id":400561235,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDU2MTIzNQ==","user":{"login":"gwasser","id":4760531,"node_id":"MDQ6VXNlcjQ3NjA1MzE=","avatar_url":"https://avatars3.githubusercontent.com/u/4760531?v=4","gravatar_id":"","url":"https://api.github.com/users/gwasser","html_url":"https://github.com/gwasser","followers_url":"https://api.github.com/users/gwasser/followers","following_url":"https://api.github.com/users/gwasser/following{/other_user}","gists_url":"https://api.github.com/users/gwasser/gists{/gist_id}","starred_url":"https://api.github.com/users/gwasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwasser/subscriptions","organizations_url":"https://api.github.com/users/gwasser/orgs","repos_url":"https://api.github.com/users/gwasser/repos","events_url":"https://api.github.com/users/gwasser/events{/privacy}","received_events_url":"https://api.github.com/users/gwasser/received_events","type":"User","site_admin":false},"created_at":"2018-06-27T06:45:50Z","updated_at":"2018-06-27T06:45:50Z","author_association":"MEMBER","body":"I added a check on the version of Django to use your workaround for Django 2.x and the previous code for Django 1.11 (which I believe works fine in testing). It's a bit nasty but will have to do for a bugfix release. I expect the next major release 0.3 to be solely based on Django 2/ Python 3 to allow more clean up."}}
{"actor":{"display_login":"gwasser"}}