Page 1 of 1

Campaign DNC status acting as system DNC

PostPosted: Wed Apr 18, 2018 3:53 pm
by karlb
Hello,

I'm trying to figure something out. We have many campaigns on our system and each campaign has campaign specific status's. Campaigns share the same status but have different meanings on their separate campaigns.

For example, campaign A status "25" = DNC. campaign B status "25" = Not Interested.

The issue we're having is that when status 25 is set to DNC = Y on campaign A status's, it's also DNC'ing every status 25 on campaign B. This is causing all these numbers to be DNC'd that should never have been.

The SVN build I'm on is 2491. I know it's a little old, but I think I found the query that's causing the issue. I checked the most current SVN and nothing has changed, so if I'm right, my current SVN shouldn't matter.

In the file: vdc_db_query.php (Line #10167 on SVN 2491. Line #11671 on the latest SVN - 2965 )
Code: Select all
$stmt = "SELECT status FROM vicidial_campaign_statuses where dnc='Y';";


I think this should be updated to:
Code: Select all
$stmt = "SELECT status FROM vicidial_campaign_statuses where dnc='Y' and campaign_id='$campaign';";


Can someone confirm that if I do this it'll fix my issue without unintentionally messing up something else?

Thanks!

Re: Campaign DNC status acting as system DNC

PostPosted: Wed Apr 18, 2018 4:18 pm
by mflorell
Yes, that should work, and it is a bug that you've found.

I just fixed this(and 8 other similar queries) in svn/trunk.

Thanks!

Re: Campaign DNC status acting as system DNC

PostPosted: Wed Apr 18, 2018 6:57 pm
by karlb
Thank you for confirming! I updated the other 8 in my dialer as well.