{"action":"created","issue":{"url":"https://api.github.com/repos/taskadapter/redmine-java-api/issues/171","labels_url":"https://api.github.com/repos/taskadapter/redmine-java-api/issues/171/labels{/name}","comments_url":"https://api.github.com/repos/taskadapter/redmine-java-api/issues/171/comments","events_url":"https://api.github.com/repos/taskadapter/redmine-java-api/issues/171/events","html_url":"https://github.com/taskadapter/redmine-java-api/pull/171","id":55074929,"number":171,"title":"Implement clearing issue fields","user":{"login":"matthiasblaesing","id":2179736,"avatar_url":"https://avatars.githubusercontent.com/u/2179736?v=3","gravatar_id":"","url":"https://api.github.com/users/matthiasblaesing","html_url":"https://github.com/matthiasblaesing","followers_url":"https://api.github.com/users/matthiasblaesing/followers","following_url":"https://api.github.com/users/matthiasblaesing/following{/other_user}","gists_url":"https://api.github.com/users/matthiasblaesing/gists{/gist_id}","starred_url":"https://api.github.com/users/matthiasblaesing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthiasblaesing/subscriptions","organizations_url":"https://api.github.com/users/matthiasblaesing/orgs","repos_url":"https://api.github.com/users/matthiasblaesing/repos","events_url":"https://api.github.com/users/matthiasblaesing/events{/privacy}","received_events_url":"https://api.github.com/users/matthiasblaesing/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-01-21T20:49:03Z","updated_at":"2015-06-24T10:42:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/taskadapter/redmine-java-api/pulls/171","html_url":"https://github.com/taskadapter/redmine-java-api/pull/171","diff_url":"https://github.com/taskadapter/redmine-java-api/pull/171.diff","patch_url":"https://github.com/taskadapter/redmine-java-api/pull/171.patch"},"body":"This is the final version of the patch to support to clearing issue fields. (fixes bugs #61 and #117). \r\n\r\nThe idea: Don't take null as an indicator not to send an update. Instead track changes (every call to a setter is considered a change) to fields and evaluate them when building the request for the server. This allows null values for the \"normal\" meaning: Unset value.\r\n\r\nThe implementation allows \"old school\" users to continue using \"their way\" - new users and users wanting to fix their updating bug have to switch to \"UpdateTracking\". There are tests added:\r\n\r\n1. Proofing that the tracking works (IssueTest.java)\r\n2. Proofing that unsetting a parent issue works with API (IssueManagerTest.java)\r\n\r\nThere is more that could be done (apply this principle to other objects), but the pressure comes from the issues - and to be frank that is my main intention (I use the java api in the netbeans issue integration)."},"comment":{"url":"https://api.github.com/repos/taskadapter/redmine-java-api/issues/comments/114820127","html_url":"https://github.com/taskadapter/redmine-java-api/pull/171#issuecomment-114820127","issue_url":"https://api.github.com/repos/taskadapter/redmine-java-api/issues/171","id":114820127,"user":{"login":"keritaf","id":1034979,"avatar_url":"https://avatars.githubusercontent.com/u/1034979?v=3","gravatar_id":"","url":"https://api.github.com/users/keritaf","html_url":"https://github.com/keritaf","followers_url":"https://api.github.com/users/keritaf/followers","following_url":"https://api.github.com/users/keritaf/following{/other_user}","gists_url":"https://api.github.com/users/keritaf/gists{/gist_id}","starred_url":"https://api.github.com/users/keritaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keritaf/subscriptions","organizations_url":"https://api.github.com/users/keritaf/orgs","repos_url":"https://api.github.com/users/keritaf/repos","events_url":"https://api.github.com/users/keritaf/events{/privacy}","received_events_url":"https://api.github.com/users/keritaf/received_events","type":"User","site_admin":false},"created_at":"2015-06-24T10:42:17Z","updated_at":"2015-06-24T10:42:17Z","body":"'Updated or not' is a bit different from 'defined or not'. In my opinion Guava's `Optional` or custom implementation of it looks better (blame Scala, which I'm using most of the time - optional values are widely used there)"}}