128c128
<     comments.scan(/([\s\(\[,-]|^)((#{kw_regexp})[\s:]+)?(#\d+(\s+@#{TIMELOG_RE})?([\s,;&]+#\d+(\s+@#{TIMELOG_RE})?)*)(?=[[:punct:]]|\s|<|$)/i) do |match|
---
>     comments.scan(/([\s\(\[,-]|^)((#{kw_regexp})[\s:]+)?(#\d+((\s+@#{TIMELOG_RE})?(\s+\d{1,2}%)?)([\s,;&]+#\d+(\s+@#{TIMELOG_RE})?(\s+\d{1,2}%)?)*)(?=[[:punct:]]|\s|<|$)/i) do |match|
132c132
<       refs.scan(/#(\d+)(\s+@#{TIMELOG_RE})?/).each do |m|
---
>       refs.scan(/#(\d+)((\s+@#{TIMELOG_RE})?(\s+(\d{1,2})%)?)/).each do |m|
133a134
>         ratio = m[18]
137a139
>           log_ratio(issue, ratio) if ratio && Setting.commit_logtime_enabled?
236a239,255
>     Redmine::Hook.call_hook(:model_changeset_scan_commit_for_issue_ids_pre_issue_update,
>                             { :changeset => self, :issue => issue })
>     unless issue.save
>       logger.warn("Issue ##{issue.id} could not be saved by changeset #{id}: #{issue.errors.full_messages}") if logger
>     end
>     issue
>   end
>   
>   def log_ratio(issue, ratio)
>   
>     # the issue may have been updated by the closure of another one (eg. duplicate)
>     issue.reload
>     # don't change the status is the issue is closed
>     return if issue.status.is_closed?
> 
>     journal = issue.init_journal(user || User.anonymous, ll(Setting.default_language, :text_status_changed_by_changeset, text_tag(issue.project)))
>     issue.done_ratio = ratio.to_i
