Skip to content

Commit

Permalink
Merge pull request #145 from ANemcov/patch-1
Browse files Browse the repository at this point in the history
Update mail_handler_patch.rb
  • Loading branch information
jfqd authored May 11, 2020
2 parents d6e6c48 + e69249a commit 804625b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mail_handler_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def dispatch_to_default_with_helpdesk
sender_email = @email.from.first

# any cc handling needed?
custom_value = custom_field_value(issue,'cc-handling')
custom_value = custom_field_value(issue.project,'cc-handling')
if (!@email.cc.nil?) && (custom_value.value == '1')
carbon_copy = @email[:cc].formatted.join(', ')
custom_value = custom_field_value(issue,'copy-to')
Expand Down Expand Up @@ -115,7 +115,7 @@ def receive_issue_reply_with_helpdesk(issue_id, from_journal=nil)
def custom_field_value(issue,name)
custom_field = CustomField.find_by_name(name)
CustomValue.where(
"customized_id = ? AND custom_field_id = ?", issue.project.id, custom_field.id
"customized_id = ? AND custom_field_id = ?", issue.id, custom_field.id
).first
end

Expand Down

0 comments on commit 804625b

Please sign in to comment.