{"action":"created","issue":{"url":"https://api.github.com/repos/annikoff/redmine_plugin_computed_custom_field/issues/9","labels_url":"https://api.github.com/repos/annikoff/redmine_plugin_computed_custom_field/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/annikoff/redmine_plugin_computed_custom_field/issues/9/comments","events_url":"https://api.github.com/repos/annikoff/redmine_plugin_computed_custom_field/issues/9/events","html_url":"https://github.com/annikoff/redmine_plugin_computed_custom_field/issues/9","id":111602997,"number":9,"title":"Support percentage output format","user":{"login":"hishamsaid","id":513053,"avatar_url":"https://avatars.githubusercontent.com/u/513053?v=3","gravatar_id":"","url":"https://api.github.com/users/hishamsaid","html_url":"https://github.com/hishamsaid","followers_url":"https://api.github.com/users/hishamsaid/followers","following_url":"https://api.github.com/users/hishamsaid/following{/other_user}","gists_url":"https://api.github.com/users/hishamsaid/gists{/gist_id}","starred_url":"https://api.github.com/users/hishamsaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hishamsaid/subscriptions","organizations_url":"https://api.github.com/users/hishamsaid/orgs","repos_url":"https://api.github.com/users/hishamsaid/repos","events_url":"https://api.github.com/users/hishamsaid/events{/privacy}","received_events_url":"https://api.github.com/users/hishamsaid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-15T12:03:31Z","updated_at":"2015-10-16T09:41:20Z","closed_at":null,"body":"Support percentage output format similar to the natively supported \"% Done\" field"},"comment":{"url":"https://api.github.com/repos/annikoff/redmine_plugin_computed_custom_field/issues/comments/148668604","html_url":"https://github.com/annikoff/redmine_plugin_computed_custom_field/issues/9#issuecomment-148668604","issue_url":"https://api.github.com/repos/annikoff/redmine_plugin_computed_custom_field/issues/9","id":148668604,"user":{"login":"Atmis","id":5329747,"avatar_url":"https://avatars.githubusercontent.com/u/5329747?v=3","gravatar_id":"","url":"https://api.github.com/users/Atmis","html_url":"https://github.com/Atmis","followers_url":"https://api.github.com/users/Atmis/followers","following_url":"https://api.github.com/users/Atmis/following{/other_user}","gists_url":"https://api.github.com/users/Atmis/gists{/gist_id}","starred_url":"https://api.github.com/users/Atmis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Atmis/subscriptions","organizations_url":"https://api.github.com/users/Atmis/orgs","repos_url":"https://api.github.com/users/Atmis/repos","events_url":"https://api.github.com/users/Atmis/events{/privacy}","received_events_url":"https://api.github.com/users/Atmis/received_events","type":"User","site_admin":false},"created_at":"2015-10-16T09:41:20Z","updated_at":"2015-10-16T09:41:20Z","body":"Here is an example where I use a string output to show the % difference between estimated and spent time, negative or positive :\r\n\r\n```ruby\r\nif self.total_spent_hours != 0 && self.estimated_hours !=0 then\r\n  if self.total_spent_hours < self.estimated_hours then\r\n    ((self.total_spent_hours-self.estimated_hours)/self.estimated_hours * 100).round(2).to_s+\"%\"\r\n  else\r\n    \"+\"+((self.total_spent_hours-self.estimated_hours)/self.estimated_hours * 100).round(2).to_s+\"%\"\r\n  end\r\nend\r\n```\r\n \r\nYou can even play with HTML code (green for negative, red for positive as an example), it displays fin in the issue list, but unfortunately not in the issue view.\r\nHope this helps :)\r\n\r\nBy the way, thanks Annikoff, this is a fantastic and powerfull plugin!"}}