{"action":"closed","issue":{"url":"https://api.github.com/repos/okfn/opendatacensus/issues/704","labels_url":"https://api.github.com/repos/okfn/opendatacensus/issues/704/labels{/name}","comments_url":"https://api.github.com/repos/okfn/opendatacensus/issues/704/comments","events_url":"https://api.github.com/repos/okfn/opendatacensus/issues/704/events","html_url":"https://github.com/okfn/opendatacensus/issues/704","id":110945600,"number":704,"title":"Updates to API","user":{"login":"pwalsh","id":791678,"avatar_url":"https://avatars.githubusercontent.com/u/791678?v=3","gravatar_id":"","url":"https://api.github.com/users/pwalsh","html_url":"https://github.com/pwalsh","followers_url":"https://api.github.com/users/pwalsh/followers","following_url":"https://api.github.com/users/pwalsh/following{/other_user}","gists_url":"https://api.github.com/users/pwalsh/gists{/gist_id}","starred_url":"https://api.github.com/users/pwalsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwalsh/subscriptions","organizations_url":"https://api.github.com/users/pwalsh/orgs","repos_url":"https://api.github.com/users/pwalsh/repos","events_url":"https://api.github.com/users/pwalsh/events{/privacy}","received_events_url":"https://api.github.com/users/pwalsh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/okfn/opendatacensus/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":{"login":"kravets-levko","id":12139186,"avatar_url":"https://avatars.githubusercontent.com/u/12139186?v=3","gravatar_id":"","url":"https://api.github.com/users/kravets-levko","html_url":"https://github.com/kravets-levko","followers_url":"https://api.github.com/users/kravets-levko/followers","following_url":"https://api.github.com/users/kravets-levko/following{/other_user}","gists_url":"https://api.github.com/users/kravets-levko/gists{/gist_id}","starred_url":"https://api.github.com/users/kravets-levko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kravets-levko/subscriptions","organizations_url":"https://api.github.com/users/kravets-levko/orgs","repos_url":"https://api.github.com/users/kravets-levko/repos","events_url":"https://api.github.com/users/kravets-levko/events{/privacy}","received_events_url":"https://api.github.com/users/kravets-levko/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/okfn/opendatacensus/milestones/10","html_url":"https://github.com/okfn/opendatacensus/milestones/Current","labels_url":"https://api.github.com/repos/okfn/opendatacensus/milestones/10/labels","id":847094,"number":10,"title":"Current","description":"","creator":{"login":"pwalsh","id":791678,"avatar_url":"https://avatars.githubusercontent.com/u/791678?v=3","gravatar_id":"","url":"https://api.github.com/users/pwalsh","html_url":"https://github.com/pwalsh","followers_url":"https://api.github.com/users/pwalsh/followers","following_url":"https://api.github.com/users/pwalsh/following{/other_user}","gists_url":"https://api.github.com/users/pwalsh/gists{/gist_id}","starred_url":"https://api.github.com/users/pwalsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwalsh/subscriptions","organizations_url":"https://api.github.com/users/pwalsh/orgs","repos_url":"https://api.github.com/users/pwalsh/repos","events_url":"https://api.github.com/users/pwalsh/events{/privacy}","received_events_url":"https://api.github.com/users/pwalsh/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":80,"state":"open","created_at":"2014-10-30T18:00:17Z","updated_at":"2015-10-14T10:08:59Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-10-12T10:06:16Z","updated_at":"2015-10-14T10:08:59Z","closed_at":"2015-10-14T10:08:59Z","body":"Notice that I refactored the new API to use our data access layer via `getData`: https://github.com/okfn/opendatacensus/blob/develop/census/controllers/api.js#L169\r\n\r\nThere are a bunch of options here: the important one being the cascade option.\r\n\r\nWhen cascade is false, then any query for data for a given year will return only records that exactly match on that year.\r\n\r\nexample: if I queried for 2015 entries, with cascade false, then I'd only get records that are actually submitted in 2015.\r\n\r\nWhen cascade is true, the same query will also bring forward records from previous years, IF a record in the current year does not exist (based on the tuple of site, place, dataset, year).\r\n\r\nSo, the cascade option ensure that, even if a particular dataset has had no entry for the year being queried, we will show something for it if an entry was made in a previous year.\r\n\r\n# Tasks\r\n\r\n* [x] `entries.all` - every single entry in the system for the given site - regardless of state (`isCurrent` can be `true` or `false`, for example - ensure to show all fields)\r\n* [x] per year, `entries` are the actual entries of that year, and `entries.cascade` are the entries for that year, including those brought forward\r\n* [x] Submitter and Reviewer data: there should be fields \"submitter\" and \"reviewer\" - these should just be the full name of the submitter/reviewer, or \"anonymous\" if so."}}