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: childtable error in editable report builder #7354

Merged
merged 1 commit into from May 23, 2019

Conversation

@Don-Leopardo
Copy link
Contributor

commented Apr 24, 2019

fix https://discuss.erpnext.com/t/report-builder-and-data-editing-in-v11/48186
To the unsuccessfully attempts in the thread we can add:

  • Wipe the entire server and install everything again

So, I tested and put 'console.logs' everywhere untill I found the problem: the structure of updated_doc does not match the structure of _data so they never add the child table's fields values.

This fixes it.

@Don-Leopardo Don-Leopardo changed the title fix childtable error in editable report builder fix: childtable error in editable report builder Apr 24, 2019
@scmmishra scmmishra self-assigned this Apr 25, 2019
@scmmishra

This comment has been minimized.

Copy link
Collaborator

commented Apr 25, 2019

Hey @Don-Leopardo I reviewed the PR, however in my local testing, I didn't see it fixing the issue completely

Here's the gif of the same:
Before applying your patch:
Before

After your patch:
After

As you can see the correct data reflects in either case, however only after refresh. After the patch, some fields do work correctly, some don't. Please let me know if there's any confusion

@Don-Leopardo

This comment has been minimized.

Copy link
Contributor Author

commented Apr 25, 2019

@scmmishra I've testes this in a local instance and in a production instance and it's working correctly. We can try this if you want:
Replace this:

const _data = this.data.find(d => d.name === updated_doc.name);

With this:

console.log(JSON.stringify(this.data,null, 4), "this.data");
console.log(JSON.stringify(updated_doc,null, 4), "updated_doc");
const _data = this.data.find(d => d.name === updated_doc.name);
console.log(JSON.stringify(_data,null, 4), "_data");

And show to me the console result after it fails. With that information maybe I can solve the problem.

@rmehta rmehta merged commit f75f5de into frappe:hotfix May 23, 2019
6 checks passed
6 checks passed
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
Semantic Pull Request ready to be squashed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 45.836%
Details
security/snyk - package.json (frappe) No new issues
Details
security/snyk - requirements.txt (frappe) No manifest changes detected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.