Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 979
    • Issues 979
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • Core
  • Issues
  • #1626

Closed
Open
Opened 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
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: dev/core#1626