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

fix: saving relation column fails if class has required fields #1937

Merged
merged 2 commits into from
Dec 5, 2021
Merged

fix: saving relation column fails if class has required fields #1937

merged 2 commits into from
Dec 5, 2021

Conversation

fn-faisal
Copy link
Member

@fn-faisal fn-faisal commented Dec 1, 2021

New Pull Request Checklist

Issue Description

If a Class has required columns along with relation columns. Upon clicking on the relation column for a row, as we're taken to the relation class, as the add row button is clicked to add row, after we enter the data and hit save button, we get the error Please enter all the required fields.

Approach

When the relation class opens via clicking on view relation button in the parent class, the required field validation logic tries to fetch Class Name from the param. In the this.props.params object for relations, the className is still set to the Parent class's name.
To resolve this, the class name is fetched from the this.state.newObject instead as it contains the name of the class which is about to be saved.

  • A changelog entry is created automatically using the pull request title (do not manually add a changelog entry)

@parse-github-assistant
Copy link

parse-github-assistant bot commented Dec 1, 2021

Thanks for opening this pull request!

  • ❌ Please edit your post and use the provided template when creating a new pull request. This helps everyone to understand your post better and asks for essential information to quicker review the pull request.

@mtrezza mtrezza linked an issue Dec 5, 2021 that may be closed by this pull request
4 tasks
@mtrezza mtrezza changed the title fix: relation class name from object instead of params fix: saving relation column fails if class has required fields Dec 5, 2021
@mtrezza mtrezza merged commit c67db08 into parse-community:alpha Dec 5, 2021
parseplatformorg pushed a commit that referenced this pull request Dec 5, 2021
# [3.3.0-alpha.17](3.3.0-alpha.16...3.3.0-alpha.17) (2021-12-05)

### Bug Fixes

* saving relation column fails if class has required fields ([#1937](#1937)) ([c67db08](c67db08))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 3.3.0-alpha.17

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Dec 5, 2021
parseplatformorg pushed a commit that referenced this pull request Jan 1, 2022
# [4.0.0-beta.1](3.3.0-beta.3...4.0.0-beta.1) (2022-01-01)

### Bug Fixes

* bump graphiql from 1.4.6 to 1.4.7 ([#1920](#1920)) ([26c0dfa](26c0dfa))
* context menu in data browser not opening for cell of type number ([#1913](#1913)) ([fb0e3a9](fb0e3a9))
* opening filter menu in data browser leads to blank page ([#1958](#1958)) ([750e8b1](750e8b1))
* saving relation column fails if class has required fields ([#1937](#1937)) ([c67db08](c67db08))
* security upgrade qrcode from 1.4.4 to 1.5.0 ([#1930](#1930)) ([244e1bb](244e1bb))

### Features

* upgrade graphiql from 1.4.7 to 1.5.1 ([#1943](#1943)) ([ebb1f66](ebb1f66))
* upgrade graphql from 15.7.0 to 16.0.0 ([#1926](#1926)) ([7c94e51](7c94e51))
* upgrade parse from 3.3.1 to 3.4.0 ([#1942](#1942)) ([13a250e](13a250e))

### BREAKING CHANGES

* The minimum required Node.js version is 12.22.0. ([7c94e51](7c94e51))
* The required Node version was increased to >=12.20.0. ([ebb1f66](ebb1f66))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 4.0.0-beta.1

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Jan 1, 2022
parseplatformorg pushed a commit that referenced this pull request Feb 6, 2022
# [4.0.0](3.3.0...4.0.0) (2022-02-06)

### Bug Fixes

* bump graphiql from 1.4.6 to 1.4.7 ([#1920](#1920)) ([26c0dfa](26c0dfa))
* context menu in data browser not opening for cell of type number ([#1913](#1913)) ([fb0e3a9](fb0e3a9))
* opening filter menu in data browser leads to blank page ([#1958](#1958)) ([750e8b1](750e8b1))
* saving relation column fails if class has required fields ([#1937](#1937)) ([c67db08](c67db08))
* security upgrade qrcode from 1.4.4 to 1.5.0 ([#1930](#1930)) ([244e1bb](244e1bb))
* various UI bugs (e.g. filter data browser, switch app, upload file) ([#2014](#2014)) ([785978e](785978e))

### Features

* upgrade graphiql from 1.4.7 to 1.5.1 ([#1943](#1943)) ([ebb1f66](ebb1f66))
* upgrade graphql from 15.7.0 to 16.0.0 ([#1926](#1926)) ([7c94e51](7c94e51))
* upgrade parse from 3.3.1 to 3.4.0 ([#1942](#1942)) ([13a250e](13a250e))

### BREAKING CHANGES

* The minimum required Node.js version is 12.22.0. ([7c94e51](7c94e51))
* The required Node version was increased to >=12.20.0. ([ebb1f66](ebb1f66))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 4.0.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relation Column Save Fails If the Parent has required fields
5 participants