Body: <p>I think I have found an issue with merging contacts (and it also seems to manifest when assigning a different client to a case - which apparently performs a similar merging function).</p>
  
  <p>On the demo site (Drupal 7, CiviCRM 4.7 - provided by CiviHosting), I am able to reproduce the problem:</p>
  
  <ol>
  <li>Create a custom  field set that has one field which is type <code>File</code>.</li>
  <li>Apply the custom field set to individuals.</li>
  <li>Create two individual contacts (you will be merging them later) and fill in the file field for one but not the other.</li>
  <li>Try to merge the two contacts - the first contact should be the one with the file, the other should be empty (then click "add" to the file field).</li>
  <li>You will get a <code>"Sorry, this could not be provided at this time"</code> error.</li>
  </ol>
  
  <p>Similarly, on a non demo site (since the "Case" component cannot be enabled on the demo site currently), assigning the case to a new client (which performs a merge function) blows away the file reference if it has a custom field  of type file. The file is still on the server, and the case knows there should be a file, but it cannot be retrieved.</p>
  
  <p>Should these be recorded in the CiviCRM issue tracker?</p>
  
  <p>Thanks!</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-11-02T17:30:15.207Z
Comments.Text: Your error suggests a DB Error. Can you lookup the sql statement? In a drupal installation CiviCRM errors can be examinated with the Drupal logging report. See  **admin/reports/dblog**. Maybe you have to  enable it. Use Administer -> Debugging and Error Handling -> Enable Drupal Watchdog logging.
Comments.UserDisplayName: Kainuk - CiviCooP
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-11-02T18:42:30.893Z
Comments.Text: I don't have access to the CiviCRM demo site logs, but I can see if I can reproduce locally and let you know what I find...
Comments.UserDisplayName: Cheryl
Tags: <contacts><civicase><4.7><issues><duplicate-contacts>
Title: Merging contacts and cases
ThreadText: # Merging contacts and cases
  
  (Asked by: username_0 on 2016-10-17)
  
  I think I have found an issue with merging contacts (and it also seems to manifest when assigning a different client to a case - which apparently performs a similar merging function).
  
  On the demo site (Drupal 7, CiviCRM 4.7 - provided by CiviHosting), I am able to reproduce the problem:
  
  1. Create a custom field set that has one field which is type `File`.
  2. Apply the custom field set to individuals.
  3. Create two individual contacts (you will be merging them later) and fill in the file field for one but not the other.
  4. Try to merge the two contacts - the first contact should be the one with the file, the other should be empty (then click "add" to the file field).
  5. You will get a `"Sorry, this could not be provided at this time"` error.
  
  Similarly, on a non demo site (since the "Case" component cannot be enabled on the demo site currently), assigning the case to a new client (which performs a merge function) blows away the file reference if it has a custom field of type file. The file is still on the server, and the case knows there should be a file, but it cannot be retrieved.
  
  Should these be recorded in the CiviCRM issue tracker?
  
  Thanks!
  
  **Tags:** contacts, civicase, 4.7, issues, duplicate-contacts
  
  > **Comments:**
  > **username_1**: Your error suggests a DB Error. Can you lookup the sql statement? In a drupal installation CiviCRM errors can be examinated with the Drupal logging report. See  **admin/reports/dblog**. Maybe you have to  enable it. Use Administer -> Debugging and Error Handling -> Enable Drupal Watchdog logging.  
  > **username_0**: I don't have access to the CiviCRM demo site logs, but I can see if I can reproduce locally and let you know what I find...  
  
  ---
  
  ## 0 answers
  
  