{"action":"created","comment":{"url":"https://api.github.com/repos/USGS-CIDA/nar_ui/pulls/comments/34085300","id":34085300,"diff_hunk":"@@ -74,6 +74,30 @@ $(document).ready(function() {\n \t\treturn ignore;\n \t};\n \t\n+\t/**\n+\t * Checks to make sure that the data underlying the series cover the\n+\t * most recent year.\n+\t * @param {nar.timeSeries.Visualization}\n+\t * @returns Boolean - True if valid, false otherwise\n+\t */\n+\tvar lastWaterYearRange = Date.range(nar.WaterYearUtils.getWaterYearStart(CONFIG.currentWaterYear), nar.WaterYearUtils.getWaterYearEnd(CONFIG.currentWaterYear));\n+\tvar isValidHydrographAndFlowDurationTimeSeriesVis = function(tsv){\n+\t\tvar valid = true;\n+\t\tvar tsvCollection = tsv.timeSeriesCollection;\n+\t\tif(tsvCollection){\n+\t\t\tvalid = tsvCollection.getAll().every(function(timeSeries){\n+\t\t\t\tvar tsvRange = timeSeries.timeRange;\n+\t\t\t\tvar dateRange = Date.range(tsvRange.startTime, tsvRange.endTime);\n+\t\t\t\tvar intersection = dateRange.intersect(lastWaterYearRange);\n+\t\t\t\tvar tsvRangeAndLastWaterYearRangeIntersect = intersection.isValid();\n+\t\t\t\treturn tsvRangeAndLastWaterYearRangeIntersect;\n+\t\t\t});\n+\t\t}\n+\t\telse{\n+\t\t\tvalid = false;\n+\t\t}\n+\t\treturn valid;\n+\t};","path":"nar_common/static/nar_ui/full_report/main.js","position":27,"original_position":27,"commit_id":"35074b29d9770fa11cfc95fd8bd3dafe69a626eb","original_commit_id":"35074b29d9770fa11cfc95fd8bd3dafe69a626eb","user":{"login":"cschroed-usgs","id":3419837,"avatar_url":"https://avatars.githubusercontent.com/u/3419837?v=3","gravatar_id":"","url":"https://api.github.com/users/cschroed-usgs","html_url":"https://github.com/cschroed-usgs","followers_url":"https://api.github.com/users/cschroed-usgs/followers","following_url":"https://api.github.com/users/cschroed-usgs/following{/other_user}","gists_url":"https://api.github.com/users/cschroed-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/cschroed-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cschroed-usgs/subscriptions","organizations_url":"https://api.github.com/users/cschroed-usgs/orgs","repos_url":"https://api.github.com/users/cschroed-usgs/repos","events_url":"https://api.github.com/users/cschroed-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/cschroed-usgs/received_events","type":"User","site_admin":false},"body":"Starting below on line 106 we populate the tsvRegistry based on the getDataAvailability responses.","created_at":"2015-07-07T20:21:00Z","updated_at":"2015-07-07T20:21:00Z","html_url":"https://github.com/USGS-CIDA/nar_ui/pull/444#discussion_r34085300","pull_request_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/pulls/444","_links":{"self":{"href":"https://api.github.com/repos/USGS-CIDA/nar_ui/pulls/comments/34085300"},"html":{"href":"https://github.com/USGS-CIDA/nar_ui/pull/444#discussion_r34085300"},"pull_request":{"href":"https://api.github.com/repos/USGS-CIDA/nar_ui/pulls/444"}}},"pull_request":{"url":"https://api.github.com/repos/USGS-CIDA/nar_ui/pulls/444","id":39410960,"html_url":"https://github.com/USGS-CIDA/nar_ui/pull/444","diff_url":"https://github.com/USGS-CIDA/nar_ui/pull/444.diff","patch_url":"https://github.com/USGS-CIDA/nar_ui/pull/444.patch","issue_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/issues/444","number":444,"state":"open","locked":false,"title":"Nawqaan 531","user":{"login":"cschroed-usgs","id":3419837,"avatar_url":"https://avatars.githubusercontent.com/u/3419837?v=3","gravatar_id":"","url":"https://api.github.com/users/cschroed-usgs","html_url":"https://github.com/cschroed-usgs","followers_url":"https://api.github.com/users/cschroed-usgs/followers","following_url":"https://api.github.com/users/cschroed-usgs/following{/other_user}","gists_url":"https://api.github.com/users/cschroed-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/cschroed-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cschroed-usgs/subscriptions","organizations_url":"https://api.github.com/users/cschroed-usgs/orgs","repos_url":"https://api.github.com/users/cschroed-usgs/repos","events_url":"https://api.github.com/users/cschroed-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/cschroed-usgs/received_events","type":"User","site_admin":false},"body":"The hydrograph requires two time series: daily flow, total nitrogen sample concentration. The hydrograph only displays data from last water year. We ran into a problem where some sites only had data from last water year in one of the required time series. We need to prohibit the visualization of the Hydrograph TimeSeriesVisualization (HTSV) if any of the two time series associated with the HTSV do not overlap with the last water year.  I moved hydrograph time range customization out of the TimeSeriesVisualization class and into the full reports' main.js. I did this because it was simpler to filter the TSVs after all of the getDataAvailability entries had all been processed, rather than trying to track state within the loop processing the getDataAvailability responses into TSVs. ","created_at":"2015-07-07T20:07:49Z","updated_at":"2015-07-07T20:21:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c7645b78807a7f6f2235f82e33120be539c95477","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/pulls/444/commits","review_comments_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/pulls/444/comments","review_comment_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/issues/444/comments","statuses_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/statuses/35074b29d9770fa11cfc95fd8bd3dafe69a626eb","head":{"label":"cschroed-usgs:NAWQAAN-531","ref":"NAWQAAN-531","sha":"35074b29d9770fa11cfc95fd8bd3dafe69a626eb","user":{"login":"cschroed-usgs","id":3419837,"avatar_url":"https://avatars.githubusercontent.com/u/3419837?v=3","gravatar_id":"","url":"https://api.github.com/users/cschroed-usgs","html_url":"https://github.com/cschroed-usgs","followers_url":"https://api.github.com/users/cschroed-usgs/followers","following_url":"https://api.github.com/users/cschroed-usgs/following{/other_user}","gists_url":"https://api.github.com/users/cschroed-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/cschroed-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cschroed-usgs/subscriptions","organizations_url":"https://api.github.com/users/cschroed-usgs/orgs","repos_url":"https://api.github.com/users/cschroed-usgs/repos","events_url":"https://api.github.com/users/cschroed-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/cschroed-usgs/received_events","type":"User","site_admin":false},"repo":{"id":17373387,"name":"nar_ui","full_name":"cschroed-usgs/nar_ui","owner":{"login":"cschroed-usgs","id":3419837,"avatar_url":"https://avatars.githubusercontent.com/u/3419837?v=3","gravatar_id":"","url":"https://api.github.com/users/cschroed-usgs","html_url":"https://github.com/cschroed-usgs","followers_url":"https://api.github.com/users/cschroed-usgs/followers","following_url":"https://api.github.com/users/cschroed-usgs/following{/other_user}","gists_url":"https://api.github.com/users/cschroed-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/cschroed-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cschroed-usgs/subscriptions","organizations_url":"https://api.github.com/users/cschroed-usgs/orgs","repos_url":"https://api.github.com/users/cschroed-usgs/repos","events_url":"https://api.github.com/users/cschroed-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/cschroed-usgs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cschroed-usgs/nar_ui","description":"NAWQA Annual Reporting User Interface","fork":true,"url":"https://api.github.com/repos/cschroed-usgs/nar_ui","forks_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/forks","keys_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/teams","hooks_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/hooks","issue_events_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/issues/events{/number}","events_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/events","assignees_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/assignees{/user}","branches_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/branches{/branch}","tags_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/tags","blobs_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/statuses/{sha}","languages_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/languages","stargazers_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/stargazers","contributors_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/contributors","subscribers_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/subscribers","subscription_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/subscription","commits_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/contents/{+path}","compare_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/merges","archive_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/downloads","issues_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/issues{/number}","pulls_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/pulls{/number}","milestones_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/milestones{/number}","notifications_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/labels{/name}","releases_url":"https://api.github.com/repos/cschroed-usgs/nar_ui/releases{/id}","created_at":"2014-03-03T17:14:02Z","updated_at":"2015-04-01T18:19:30Z","pushed_at":"2015-07-07T20:06:48Z","git_url":"git://github.com/cschroed-usgs/nar_ui.git","ssh_url":"git@github.com:cschroed-usgs/nar_ui.git","clone_url":"https://github.com/cschroed-usgs/nar_ui.git","svn_url":"https://github.com/cschroed-usgs/nar_ui","homepage":null,"size":50874,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"USGS-CIDA:master","ref":"master","sha":"ad8e315d5df6a22b95442bb7739ed42e5ea1d40e","user":{"login":"USGS-CIDA","id":918179,"avatar_url":"https://avatars.githubusercontent.com/u/918179?v=3","gravatar_id":"","url":"https://api.github.com/users/USGS-CIDA","html_url":"https://github.com/USGS-CIDA","followers_url":"https://api.github.com/users/USGS-CIDA/followers","following_url":"https://api.github.com/users/USGS-CIDA/following{/other_user}","gists_url":"https://api.github.com/users/USGS-CIDA/gists{/gist_id}","starred_url":"https://api.github.com/users/USGS-CIDA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/USGS-CIDA/subscriptions","organizations_url":"https://api.github.com/users/USGS-CIDA/orgs","repos_url":"https://api.github.com/users/USGS-CIDA/repos","events_url":"https://api.github.com/users/USGS-CIDA/events{/privacy}","received_events_url":"https://api.github.com/users/USGS-CIDA/received_events","type":"Organization","site_admin":false},"repo":{"id":17296771,"name":"nar_ui","full_name":"USGS-CIDA/nar_ui","owner":{"login":"USGS-CIDA","id":918179,"avatar_url":"https://avatars.githubusercontent.com/u/918179?v=3","gravatar_id":"","url":"https://api.github.com/users/USGS-CIDA","html_url":"https://github.com/USGS-CIDA","followers_url":"https://api.github.com/users/USGS-CIDA/followers","following_url":"https://api.github.com/users/USGS-CIDA/following{/other_user}","gists_url":"https://api.github.com/users/USGS-CIDA/gists{/gist_id}","starred_url":"https://api.github.com/users/USGS-CIDA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/USGS-CIDA/subscriptions","organizations_url":"https://api.github.com/users/USGS-CIDA/orgs","repos_url":"https://api.github.com/users/USGS-CIDA/repos","events_url":"https://api.github.com/users/USGS-CIDA/events{/privacy}","received_events_url":"https://api.github.com/users/USGS-CIDA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/USGS-CIDA/nar_ui","description":"NAWQA Annual Reporting User Interface","fork":false,"url":"https://api.github.com/repos/USGS-CIDA/nar_ui","forks_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/forks","keys_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/teams","hooks_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/hooks","issue_events_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/issues/events{/number}","events_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/events","assignees_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/assignees{/user}","branches_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/branches{/branch}","tags_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/tags","blobs_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/statuses/{sha}","languages_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/languages","stargazers_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/stargazers","contributors_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/contributors","subscribers_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/subscribers","subscription_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/subscription","commits_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/contents/{+path}","compare_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/merges","archive_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/downloads","issues_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/issues{/number}","pulls_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/pulls{/number}","milestones_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/milestones{/number}","notifications_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/labels{/name}","releases_url":"https://api.github.com/repos/USGS-CIDA/nar_ui/releases{/id}","created_at":"2014-02-28T19:16:04Z","updated_at":"2015-04-15T13:27:52Z","pushed_at":"2015-07-07T20:07:50Z","git_url":"git://github.com/USGS-CIDA/nar_ui.git","ssh_url":"git@github.com:USGS-CIDA/nar_ui.git","clone_url":"https://github.com/USGS-CIDA/nar_ui.git","svn_url":"https://github.com/USGS-CIDA/nar_ui","homepage":null,"size":52081,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":1,"forks":10,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/USGS-CIDA/nar_ui/pulls/444"},"html":{"href":"https://github.com/USGS-CIDA/nar_ui/pull/444"},"issue":{"href":"https://api.github.com/repos/USGS-CIDA/nar_ui/issues/444"},"comments":{"href":"https://api.github.com/repos/USGS-CIDA/nar_ui/issues/444/comments"},"review_comments":{"href":"https://api.github.com/repos/USGS-CIDA/nar_ui/pulls/444/comments"},"review_comment":{"href":"https://api.github.com/repos/USGS-CIDA/nar_ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/USGS-CIDA/nar_ui/pulls/444/commits"},"statuses":{"href":"https://api.github.com/repos/USGS-CIDA/nar_ui/statuses/35074b29d9770fa11cfc95fd8bd3dafe69a626eb"}}}}