{"number":15,"pull_request":{"number":15,"issue_url":"https://github.com/caorongjin/liferay-portal/issues/15","head":{"label":"hhuijser:LPS-22482","repo":{"master_branch":null,"name":"liferay-portal","created_at":"2011-06-20T21:02:54Z","size":2784,"clone_url":"https://github.com/hhuijser/liferay-portal.git","private":false,"updated_at":"2011-10-26T12:03:13Z","watchers":2,"ssh_url":"git@github.com:hhuijser/liferay-portal.git","url":"https://api.github.com/repos/hhuijser/liferay-portal","git_url":"git://github.com/hhuijser/liferay-portal.git","language":"Java","fork":true,"svn_url":"https://svn.github.com/hhuijser/liferay-portal","id":1925908,"pushed_at":"2011-10-26T12:03:13Z","open_issues":1,"homepage":"http://liferay.com","description":"","forks":0,"html_url":"https://github.com/hhuijser/liferay-portal","owner":{"avatar_url":"https://secure.gravatar.com/avatar/da2cd23d88e5869f5417409eacc2d89e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"da2cd23d88e5869f5417409eacc2d89e","url":"https://api.github.com/users/hhuijser","id":862245,"login":"hhuijser"}},"sha":"67357e6aa2de1cb1a7abcb65d39ad35bae475659","ref":"LPS-22482","user":{"avatar_url":"https://secure.gravatar.com/avatar/da2cd23d88e5869f5417409eacc2d89e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"da2cd23d88e5869f5417409eacc2d89e","url":"https://api.github.com/users/hhuijser","id":862245,"login":"hhuijser"}},"merged_by":null,"created_at":"2011-10-26T12:12:40Z","changed_files":1,"merged":false,"body":"Hey Alex,\r\n\r\nI see that you just made a commit for LPS-22482, but I think there are some other problems with that if-else statement:\r\n\r\n1. entire thread gets deleted when there are multiple pending messages, but no approved ones.\r\n2. thread does NOT get deleted after the (only) draft message gets deleted.\r\n3. message count is incorrect when deleting a pending/inactive/rejected message\r\n\r\nSimply delete thread when there is only one message, update when there is more.\r\nStatus of the messages is really not important.\r\nEven if you remove the single approved message in a thread with the remaining messages being all drafts, it's OK to leave the thread with the drafts.\r\nIt won't show up for anyone but the people who created the drafts.\r\n\r\nAnyway, here is my 2 cents...\r\n\r\nHugo","comments":0,"title":"LPS-22482","additions":8,"diff_url":"https://github.com/caorongjin/liferay-portal/pull/15.diff","updated_at":"2011-10-26T12:12:40Z","url":"https://api.github.com/repos/caorongjin/liferay-portal/pulls/15","id":434852,"patch_url":"https://github.com/caorongjin/liferay-portal/pull/15.patch","mergeable":null,"merged_at":null,"commits":1,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/da2cd23d88e5869f5417409eacc2d89e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"da2cd23d88e5869f5417409eacc2d89e","url":"https://api.github.com/users/hhuijser","id":862245,"login":"hhuijser"},"deletions":6,"html_url":"https://github.com/caorongjin/liferay-portal/pull/15","base":{"label":"caorongjin:master","repo":{"master_branch":null,"name":"liferay-portal","created_at":"2011-07-27T23:05:14Z","size":428,"clone_url":"https://github.com/caorongjin/liferay-portal.git","private":false,"updated_at":"2011-10-26T12:12:40Z","watchers":2,"ssh_url":"git@github.com:caorongjin/liferay-portal.git","url":"https://api.github.com/repos/caorongjin/liferay-portal","git_url":"git://github.com/caorongjin/liferay-portal.git","language":"Java","fork":true,"svn_url":"https://svn.github.com/caorongjin/liferay-portal","id":2115752,"pushed_at":"2011-10-26T12:12:40Z","open_issues":1,"homepage":"http://liferay.com","description":"","forks":0,"html_url":"https://github.com/caorongjin/liferay-portal","owner":{"avatar_url":"https://secure.gravatar.com/avatar/1a0f2fc345bf2cb70c4bcfafc4cf06c7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"1a0f2fc345bf2cb70c4bcfafc4cf06c7","url":"https://api.github.com/users/caorongjin","id":862055,"login":"caorongjin"}},"sha":"b23af78adc9d4be6f61147529d78bf4908166c8b","ref":"master","user":{"avatar_url":"https://secure.gravatar.com/avatar/1a0f2fc345bf2cb70c4bcfafc4cf06c7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"1a0f2fc345bf2cb70c4bcfafc4cf06c7","url":"https://api.github.com/users/caorongjin","id":862055,"login":"caorongjin"}},"state":"open"},"action":"opened"}