{"action":"created","comment":{"url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/pulls/comments/68275591","id":68275591,"diff_hunk":"@@ -259,6 +261,50 @@ private static void testAddGroupedCustomFields(MambuEntityType parentEntity, Dem\n \t\treturn customFieldValues;\r\n \t}\r\n \r\n+\t// Tests PATCHing a list of custom fields\r\n+\tprivate static void testUpdateMultiplaCustomFields() throws MambuApiException {\r\n+\t\tSystem.out.println(\"\\nIn testUpdateAndDeleteCustomFieldValues\");\r\n+\r\n+\t\t// get supported entities\r\n+\t\tMambuEntityType[] supportedEntities = CustomFieldValueService.getSupportedEntities();\r\n+\t\t// Iterate through supported entity types and Update custom fields\r\n+\t\tfor (MambuEntityType parentEntity : supportedEntities) {\r\n+\t\t\tupdateFieldsForParentEntity(parentEntity);\r\n+\t\t}\r\n+\t}\r\n+\r\n+\t/**\r\n+\t * Searches for custom fields for the entity passed as parameter to this method, updates their value.\r\n+\t * \r\n+\t * @param parentEntityType\r\n+\t *            The ParentEntityType whose custom field values will be updated\r\n+\t * @throws MambuApiException\r\n+\t */\r\n+\tpublic static void updateFieldsForParentEntity(MambuEntityType parentEntityType) throws MambuApiException {\r\n+\t\tSystem.out.println(\"\\nIn testUpdateMultiplaCustomFields()\");\r\n+\r\n+\t\tDemoEntityParams entityParams = DemoEntityParams.getEntityParams(parentEntityType);\r\n+\r\n+\t\tList<CustomFieldValue> customFieldValues = DemoEntityParams.getCustomFieldValues(parentEntityType,\r\n+\t\t\t\tentityParams);\r\n+\r\n+\t\t// return if there are no custom field values for the entity\r\n+\t\tif (customFieldValues.isEmpty()) {\r\n+\t\t\treturn;\r\n+\t\t}\r\n+\t\t// change the value\r\n+\t\tfor (CustomFieldValue customFieldValue : customFieldValues) {\r\n+\t\t\tcustomFieldValue.setValue(\"Value patched today:\" + new Date());\r\n+\t\t}\r","path":"src/demo/DemoTestCustomFiledValueService.java","position":109,"original_position":109,"commit_id":"a59dbf3e2417ba4070510cdee0b0022ddb8a8bd1","original_commit_id":"a59dbf3e2417ba4070510cdee0b0022ddb8a8bd1","user":{"login":"mdanilkis","id":3077634,"avatar_url":"https://avatars.githubusercontent.com/u/3077634?v=3","gravatar_id":"","url":"https://api.github.com/users/mdanilkis","html_url":"https://github.com/mdanilkis","followers_url":"https://api.github.com/users/mdanilkis/followers","following_url":"https://api.github.com/users/mdanilkis/following{/other_user}","gists_url":"https://api.github.com/users/mdanilkis/gists{/gist_id}","starred_url":"https://api.github.com/users/mdanilkis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdanilkis/subscriptions","organizations_url":"https://api.github.com/users/mdanilkis/orgs","repos_url":"https://api.github.com/users/mdanilkis/repos","events_url":"https://api.github.com/users/mdanilkis/events{/privacy}","received_events_url":"https://api.github.com/users/mdanilkis/received_events","type":"User","site_admin":false},"body":"This would not work in the general cases: CustomFieldValue have DataType, so this would only work Text (String) values, not for numbers or \"selection\" types. Try using DemoUtil.makeNewCustomFieldValue(value) here which updates \"per type\".","created_at":"2016-06-23T17:15:44Z","updated_at":"2016-06-23T17:15:44Z","html_url":"https://github.com/mdanilkis/Mambu-APIs-Java/pull/2#discussion_r68275591","pull_request_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/pulls/comments/68275591"},"html":{"href":"https://github.com/mdanilkis/Mambu-APIs-Java/pull/2#discussion_r68275591"},"pull_request":{"href":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/pulls/2","id":74739183,"html_url":"https://github.com/mdanilkis/Mambu-APIs-Java/pull/2","diff_url":"https://github.com/mdanilkis/Mambu-APIs-Java/pull/2.diff","patch_url":"https://github.com/mdanilkis/Mambu-APIs-Java/pull/2.patch","issue_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/issues/2","number":2,"state":"open","locked":false,"title":"Added updates for patch group and group expanded","user":{"login":"acostros","id":18039369,"avatar_url":"https://avatars.githubusercontent.com/u/18039369?v=3","gravatar_id":"","url":"https://api.github.com/users/acostros","html_url":"https://github.com/acostros","followers_url":"https://api.github.com/users/acostros/followers","following_url":"https://api.github.com/users/acostros/following{/other_user}","gists_url":"https://api.github.com/users/acostros/gists{/gist_id}","starred_url":"https://api.github.com/users/acostros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acostros/subscriptions","organizations_url":"https://api.github.com/users/acostros/orgs","repos_url":"https://api.github.com/users/acostros/repos","events_url":"https://api.github.com/users/acostros/events{/privacy}","received_events_url":"https://api.github.com/users/acostros/received_events","type":"User","site_admin":false},"body":"Added updates for patch group and group expanded tests so they can support patching of group roles and group members","created_at":"2016-06-22T07:58:48Z","updated_at":"2016-06-23T17:15:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6ebc64b851676dc0f92744f574e63a8f5622b792","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/pulls/2/commits","review_comments_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/pulls/2/comments","review_comment_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/issues/2/comments","statuses_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/statuses/a59dbf3e2417ba4070510cdee0b0022ddb8a8bd1","head":{"label":"acostros:master","ref":"master","sha":"a59dbf3e2417ba4070510cdee0b0022ddb8a8bd1","user":{"login":"acostros","id":18039369,"avatar_url":"https://avatars.githubusercontent.com/u/18039369?v=3","gravatar_id":"","url":"https://api.github.com/users/acostros","html_url":"https://github.com/acostros","followers_url":"https://api.github.com/users/acostros/followers","following_url":"https://api.github.com/users/acostros/following{/other_user}","gists_url":"https://api.github.com/users/acostros/gists{/gist_id}","starred_url":"https://api.github.com/users/acostros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acostros/subscriptions","organizations_url":"https://api.github.com/users/acostros/orgs","repos_url":"https://api.github.com/users/acostros/repos","events_url":"https://api.github.com/users/acostros/events{/privacy}","received_events_url":"https://api.github.com/users/acostros/received_events","type":"User","site_admin":false},"repo":{"id":60098080,"name":"Mambu-APIs-Java","full_name":"acostros/Mambu-APIs-Java","owner":{"login":"acostros","id":18039369,"avatar_url":"https://avatars.githubusercontent.com/u/18039369?v=3","gravatar_id":"","url":"https://api.github.com/users/acostros","html_url":"https://github.com/acostros","followers_url":"https://api.github.com/users/acostros/followers","following_url":"https://api.github.com/users/acostros/following{/other_user}","gists_url":"https://api.github.com/users/acostros/gists{/gist_id}","starred_url":"https://api.github.com/users/acostros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acostros/subscriptions","organizations_url":"https://api.github.com/users/acostros/orgs","repos_url":"https://api.github.com/users/acostros/repos","events_url":"https://api.github.com/users/acostros/events{/privacy}","received_events_url":"https://api.github.com/users/acostros/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/acostros/Mambu-APIs-Java","description":"Java Library for working the the Mambu APIs","fork":true,"url":"https://api.github.com/repos/acostros/Mambu-APIs-Java","forks_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/forks","keys_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/teams","hooks_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/hooks","issue_events_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/issues/events{/number}","events_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/events","assignees_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/assignees{/user}","branches_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/branches{/branch}","tags_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/tags","blobs_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/git/refs{/sha}","trees_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/statuses/{sha}","languages_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/languages","stargazers_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/stargazers","contributors_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/contributors","subscribers_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/subscribers","subscription_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/subscription","commits_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/commits{/sha}","git_commits_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/git/commits{/sha}","comments_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/comments{/number}","issue_comment_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/issues/comments{/number}","contents_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/contents/{+path}","compare_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/merges","archive_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/downloads","issues_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/issues{/number}","pulls_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/pulls{/number}","milestones_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/milestones{/number}","notifications_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/labels{/name}","releases_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/releases{/id}","deployments_url":"https://api.github.com/repos/acostros/Mambu-APIs-Java/deployments","created_at":"2016-05-31T14:45:40Z","updated_at":"2016-05-31T14:45:41Z","pushed_at":"2016-06-23T11:58:17Z","git_url":"git://github.com/acostros/Mambu-APIs-Java.git","ssh_url":"git@github.com:acostros/Mambu-APIs-Java.git","clone_url":"https://github.com/acostros/Mambu-APIs-Java.git","svn_url":"https://github.com/acostros/Mambu-APIs-Java","homepage":"www.mambu.com","size":87548,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"mdanilkis:master","ref":"master","sha":"e2022a07834d50c173ba0adfe80484ae8482648a","user":{"login":"mdanilkis","id":3077634,"avatar_url":"https://avatars.githubusercontent.com/u/3077634?v=3","gravatar_id":"","url":"https://api.github.com/users/mdanilkis","html_url":"https://github.com/mdanilkis","followers_url":"https://api.github.com/users/mdanilkis/followers","following_url":"https://api.github.com/users/mdanilkis/following{/other_user}","gists_url":"https://api.github.com/users/mdanilkis/gists{/gist_id}","starred_url":"https://api.github.com/users/mdanilkis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdanilkis/subscriptions","organizations_url":"https://api.github.com/users/mdanilkis/orgs","repos_url":"https://api.github.com/users/mdanilkis/repos","events_url":"https://api.github.com/users/mdanilkis/events{/privacy}","received_events_url":"https://api.github.com/users/mdanilkis/received_events","type":"User","site_admin":false},"repo":{"id":7281087,"name":"Mambu-APIs-Java","full_name":"mdanilkis/Mambu-APIs-Java","owner":{"login":"mdanilkis","id":3077634,"avatar_url":"https://avatars.githubusercontent.com/u/3077634?v=3","gravatar_id":"","url":"https://api.github.com/users/mdanilkis","html_url":"https://github.com/mdanilkis","followers_url":"https://api.github.com/users/mdanilkis/followers","following_url":"https://api.github.com/users/mdanilkis/following{/other_user}","gists_url":"https://api.github.com/users/mdanilkis/gists{/gist_id}","starred_url":"https://api.github.com/users/mdanilkis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdanilkis/subscriptions","organizations_url":"https://api.github.com/users/mdanilkis/orgs","repos_url":"https://api.github.com/users/mdanilkis/repos","events_url":"https://api.github.com/users/mdanilkis/events{/privacy}","received_events_url":"https://api.github.com/users/mdanilkis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mdanilkis/Mambu-APIs-Java","description":"Java Library for working the the Mambu APIs","fork":true,"url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java","forks_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/forks","keys_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/teams","hooks_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/hooks","issue_events_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/issues/events{/number}","events_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/events","assignees_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/assignees{/user}","branches_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/branches{/branch}","tags_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/tags","blobs_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/git/refs{/sha}","trees_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/statuses/{sha}","languages_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/languages","stargazers_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/stargazers","contributors_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/contributors","subscribers_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/subscribers","subscription_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/subscription","commits_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/commits{/sha}","git_commits_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/git/commits{/sha}","comments_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/comments{/number}","issue_comment_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/issues/comments{/number}","contents_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/contents/{+path}","compare_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/merges","archive_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/downloads","issues_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/issues{/number}","pulls_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/pulls{/number}","milestones_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/milestones{/number}","notifications_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/labels{/name}","releases_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/releases{/id}","deployments_url":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/deployments","created_at":"2012-12-22T00:46:59Z","updated_at":"2015-05-08T04:03:00Z","pushed_at":"2016-06-23T11:58:17Z","git_url":"git://github.com/mdanilkis/Mambu-APIs-Java.git","ssh_url":"git@github.com:mdanilkis/Mambu-APIs-Java.git","clone_url":"https://github.com/mdanilkis/Mambu-APIs-Java.git","svn_url":"https://github.com/mdanilkis/Mambu-APIs-Java","homepage":"www.mambu.com","size":87231,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/pulls/2"},"html":{"href":"https://github.com/mdanilkis/Mambu-APIs-Java/pull/2"},"issue":{"href":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/issues/2"},"comments":{"href":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/mdanilkis/Mambu-APIs-Java/statuses/a59dbf3e2417ba4070510cdee0b0022ddb8a8bd1"}}}}
{"actor":{"display_login":"mdanilkis"}}