Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RES-1892 Add ability to edit network data for groups. #651

Merged
merged 2 commits into from
May 17, 2023

Conversation

edwh
Copy link
Collaborator

@edwh edwh commented May 11, 2023

We have a network_data field for groups. This is JSON-encoded. This PR exposes editing of that for network coordinators on the groups page.

A separate text input is created with a suitable label for each entry in the JSON object.

There's a button to allow you to add a new (empty) entry, which effectively allows you to extend the schema. You can't delete them, though, as that is a bit dangerous.

I've done this for groups only, though we may choose to extend it to events too.

Copy link
Contributor

@ngm ngm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff, all looks good to me.

@edwh Out of interest, why do we need the checks for whether the network_data field is a string or not?

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
4.3% 4.3% Duplication

@edwh
Copy link
Collaborator Author

edwh commented May 17, 2023

@edwh Out of interest, why do we need the checks for whether the network_data field is a string or not?

I wondered if you'd ask. I think it was to do with how Laravel handles JSON fields on different database versions. That should be transparent to the user whether or not it is stored in the DB as a JSON or TEXT field. But I saw a case in testing when it wasn't, so I put that in and didn't think much further.

@edwh edwh merged commit 3abfe52 into develop May 17, 2023
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