mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-02-13 01:03:59 -05:00
added tracker nil check
This commit is contained in:
@@ -101,3 +101,4 @@ en:
|
|||||||
notice_issue_not_found: "Issue not found"
|
notice_issue_not_found: "Issue not found"
|
||||||
customer_details: "Customer Details"
|
customer_details: "Customer Details"
|
||||||
notice_error_project_nil: "The issue's project is nil, set project to: "
|
notice_error_project_nil: "The issue's project is nil, set project to: "
|
||||||
|
notice_error_tracker_nil: "The issue's tracker is nil, set tracker to: "
|
||||||
@@ -24,6 +24,11 @@ module RedmineQbo
|
|||||||
context[:controller].flash[:error] = I18n.t(:notice_error_project_nil) + context[:issue].project.to_s
|
context[:controller].flash[:error] = I18n.t(:notice_error_project_nil) + context[:issue].project.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if context[:issue].tracker.nil?
|
||||||
|
context[:issue].tracker = trackers_for_select(context[:issue]).first
|
||||||
|
context[:controller].flash[:error] = I18n.t(:notice_error_tracker_nil) + context[:issue].tracker.to_s
|
||||||
|
end
|
||||||
|
|
||||||
return context
|
return context
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user