From 168c53b71b790ddf9ffed80ccf7938fdd84dbe48 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Sat, 2 Jan 2016 10:25:20 -0500 Subject: [PATCH] Added nil check for qbo_customer_id when closing --- lib/qbo_hook_listener.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/qbo_hook_listener.rb b/lib/qbo_hook_listener.rb index 7e1cb3f..78dce53 100644 --- a/lib/qbo_hook_listener.rb +++ b/lib/qbo_hook_listener.rb @@ -67,7 +67,7 @@ class QboHookListener < Redmine::Hook::ViewListener # If the issue is closed, then create a new billable time activty for the customer # TODO Add configuration settings for employee_id, hourly_rate, item_id - if issue.status.is_closed? then + if issue.status.is_closed? and not issue.qbo_customer_id.nil? then time_entry.description = issue.subject time_entry.employee_id = 59 time_entry.customer_id = issue.qbo_customer_id