From b78cd44cc93ce3e6703b1f487579eec1674cc866 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Mon, 5 Mar 2018 08:58:33 -0500 Subject: [PATCH] don't bill time if not assigned to anyone EE --- lib/issue_patch.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/issue_patch.rb b/lib/issue_patch.rb index 7512c4d..756d0da 100644 --- a/lib/issue_patch.rb +++ b/lib/issue_patch.rb @@ -41,7 +41,9 @@ module IssuePatch # Create billable time entries def bill_time - + + return if assigned_to.nil? + # Get unbilled time entries spent_time = time_entries.where(qbo_billed: [false, nil]) spent_hours ||= spent_time.sum(:hours) || 0