Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • CiviCRM Core CiviCRM Core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,443
    • Issues 1,443
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • CiviCRM CoreCiviCRM Core
  • Issues
  • #1626
Closed
Open
Created Mar 02, 2020 by kartik1000@kartik1000

Unexpected import behaviour when set the setting to view only for custom fields.

While creating the custom field there is a option
View Only? Is this field set by PHP code (via a custom hook). This field will not be updated by CiviCRM.
Even after selecting this option when we import a 'csv' containing one of the custom fields as its column, the value of the custom field is changed from the default value to the value mentioned in the 'csv'. Even when the custom field is not present in the csv, civicrm still assigns the field as empty but not the default value. This was replicated on various versions from 4.7 to 5.22.1. The error was also reported on https://civicrm.stackexchange.com/questions/34903/expected-import-behavior-when-setting-custom-field-to-view-only .

Expected Behaviour

CiviCRM should not change the default value of the custom field since it is only a view only field and should retain the default for every case.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking