Patch #4807 » done_ratio.patch
| mail_handler.rb 2010-02-11 16:23:57.000000000 +0100 | ||
|---|---|---|
|
category = (get_keyword(:category) && project.issue_categories.find_by_name(get_keyword(:category)))
|
||
|
priority = (get_keyword(:priority) && IssuePriority.find_by_name(get_keyword(:priority)))
|
||
|
status = (get_keyword(:status) && IssueStatus.find_by_name(get_keyword(:status)))
|
||
|
done_ratio = (get_keyword(:done_ratio) && Integer(get_keyword(:done_ratio))) rescue nil
|
||
|
# check permission
|
||
|
unless @@handler_options[:no_permission_check]
|
||
| ... | ... | |
|
end
|
||
|
h
|
||
|
end
|
||
|
issue.done_ratio = done_ratio if(done_ratio && (done_ratio % 10 == 0) && (0..100).include?(done_ratio))
|
||
|
issue.description = cleaned_up_text_body
|
||
|
# add To and Cc as watchers before saving so the watchers can reply to Redmine
|
||
|
add_watchers(issue)
|
||
| ... | ... | |
|
# Adds a note to an existing issue
|
||
|
def receive_issue_reply(issue_id)
|
||
|
status = (get_keyword(:status) && IssueStatus.find_by_name(get_keyword(:status)))
|
||
|
done_ratio = (get_keyword(:done_ratio) && Integer(get_keyword(:done_ratio))) rescue nil
|
||
|
issue = Issue.find_by_id(issue_id)
|
||
|
return unless issue
|
||
| ... | ... | |
|
if status && issue.new_statuses_allowed_to(user).include?(status)
|
||
|
issue.status = status
|
||
|
end
|
||
|
issue.done_ratio = done_ratio if(done_ratio && (done_ratio % 10 == 0) && (0..100).include?(done_ratio))
|
||
|
issue.save!
|
||
|
logger.info "MailHandler: issue ##{issue.id} updated by #{user}" if logger && logger.info
|
||
|
journal
|
||