Skip to content

Conversation

@jeffm2001
Copy link
Collaborator

Description

Starting with v14, if your organization has "extra" profile fields configured, attempting to edit a user results in a blank screen and an error in the javascript console: "Attempted to assign to readonly property"

Checklist:

  • I have manually tested my changes on desktop and mobile
  • The test suite passes locally with my changes
  • If my change is a UI change, I have attached a screenshot to the description section of this pull request
  • My change is 300 lines of code or less, or has a documented reason in the description why it’s longer
  • I have made any necessary changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • My PR is labeled [WIP] if it is in progress

@engelhartrueben engelhartrueben self-assigned this Oct 18, 2024
@engelhartrueben
Copy link
Collaborator

Hi Jeff. I am unable to replicate this because I cannot figure out how to configure extra fields to users.
I do see the user table has the extra column, how would I go about enabling this?
Code looks good.

@jeffm2001
Copy link
Collaborator Author

Yeah, I wasn't surprised that this bug didn't get caught because this feature never got documented and I imagine not many are using it.

You can enable extra profile fields by configuring them in the organization.features column in the database. For example:

{ 
   "profile_fields": [
        {
            "label": "Affiliate",
            "name": "affiliate"
        },
        {
            "label": "Local Number",
            "name": "local"
        }
    ]
}

Possibly, you might need to populate the fields for a use and then edit again in order to trigger the bug.

Also worth noting that there's an old open PR from WFP #1961 that does add a UI for configuring fields along with other improvements, but it would need a rebase and testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants