Answers.Body: <p>I also stumbled across this bug - when a user already exists, trying to import and assign tags using the email/dedupe failed.</p>
  
  <p>Mentioned in one of the jira issues <a href="https://issues.civicrm.org/jira/browse/CRM-20739" rel="nofollow noreferrer">https://issues.civicrm.org/jira/browse/CRM-20739</a> is "When performing a contact import using the "fill" option and using a dedupe rule to match (i.e. not including the contact ID in the import structure), the contacts will not be added to a group."</p>
  
  <p>I found that if I import based on the contact ID, the additional tag was added - may not be a great solution for everyone but it's a workaround I can live with for now.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-26T23:04:48.803Z
Answers.LastActivityDate: 2017-12-27T13:39:11.733Z
Answers.LastEditDate: 2017-12-27T13:39:11.733Z
Answers.UserDisplayName: RayWright
Answers.Body: <p>To bypass this problem, I use Yes/No custom field to import the data "Belonging to A group". Then I use an advanced search to select those contacts and add them to the A group.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-03T21:50:09.790Z
Answers.LastActivityDate: 2017-10-03T21:50:09.790Z
Answers.UserDisplayName: Charles Letaillieur
Answers.Body: <p>I think I face the same issue.</p>
  
  <p>I tried many thing (import more than email for this 2nd import, change group visibility, use a new group, etc.) but it is still the same.</p>
  
  <p>The import report always mentions "One contact added to this existing group."
  But when I go to group panel, the group has no new contact.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-03T10:34:59.103Z
Answers.Text: Which version of CiviCRM are you working with Charles? https://issues.civicrm.org/jira/browse/CRM-20739 was fixed in version 4.7.23 so if you are on an earlier version it might be worth updating and see if it resolves your problem.
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-28T12:49:05.850Z
Answers.Text: I confirm ! Problem solved by updating to CiviCRM 4.7.29
Answers.UserDisplayName: Charles Letaillieur
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-03T07:52:51.867Z
Answers.LastActivityDate: 2017-10-03T07:52:51.867Z
Answers.UserDisplayName: Charles Letaillieur
Body: <p>I have a list of contacts (names and email addresses). I know that all of these contacts are in the Civi database, but I want to add a tag or a group to all of them, and i have the list in a CSV file. What I should be able to do is simply import the contacts, setting 'Update' or perhaps 'Fill' as my duplicate matching option, and set the tag and/or group to be set in the import settings. Just tried it - several times, using various different options, and it failed every time, reporting that 0 records had been tagged (or added to the group). This is with Civi 4.7.19.</p>
  
  <p>Is there a specific set of options that I need to know about to get this to work? This post (<a href="https://civicrm.stackexchange.com/questions/16921/how-to-tag-a-contact-when-importing-possible-duplicates">How to tag a contact when importing possible duplicates</a>) suggests that this should just work. I followed that example and it failed.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-27T18:20:45.340Z
