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) »
  • Contact reference field bug - ok to file?
Pages: [1]

Author Topic: Contact reference field bug - ok to file?  (Read 581 times)

LindseyM

  • I post frequently
  • ***
  • Posts: 229
  • Karma: 8
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3.6
Contact reference field bug - ok to file?
May 29, 2012, 01:13:54 pm
We are using an autocomplete contact reference field to assign some access to views for our group leaders.  When I start to write a surname in the box it pulls up both current and deleted names making it very difficult to know who to choose if we have a current/deleted record for the same person. 

I have tested this on the demo and the same thing happens - it pulls up deleted people as well as current ones as pre-fill suggestions.  I presume this is a bug. Is it ok to file straight onto Jira... and am I ok to put it as Major as it currently means assigning permissions is an interesting guessing game!


Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Contact reference field bug - ok to file?
May 29, 2012, 02:24:28 pm
Agreed. Should not be displaying deleted contacts. You can file an issue. As a work around (and in fact this might be better for your use case) - create a static or smart group of all or a subset of Individuals using Advanced Search. Then select that group in the "Limit List to Group" field in the contact reference custom field settings. I think that should prevent the deleted contacts from showing up.
Protect your investment in CiviCRM by  becoming a Member!

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Contact reference field bug - ok to file?
May 29, 2012, 05:09:32 pm
The contact_get api should default to only getting is_deleted = 0.

I think it's likely this is fixed in the api (& might need backporting)


Code: [Select]
/*
 * Adjust Metadata for Get action
 *
 * @param array $params array or parameters determined by getfields
 */
function _civicrm_api3_contact_get_spec(&$params) {
  $params['contact_is_deleted']['api.default'] = 0;
}

Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

LindseyM

  • I post frequently
  • ***
  • Posts: 229
  • Karma: 8
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
  • MySQL version: 5.5
  • PHP version: 5.3.6
Re: Contact reference field bug - ok to file?
May 30, 2012, 01:15:07 am
Thanks all.

Eileen - I'm afraid I'm not tech competent so can't do the backport you mentioned so will continue to file the bug for now.  Hope that's ok.
Dave
- I have just gone through our trash and permanently deleted them all so no more show up in the pre-fill for now.  On a different but related note, is there any plan to make group custom fields searchable at some point?
« Last Edit: May 30, 2012, 01:23:08 am by LindseyM »

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Contact reference field bug - ok to file?
May 30, 2012, 03:54:05 pm
Eileen confirmed that this is fixed in the upcoming 4.2 release (and hence we closed the issue).

No plans AFAIK at this time to support searching Group custom fields.
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Contact reference field bug - ok to file?

This forum was archived on 2017-11-26.