vtiger 0.6.9 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/vtiger/base.rb +8 -0
  2. metadata +5 -5
@@ -45,6 +45,10 @@ class CampaignList < ActiveRecord::Base
45
45
  mysql_results=CampaignList.connection.execute("select vtiger_account.email1 as 'email', vtiger_account.accountname, vtiger_campaignaccountrel.campaignid from vtiger_account left join vtiger_campaignaccountrel on vtiger_account.accountid=vtiger_campaignaccountrel.accountid where vtiger_campaignaccountrel.campaignid=#{id} and emailoptout=0;;")
46
46
  CampaignList.convert(mysql_results)
47
47
  end
48
+ def self.find_contacts_by_customfield(field)
49
+ mysql_results=CampaignList.connection.execute("select vtiger_contactdetails.contactid as 'id',vtiger_contactdetails.email as 'email',#{field} as 'tsipid' from vtiger_contactdetails left join vtiger_contactscf on vtiger_contactdetails.contactid=vtiger_contactscf.contactid where #{field} > '0';")
50
+ CampaignList.convert(mysql_results)
51
+ end
48
52
  end
49
53
  module Vtiger
50
54
  class Base
@@ -248,6 +252,10 @@ def get_contacts_from_campaign(campaignid)
248
252
  #self.campaigndb.find_contacts_by_campaign(self.campaigndb,campaignid)
249
253
  CampaignList.find_contacts_by_campaign(campaignid)
250
254
 
255
+ end
256
+ def get_contacts_by_cf(field)
257
+ #self.campaigndb.find_contacts_by_campaign(self.campaigndb,campaignid)
258
+ CampaignList.find_contacts_by_customfield(field)
251
259
  end
252
260
  end #clase base
253
261
  end #moduble
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vtiger
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 6
9
- - 9
10
- version: 0.6.9
8
+ - 7
9
+ - 0
10
+ version: 0.7.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Scott Sproule
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-30 00:00:00 +08:00
18
+ date: 2011-04-18 00:00:00 +08:00
19
19
  default_executable:
20
20
  dependencies: []
21
21