Comments.Text: I see the bug report lists this as fixed, but I'm still experiencing it on version 4.7.22. @Graham, did the update resolve it for you?
Comments.UserDisplayName: Eric H
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-29T14:40:45.123Z
Comments.Text: Hi Erik. https://issues.civicrm.org/jira/browse/CRM-20739 reports as fixed for 4.7.23 and that version is not yet released, so for the time being I'm still trying to work around this.
Comments.UserDisplayName: Graham
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-19T20:36:27.317Z
Comments.Text: Hi Graham. Sounds odd. The only situation I know of where Tagging as the last step of an import is when a timeout issue happens (which is why i strongly advocate adding a custom field purely for the purposes of tracking the import process - and if you do that then you could do a search and Tag if the import tagging fails. But that is an extra step and should not be required. Did you confirm on Demo?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-20T07:52:00.013Z
Comments.Text: With the demo site I was successfully able to import a set of new contacts and add a new tag on import. If I then removed the tag from those contacts and ran a second import form the same file, using the 'update' option, and requesting that the tag be added on import, no tag was added.
Comments.UserDisplayName: Graham
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-20T08:11:40.313Z
Comments.Text: Looks like this is linked to https://issues.civicrm.org/jira/browse/CRM-20742
Comments.UserDisplayName: Graham
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-20T08:12:01.273Z
Comments.Text: And https://issues.civicrm.org/jira/browse/CRM-20739
Comments.UserDisplayName: Graham
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-20T20:54:45.153Z
Comments.Text: Couldn't you just use the api explorer?
Comments.UserDisplayName: nielo
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-21T12:59:52.057Z
Comments.Text: @nielo - How would that work in this context?
Comments.UserDisplayName: Graham
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-21T20:22:45.373Z
Comments.Text: I mean, as a workaround and if you don't want to code yourself, you could pass any id list (for instance imported contact ids) into api explorer and add a tag. 
  Entity: Tag,
  Action: Create,
  [Your tag parameters],
  Api-Chaining: EntityTag,
  RefTable: Contacts,
  RefIds in [your id list]
Comments.UserDisplayName: nielo
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-22T14:11:36.457Z
Comments.Text: Thanks, that makes sense. In my use case I didn't have IDs in my list of contacts. All I knew was that they were already in the database, so wanted to use the import to find them and tag them.
Comments.UserDisplayName: Graham
Tags: <import><groups><tags><data-import>
Title: How to add a tag or group to a set of pre-existing contacts via import?
ThreadText: # How to add a tag or group to a set of pre-existing contacts via import?
  
  (Asked by: username_0 on 2017-06-19)
  
  I have a list of contacts (names and email addresses). I know that all of these contacts are in the Civi database, but I want to add a tag or a group to all of them, and i have the list in a CSV file. What I should be able to do is simply import the contacts, setting 'Update' or perhaps 'Fill' as my duplicate matching option, and set the tag and/or group to be set in the import settings. Just tried it - several times, using various different options, and it failed every time, reporting that 0 records had been tagged (or added to the group). This is with Civi 4.7.19.
  
  Is there a specific set of options that I need to know about to get this to work? This post ([How to tag a contact when importing possible duplicates](https://civicrm.stackexchange.com/questions/16921/how-to-tag-a-contact-when-importing-possible-duplicates)) suggests that this should just work. I followed that example and it failed.
  
  **Tags:** import, groups, tags, data-import
  
  > **Comments:**
  > **username_2**: Hi username_0. Sounds odd. The only situation I know of where Tagging as the last step of an import is when a timeout issue happens (which is why i strongly advocate adding a custom field purely for the purposes of tracking the import process - and if you do that then you could do a search and Tag if the import tagging fails. But that is an extra step and should not be required. Did you confirm on Demo?  
  > **username_0**: With the demo site I was successfully able to import a set of new contacts and add a new tag on import. If I then removed the tag from those contacts and ran a second import form the same file, using the 'update' option, and requesting that the tag be added on import, no tag was added.  
  > **username_0**: Looks like this is linked to https://issues.civicrm.org/jira/browse/CRM-20742  
  > **username_0**: And https://issues.civicrm.org/jira/browse/CRM-20739  
  > **username_3**: Couldn't you just use the api explorer?  
  > **username_0**: @username_3 - How would that work in this context?  
  > **username_3**: I mean, as a workaround and if you don't want to code yourself, you could pass any id list (for instance imported contact ids) into api explorer and add a tag.  Entity: Tag, Action: Create, [Your tag parameters], Api-Chaining: EntityTag, RefTable: Contacts, RefIds in [your id list]  
  > **username_0**: Thanks, that makes sense. In my use case I didn't have IDs in my list of contacts. All I knew was that they were already in the database, so wanted to use the import to find them and tag them.  
  > **username_1**: I see the bug report lists this as fixed, but I'm still experiencing it on version 4.7.22. @username_0, did the update resolve it for you?  
  > **username_0**: Hi Erik. https://issues.civicrm.org/jira/browse/CRM-20739 reports as fixed for 4.7.23 and that version is not yet released, so for the time being I'm still trying to work around this.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_4 on 2017-12-26. Score: 1
  
  I also stumbled across this bug - when a user already exists, trying to import and assign tags using the email/dedupe failed.
  
  Mentioned in one of the jira issues <https://issues.civicrm.org/jira/browse/CRM-20739> is "When performing a contact import using the "fill" option and using a dedupe rule to match (i.e. not including the contact ID in the import structure), the contacts will not be added to a group."
  
  I found that if I import based on the contact ID, the additional tag was added - may not be a great solution for everyone but it's a workaround I can live with for now.
  
  
  ---
  
  ### Answer by username_5 on 2017-10-03. Score: 1
  
  To bypass this problem, I use Yes/No custom field to import the data "Belonging to A group". Then I use an advanced search to select those contacts and add them to the A group.
  
  
  ---
  
  ### Answer by username_5 on 2017-10-03. Score: 0
  
  I think I face the same issue.
  
  I tried many thing (import more than email for this 2nd import, change group visibility, use a new group, etc.) but it is still the same.
  
  The import report always mentions "One contact added to this existing group."
  But when I go to group panel, the group has no new contact.
  
  > **Comments:**
  > **username_0**: Which version of CiviCRM are you working with Charles? https://issues.civicrm.org/jira/browse/CRM-20739 was fixed in version 4.7.23 so if you are on an earlier version it might be worth updating and see if it resolves your problem.  
  > **username_5**: I confirm ! Problem solved by updating to CiviCRM 4.7.29  
  
  ---
  
  