From f2e079e5e9a712d6ca57e382834952fcf446c530 Mon Sep 17 00:00:00 2001 From: IJ Kim Date: Thu, 17 Jan 2019 13:40:14 -0500 Subject: [PATCH] added term_end_date__c to query the members of the board --- lib/sf/contact.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/sf/contact.rb b/lib/sf/contact.rb index 8c255f1..f17880a 100644 --- a/lib/sf/contact.rb +++ b/lib/sf/contact.rb @@ -161,9 +161,9 @@ def self.board_of_trustees_as_of(date=nil) from = 'Seat__c' date ||= Date.today date = date.strftime('%Y-%m-%d') - where = "Committee__r.Name = 'BOT (Board of Trustees)' and - Start_Date__c <= #{date} and Actual_End_Date__c >= #{date} and - Contact__c <> null" + where = "Committee__r.Name = 'BOT (Board of Trustees)' and Start_Date__c <= #{date} and + ((Actual_End_Date__c = null and Term_End_Date__c >= #{date}) or Actual_End_Date__c >= #{date}) + and Contact__c <> null" build_contacts(from, where) end