{"action":"created","issue":{"url":"https://api.github.com/repos/CoderDojo/cp-zen-platform/issues/775","labels_url":"https://api.github.com/repos/CoderDojo/cp-zen-platform/issues/775/labels{/name}","comments_url":"https://api.github.com/repos/CoderDojo/cp-zen-platform/issues/775/comments","events_url":"https://api.github.com/repos/CoderDojo/cp-zen-platform/issues/775/events","html_url":"https://github.com/CoderDojo/cp-zen-platform/pull/775","id":121893779,"number":775,"title":"Filters inactive dojos in list and deletes an unused controller. Fix for #824","user":{"login":"josmas","id":194925,"avatar_url":"https://avatars.githubusercontent.com/u/194925?v=3","gravatar_id":"","url":"https://api.github.com/users/josmas","html_url":"https://github.com/josmas","followers_url":"https://api.github.com/users/josmas/followers","following_url":"https://api.github.com/users/josmas/following{/other_user}","gists_url":"https://api.github.com/users/josmas/gists{/gist_id}","starred_url":"https://api.github.com/users/josmas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josmas/subscriptions","organizations_url":"https://api.github.com/users/josmas/orgs","repos_url":"https://api.github.com/users/josmas/repos","events_url":"https://api.github.com/users/josmas/events{/privacy}","received_events_url":"https://api.github.com/users/josmas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-13T02:39:30Z","updated_at":"2015-12-14T14:53:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CoderDojo/cp-zen-platform/pulls/775","html_url":"https://github.com/CoderDojo/cp-zen-platform/pull/775","diff_url":"https://github.com/CoderDojo/cp-zen-platform/pull/775.diff","patch_url":"https://github.com/CoderDojo/cp-zen-platform/pull/775.patch"},"body":"Fix for https://github.com/CoderDojo/community-platform/issues/824\r\n\r\nThe fix is far from ideal but it is the same ***hack*** used for the maps view. As noted in https://github.com/CoderDojo/community-platform/issues/831, refactoring this code would be great, but it turns out it's not as simple as expected. The reason is that the *stage* field is an integer 0 to 4. It works fine for filtering to one particular stage (sending a query like *stage = 1*) but we want something like *stage !== 4* and there's no way to send that over in a query parameter. There are a couple of routes that use custom SQL in the service and hardcode that value. That could be a solution, but it means creating a new route for something that a *query* parameter should be able to do.\r\n\r\nAlso, the list controller is not used anymore, all the code is in the map controller (it took a while to figure that out, so deleting unused file here too so there's no confusion in the future)."},"comment":{"url":"https://api.github.com/repos/CoderDojo/cp-zen-platform/issues/comments/164457086","html_url":"https://github.com/CoderDojo/cp-zen-platform/pull/775#issuecomment-164457086","issue_url":"https://api.github.com/repos/CoderDojo/cp-zen-platform/issues/775","id":164457086,"user":{"login":"mirceaalexandru","id":2272649,"avatar_url":"https://avatars.githubusercontent.com/u/2272649?v=3","gravatar_id":"","url":"https://api.github.com/users/mirceaalexandru","html_url":"https://github.com/mirceaalexandru","followers_url":"https://api.github.com/users/mirceaalexandru/followers","following_url":"https://api.github.com/users/mirceaalexandru/following{/other_user}","gists_url":"https://api.github.com/users/mirceaalexandru/gists{/gist_id}","starred_url":"https://api.github.com/users/mirceaalexandru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mirceaalexandru/subscriptions","organizations_url":"https://api.github.com/users/mirceaalexandru/orgs","repos_url":"https://api.github.com/users/mirceaalexandru/repos","events_url":"https://api.github.com/users/mirceaalexandru/events{/privacy}","received_events_url":"https://api.github.com/users/mirceaalexandru/received_events","type":"User","site_admin":false},"created_at":"2015-12-14T14:53:32Z","updated_at":"2015-12-14T14:53:32Z","body":"postgres version 0.8.3 now supports:\r\n\r\nne$: .list$({ f1: {ne$: v1} }) for not-equal.\r\neq$: .list$({ f1: {eq$: v1} }) for equal.\r\nlte$: .list$({ f1: {lte$: 5} }) for less than or equal.\r\nlt$: .list$({ f1: {lt$: 5} }) for less than.\r\ngte$: .list$({ f1: {gte$: 5} }) for greater than or equal.\r\ngt$: .list$({ f1: {gt$: 5} }) for greater than.\r\nin$: .list$({ f1: {in$: [10, 20]} }) for in. in$ operator accepts only values of type array.\r\nnin$: .list$({ f1: {nin$: ['v1', 'v2']} }) for not-in. nin$ operator accepts only values of type array.\r\n\r\nNote: you can use any operators described above together.\r\n\r\nAnother change was that sort$ was fixed. To be consistent with the other seneca store the sort order was reversed.\r\n"}}