{"action":"created","comment":{"url":"https://api.github.com/repos/systers/peacetrack-android/pulls/comments/190434124","pull_request_review_id":122808652,"id":190434124,"diff_hunk":"@@ -0,0 +1,264 @@\n+/**\r\n+ * \r\n+ */\r\n+package com.peacetrack.views.measurements;\r\n+\r\n+import android.app.AlertDialog;\r\n+import android.app.DatePickerDialog;\r\n+import android.app.Dialog;\r\n+import android.content.DialogInterface;\r\n+import android.content.Intent;\r\n+import android.os.Bundle;\r\n+import android.support.v7.app.ActionBarActivity;\r\n+import android.view.MenuItem;\r\n+import android.view.View;\r\n+import android.view.View.OnClickListener;\r\n+import android.widget.ArrayAdapter;\r\n+import android.widget.Button;\r\n+import android.widget.DatePicker;\r\n+import android.widget.EditText;\r\n+import android.widget.Spinner;\r\n+import android.widget.Toast;\r\n+\r\n+import com.peacetrack.R;\r\n+import com.peacetrack.backend.cohorts.CohortsDAO;\r\n+import com.peacetrack.backend.measurements.MeasurementDAO;\r\n+import com.peacetrack.models.cohorts.Cohort;\r\n+import com.peacetrack.models.measurements.Measurement;\r\n+\r\n+import java.util.ArrayList;\r\n+import java.util.Calendar;\r\n+\r\n+public class AddMeasurementForCohortActivity extends ActionBarActivity implements\r\n+\t\tOnClickListener {\r\n+\r\n+\tprivate boolean isEdit;\r\n+\tprivate String oldTitle;\r\n+\tprivate int cohortId;\r\n+\r\n+\tprivate Measurement measurement;\r\n+\r\n+\tprivate Button addMeasurementButton;\r\n+\r\n+\tprivate EditText titleEditText;\r\n+\tprivate EditText descriptionEditText;\r\n+\tprivate EditText outcomeEditText;\r\n+\r\n+\tstatic final int DATE_DIALOG_ID = 100;\r\n+\tprivate EditText dateEditText;\r\n+\tprivate int year, month, day;\r\n+\r\n+\tprivate Spinner outcomeSpinner;\r\n+\tprivate String[] outcomes = {\"Outcome 1\", \"Outcome 2\", \"Outcome 3\", \"Outcome 4\", \"Outcome 5\"};\r\n+\tprivate ArrayAdapter<String> outcomeDataAdapter;\r","path":"PeaceTrack/app/src/main/java/com/peacetrack/views/measurements/AddMeasurementForCohortActivity.java","position":53,"original_position":53,"commit_id":"0260727102f7e6e902b7637854cfc74118dc68aa","original_commit_id":"0260727102f7e6e902b7637854cfc74118dc68aa","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: [Perhaps 'outcomeDataAdapter' could be replaced by a local variable.](https://app.codacy.com/app/MeepyMay/peacetrack-android/pullRequest?prid=1299374)","created_at":"2018-05-24T00:05:38Z","updated_at":"2018-05-24T00:05:38Z","html_url":"https://github.com/systers/peacetrack-android/pull/14#discussion_r190434124","pull_request_url":"https://api.github.com/repos/systers/peacetrack-android/pulls/14","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/systers/peacetrack-android/pulls/comments/190434124"},"html":{"href":"https://github.com/systers/peacetrack-android/pull/14#discussion_r190434124"},"pull_request":{"href":"https://api.github.com/repos/systers/peacetrack-android/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/systers/peacetrack-android/pulls/14","id":56946196,"html_url":"https://github.com/systers/peacetrack-android/pull/14","diff_url":"https://github.com/systers/peacetrack-android/pull/14.diff","patch_url":"https://github.com/systers/peacetrack-android/pull/14.patch","issue_url":"https://api.github.com/repos/systers/peacetrack-android/issues/14","number":14,"state":"open","locked":false,"title":"Fixed bug in \"total members\" field .","user":{"login":"yatna","id":8321130,"avatar_url":"https://avatars3.githubusercontent.com/u/8321130?v=4","gravatar_id":"","url":"https://api.github.com/users/yatna","html_url":"https://github.com/yatna","followers_url":"https://api.github.com/users/yatna/followers","following_url":"https://api.github.com/users/yatna/following{/other_user}","gists_url":"https://api.github.com/users/yatna/gists{/gist_id}","starred_url":"https://api.github.com/users/yatna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yatna/subscriptions","organizations_url":"https://api.github.com/users/yatna/orgs","repos_url":"https://api.github.com/users/yatna/repos","events_url":"https://api.github.com/users/yatna/events{/privacy}","received_events_url":"https://api.github.com/users/yatna/received_events","type":"User","site_admin":false},"body":"The total no. of members must always be less than tha no. of males + no. of females. Earlier there was no function to check this. Now if this happens a toast is displayed asking the user to enter correct details.\n![screenshot_2016-01-22-02-11-59](https://cloud.githubusercontent.com/assets/8321130/12523938/d3b66844-c17f-11e5-8838-d3bcd4e0179e.png)\n","created_at":"2016-01-22T21:48:07Z","updated_at":"2018-05-24T00:05:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"549b711a7c41983f96538fbc7f6ee7e52bd9c799","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/systers/peacetrack-android/pulls/14/commits","review_comments_url":"https://api.github.com/repos/systers/peacetrack-android/pulls/14/comments","review_comment_url":"https://api.github.com/repos/systers/peacetrack-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/systers/peacetrack-android/issues/14/comments","statuses_url":"https://api.github.com/repos/systers/peacetrack-android/statuses/0260727102f7e6e902b7637854cfc74118dc68aa","head":{"label":"yatna:maleFemaleSum","ref":"maleFemaleSum","sha":"0260727102f7e6e902b7637854cfc74118dc68aa","user":{"login":"yatna","id":8321130,"avatar_url":"https://avatars3.githubusercontent.com/u/8321130?v=4","gravatar_id":"","url":"https://api.github.com/users/yatna","html_url":"https://github.com/yatna","followers_url":"https://api.github.com/users/yatna/followers","following_url":"https://api.github.com/users/yatna/following{/other_user}","gists_url":"https://api.github.com/users/yatna/gists{/gist_id}","starred_url":"https://api.github.com/users/yatna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yatna/subscriptions","organizations_url":"https://api.github.com/users/yatna/orgs","repos_url":"https://api.github.com/users/yatna/repos","events_url":"https://api.github.com/users/yatna/events{/privacy}","received_events_url":"https://api.github.com/users/yatna/received_events","type":"User","site_admin":false},"repo":{"id":50137080,"name":"peacetrack-android","full_name":"yatna/peacetrack-android","owner":{"login":"yatna","id":8321130,"avatar_url":"https://avatars3.githubusercontent.com/u/8321130?v=4","gravatar_id":"","url":"https://api.github.com/users/yatna","html_url":"https://github.com/yatna","followers_url":"https://api.github.com/users/yatna/followers","following_url":"https://api.github.com/users/yatna/following{/other_user}","gists_url":"https://api.github.com/users/yatna/gists{/gist_id}","starred_url":"https://api.github.com/users/yatna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yatna/subscriptions","organizations_url":"https://api.github.com/users/yatna/orgs","repos_url":"https://api.github.com/users/yatna/repos","events_url":"https://api.github.com/users/yatna/events{/privacy}","received_events_url":"https://api.github.com/users/yatna/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yatna/peacetrack-android","description":null,"fork":true,"url":"https://api.github.com/repos/yatna/peacetrack-android","forks_url":"https://api.github.com/repos/yatna/peacetrack-android/forks","keys_url":"https://api.github.com/repos/yatna/peacetrack-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yatna/peacetrack-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yatna/peacetrack-android/teams","hooks_url":"https://api.github.com/repos/yatna/peacetrack-android/hooks","issue_events_url":"https://api.github.com/repos/yatna/peacetrack-android/issues/events{/number}","events_url":"https://api.github.com/repos/yatna/peacetrack-android/events","assignees_url":"https://api.github.com/repos/yatna/peacetrack-android/assignees{/user}","branches_url":"https://api.github.com/repos/yatna/peacetrack-android/branches{/branch}","tags_url":"https://api.github.com/repos/yatna/peacetrack-android/tags","blobs_url":"https://api.github.com/repos/yatna/peacetrack-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yatna/peacetrack-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yatna/peacetrack-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/yatna/peacetrack-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yatna/peacetrack-android/statuses/{sha}","languages_url":"https://api.github.com/repos/yatna/peacetrack-android/languages","stargazers_url":"https://api.github.com/repos/yatna/peacetrack-android/stargazers","contributors_url":"https://api.github.com/repos/yatna/peacetrack-android/contributors","subscribers_url":"https://api.github.com/repos/yatna/peacetrack-android/subscribers","subscription_url":"https://api.github.com/repos/yatna/peacetrack-android/subscription","commits_url":"https://api.github.com/repos/yatna/peacetrack-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/yatna/peacetrack-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/yatna/peacetrack-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/yatna/peacetrack-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/yatna/peacetrack-android/contents/{+path}","compare_url":"https://api.github.com/repos/yatna/peacetrack-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yatna/peacetrack-android/merges","archive_url":"https://api.github.com/repos/yatna/peacetrack-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yatna/peacetrack-android/downloads","issues_url":"https://api.github.com/repos/yatna/peacetrack-android/issues{/number}","pulls_url":"https://api.github.com/repos/yatna/peacetrack-android/pulls{/number}","milestones_url":"https://api.github.com/repos/yatna/peacetrack-android/milestones{/number}","notifications_url":"https://api.github.com/repos/yatna/peacetrack-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yatna/peacetrack-android/labels{/name}","releases_url":"https://api.github.com/repos/yatna/peacetrack-android/releases{/id}","deployments_url":"https://api.github.com/repos/yatna/peacetrack-android/deployments","created_at":"2016-01-21T21:13:27Z","updated_at":"2016-01-21T21:13:30Z","pushed_at":"2016-01-22T21:30:49Z","git_url":"git://github.com/yatna/peacetrack-android.git","ssh_url":"git@github.com:yatna/peacetrack-android.git","clone_url":"https://github.com/yatna/peacetrack-android.git","svn_url":"https://github.com/yatna/peacetrack-android","homepage":null,"size":12611,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"systers:master","ref":"master","sha":"47d3daf977bb1656856b019eb9f7d6430d184928","user":{"login":"systers","id":6520415,"avatar_url":"https://avatars0.githubusercontent.com/u/6520415?v=4","gravatar_id":"","url":"https://api.github.com/users/systers","html_url":"https://github.com/systers","followers_url":"https://api.github.com/users/systers/followers","following_url":"https://api.github.com/users/systers/following{/other_user}","gists_url":"https://api.github.com/users/systers/gists{/gist_id}","starred_url":"https://api.github.com/users/systers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systers/subscriptions","organizations_url":"https://api.github.com/users/systers/orgs","repos_url":"https://api.github.com/users/systers/repos","events_url":"https://api.github.com/users/systers/events{/privacy}","received_events_url":"https://api.github.com/users/systers/received_events","type":"Organization","site_admin":false},"repo":{"id":19045576,"name":"peacetrack-android","full_name":"systers/peacetrack-android","owner":{"login":"systers","id":6520415,"avatar_url":"https://avatars0.githubusercontent.com/u/6520415?v=4","gravatar_id":"","url":"https://api.github.com/users/systers","html_url":"https://github.com/systers","followers_url":"https://api.github.com/users/systers/followers","following_url":"https://api.github.com/users/systers/following{/other_user}","gists_url":"https://api.github.com/users/systers/gists{/gist_id}","starred_url":"https://api.github.com/users/systers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/systers/subscriptions","organizations_url":"https://api.github.com/users/systers/orgs","repos_url":"https://api.github.com/users/systers/repos","events_url":"https://api.github.com/users/systers/events{/privacy}","received_events_url":"https://api.github.com/users/systers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/systers/peacetrack-android","description":"Peace Track helps hold accountability for the work Volunteers conduct in the field. ","fork":true,"url":"https://api.github.com/repos/systers/peacetrack-android","forks_url":"https://api.github.com/repos/systers/peacetrack-android/forks","keys_url":"https://api.github.com/repos/systers/peacetrack-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/systers/peacetrack-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/systers/peacetrack-android/teams","hooks_url":"https://api.github.com/repos/systers/peacetrack-android/hooks","issue_events_url":"https://api.github.com/repos/systers/peacetrack-android/issues/events{/number}","events_url":"https://api.github.com/repos/systers/peacetrack-android/events","assignees_url":"https://api.github.com/repos/systers/peacetrack-android/assignees{/user}","branches_url":"https://api.github.com/repos/systers/peacetrack-android/branches{/branch}","tags_url":"https://api.github.com/repos/systers/peacetrack-android/tags","blobs_url":"https://api.github.com/repos/systers/peacetrack-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/systers/peacetrack-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/systers/peacetrack-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/systers/peacetrack-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/systers/peacetrack-android/statuses/{sha}","languages_url":"https://api.github.com/repos/systers/peacetrack-android/languages","stargazers_url":"https://api.github.com/repos/systers/peacetrack-android/stargazers","contributors_url":"https://api.github.com/repos/systers/peacetrack-android/contributors","subscribers_url":"https://api.github.com/repos/systers/peacetrack-android/subscribers","subscription_url":"https://api.github.com/repos/systers/peacetrack-android/subscription","commits_url":"https://api.github.com/repos/systers/peacetrack-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/systers/peacetrack-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/systers/peacetrack-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/systers/peacetrack-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/systers/peacetrack-android/contents/{+path}","compare_url":"https://api.github.com/repos/systers/peacetrack-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/systers/peacetrack-android/merges","archive_url":"https://api.github.com/repos/systers/peacetrack-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/systers/peacetrack-android/downloads","issues_url":"https://api.github.com/repos/systers/peacetrack-android/issues{/number}","pulls_url":"https://api.github.com/repos/systers/peacetrack-android/pulls{/number}","milestones_url":"https://api.github.com/repos/systers/peacetrack-android/milestones{/number}","notifications_url":"https://api.github.com/repos/systers/peacetrack-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/systers/peacetrack-android/labels{/name}","releases_url":"https://api.github.com/repos/systers/peacetrack-android/releases{/id}","deployments_url":"https://api.github.com/repos/systers/peacetrack-android/deployments","created_at":"2014-04-22T20:45:22Z","updated_at":"2018-04-25T18:00:59Z","pushed_at":"2018-04-25T17:06:26Z","git_url":"git://github.com/systers/peacetrack-android.git","ssh_url":"git@github.com:systers/peacetrack-android.git","clone_url":"https://github.com/systers/peacetrack-android.git","svn_url":"https://github.com/systers/peacetrack-android","homepage":"","size":13159,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":15,"license":null,"forks":19,"open_issues":15,"watchers":2,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/systers/peacetrack-android/pulls/14"},"html":{"href":"https://github.com/systers/peacetrack-android/pull/14"},"issue":{"href":"https://api.github.com/repos/systers/peacetrack-android/issues/14"},"comments":{"href":"https://api.github.com/repos/systers/peacetrack-android/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/systers/peacetrack-android/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/systers/peacetrack-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/systers/peacetrack-android/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/systers/peacetrack-android/statuses/0260727102f7e6e902b7637854cfc74118dc68aa"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"codacy-bot"}}