CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Syntax for Contact is in Trash
Pages: [1]

Author Topic: Syntax for Contact is in Trash  (Read 1145 times)

Shai

  • I post frequently
  • ***
  • Posts: 202
  • Karma: 8
    • Content2zero
  • CiviCRM version: 4.3.x, 4.4.x, 4.5.x
  • CMS version: Drupal 7
  • MySQL version: 5.5.x
  • PHP version: 5.3.x, 5.4.x
Syntax for Contact is in Trash
May 15, 2012, 06:47:39 am
Hi,

I'm searching using the search builder using:

Individual --> Contact is in Trash --> = --> 1

That returns 0 records when I know there are about 20 that have been trashed.

Ideas?

Shai
Don't miss out! Sign up now for free expert advice on CiviCRM's new StackExchange help site.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Syntax for Contact is in Trash
May 15, 2012, 09:48:33 am
Can you confirm your figure of 20 by looking in the DB for contacts with is_deleted = 1 ?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Shai

  • I post frequently
  • ***
  • Posts: 202
  • Karma: 8
    • Content2zero
  • CiviCRM version: 4.3.x, 4.4.x, 4.5.x
  • CMS version: Drupal 7
  • MySQL version: 5.5.x
  • PHP version: 5.3.x, 5.4.x
Re: Syntax for Contact is in Trash
May 15, 2012, 10:34:42 am
Hershel,

Thanks for the response.

My my db I ran:

Code: [Select]
SELECT id from civicrm_contact WHERE is_deleted = 1
returns 1,329 rows. (It appears that I had been inadvertently deleting instead of "permanently deleting" a lot more than I had thought. Hence my need for this!)

Also, I just went to drupal.demo.civicrm.org and had the same result:

First I deleted 50 contacts. Then I went to form builder and searched on:

Quote
Individual --> Contact is in Trash --> = --> 1

and got:
Quote
  No matches found for:
Contact is in Trash = "1" ...AND...
Contact Type - 'Individual'

Shai
Don't miss out! Sign up now for free expert advice on CiviCRM's new StackExchange help site.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Syntax for Contact is in Trash
May 15, 2012, 10:36:44 am
I just went to

http://drupal.demo.civicrm.org/civicrm/contact/search/advanced?reset=1

I.E. Advanced Search. I selected "Search in Trash" and clicked Search.

I got 51 results.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Shai

  • I post frequently
  • ***
  • Posts: 202
  • Karma: 8
    • Content2zero
  • CiviCRM version: 4.3.x, 4.4.x, 4.5.x
  • CMS version: Drupal 7
  • MySQL version: 5.5.x
  • PHP version: 5.3.x, 5.4.x
Re: Syntax for Contact is in Trash
May 15, 2012, 11:06:02 am
Great, thanks. I had never noticed that box before. And in fact, I to do a Firefox search of the page to find it! Amazing how you can miss what is in front of you.

Since the search builder's "Individual --> Contact is in Trash --> = --> 1" is not working, should I file a bug report?

Shai
Don't miss out! Sign up now for free expert advice on CiviCRM's new StackExchange help site.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Syntax for Contact is in Trash
May 15, 2012, 11:42:23 am
Contact is in Trash IS NOT NULL

finds 113 records.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Shai

  • I post frequently
  • ***
  • Posts: 202
  • Karma: 8
    • Content2zero
  • CiviCRM version: 4.3.x, 4.4.x, 4.5.x
  • CMS version: Drupal 7
  • MySQL version: 5.5.x
  • PHP version: 5.3.x, 5.4.x
Re: Syntax for Contact is in Trash
May 15, 2012, 02:24:44 pm
WTF???

How do you explain the discrepency?

Advanced search search in trash returns 51 records (which are the ones that I put in the trash).

Contents in Trash is Not Null returns 113 records, some of them in the Trash and some not.
Don't miss out! Sign up now for free expert advice on CiviCRM's new StackExchange help site.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Syntax for Contact is in Trash
May 16, 2012, 04:49:18 am
I used Trash is Not Null just as an experiment. In the DB it's a 1 or 0 so zero is actually "not null." I'm not sure how it's meant to work. Hopefully someone else can answer here.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Syntax for Contact is in Trash
May 17, 2012, 07:34:36 am
Quote from: Hershel on May 16, 2012, 04:49:18 am
Hopefully someone else can answer here.

But if not, I would suggest you post an Issue.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Syntax for Contact is in Trash
May 17, 2012, 10:31:39 am

Note that search builder is not being actively maintained or bug fixed. We are looking for someone in the community to take over that funcitonality

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Syntax for Contact is in Trash

This forum was archived on 2017-11-26.