Answers.Body: <p>It seems a probable bug. <br>
  I ran an import of a file containing same field as my custom field and the field was updated by the information mentioned in csv and did not retain its default value. So, Yes, the issue was replicated. <br>
  The value of custom field is only retained when we create a contact through CiviCRM and not importing, so it looks to be an inconsistency in the behaviour while importing. An issue will be opened for the same in issue tracker of CiviCRM. <br> Thanks for reporting!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-02T18:24:21.427Z
Answers.Text: While people may differ on what they want to occur, I'd prefer it to be import when set to view only.
Answers.UserDisplayName: Andy Burns
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-01T21:04:48.717Z
Answers.LastActivityDate: 2020-03-01T21:04:48.717Z
Answers.UserDisplayName: Kartik Kathuria
Body: <p>Checking this option in a custom field <strong>View Only?  Is this field set by PHP code (via a custom hook). This field will not be updated by CiviCRM.</strong></p>
  
  <p>I had read that it would not update upon import. However I just ran an import and a field did import that was marked as view only. For a previous import I recall that it did not update. </p>
  
  <p>What is the expected behavior here? I thought it was not to update.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-01T19:34:41.613Z
Comments.Text: can you clarify. if you do not want it to import then why include the data in the import?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-01T19:55:06.687Z
Comments.Text: Using the view only option is an easy way to lock down a field for users that should not be editable. We only want the field to be edited thru imports e.g. Secretary of State data. I remove the View Only option when I import.
Comments.UserDisplayName: Andy Burns
Tags: <custom-fields><import>
Title: Expected import behavior when setting custom field to view only
ThreadText: # Expected import behavior when setting custom field to view only
  
  (Asked by: username_0 on 2020-02-29)
  
  Checking this option in a custom field **View Only? Is this field set by PHP code (via a custom hook). This field will not be updated by CiviCRM.**
  
  I had read that it would not update upon import. However I just ran an import and a field did import that was marked as view only. For a previous import I recall that it did not update.
  
  What is the expected behavior here? I thought it was not to update.
  
  **Tags:** custom-fields, import
  
  > **Comments:**
  > **username_1**: can you clarify. if you do not want it to import then why include the data in the import?  
  > **username_0**: Using the view only option is an easy way to lock down a field for users that should not be editable. We only want the field to be edited thru imports e.g. Secretary of State data. I remove the View Only option when I import.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-03-01. Score: 2
  
  It seems a probable bug.   
  I ran an import of a file containing same field as my custom field and the field was updated by the information mentioned in csv and did not retain its default value. So, Yes, the issue was replicated.   
  The value of custom field is only retained when we create a contact through CiviCRM and not importing, so it looks to be an inconsistency in the behaviour while importing. An issue will be opened for the same in issue tracker of CiviCRM.   
   Thanks for reporting!
  
  > **Comments:**
  > **username_0**: While people may differ on what they want to occur, I'd prefer it to be import when set to view only.  
  
  ---
  
  