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: field wildcard for child object (backport #26543) #26560

Merged
merged 1 commit into from
May 24, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 24, 2024

Hi,

When loading child objects with fields=["*"] via the REST API, only standard fields are returned. india081947 has already described the same bug in #25441.

Example

request: {{base-url}}/api/resource/Web Form Field?fields=["*"]&parent=Web Form

function trace:

  1. frappe.api.v1.document_list
  2. frappe.client.get_list : here the parent-doctype-name is saved with the key "parent_doctype"
  3. frappe.desk.reportview.validate_args
  4. frappe.desk.reportview.validate_fields
  5. frappe.desk.reportview.update_wildcard_field_param : here the parent-doctype-name is loaded with the key "parenttype", but this key does not exist -> None

response with bug

{
    "data": [
        {
            "name": "e3bn1at0sb",
            "owner": "Administrator",
            "creation": "2016-09-19 05:16:59.242754",
            "modified": "2024-04-25 18:05:49.539971",
            "modified_by": "Administrator",
            "docstatus": 0,
            "idx": 1
        }
    ]
}

response without bug

{
    "data": [
        {
            "name": "e3bn1at0sb",
            "owner": "Administrator",
            "creation": "2016-09-19 05:16:59.242754",
            "modified": "2024-04-25 18:05:49.539971",
            "modified_by": "Administrator",
            "docstatus": 0,
            "idx": 1,
            "parent": "edit-profile",
            "parentfield": "web_form_fields",
            "parenttype": "Web Form",
            "fieldname": "first_name",
            "fieldtype": "Data",
            "label": "First Name",
            "allow_read_on_all_link_options": 0,
            "reqd": 1,
            "read_only": 0,
            "show_in_filter": 0,
            "hidden": 0,
            "options": null,
            "max_length": 0,
            "max_value": 0,
            "precision": null,
            "depends_on": null,
            "mandatory_depends_on": null,
            "read_only_depends_on": null,
            "description": null,
            "default": null
        }
    ]
}
```<hr>This is an automatic backport of pull request #26543 done by [Mergify](https://mergify.com).

@github-actions github-actions bot added the add-test-cases Add test case to validate fix or enhancement label May 24, 2024
@ankush ankush merged commit 20ac585 into version-15-hotfix May 24, 2024
18 checks passed
@ankush ankush deleted the mergify/bp/version-15-hotfix/pr-26543 branch May 24, 2024 11:34
frappe-pr-bot pushed a commit that referenced this pull request May 28, 2024
# [15.29.0](v15.28.0...v15.29.0) (2024-05-28)

### Bug Fixes

* Appropriate variable name, avoid redefining parameter ([a75c031](a75c031))
* child table field wildcard in API ([#26543](#26543)) ([#26560](#26560)) ([20ac585](20ac585))
* Drop file_manager.download_file ([#26575](#26575)) ([#26577](#26577)) ([6ace16b](6ace16b))
* ignore apps without pyproject ([#26498](#26498)) ([#26503](#26503)) ([6c3c798](6c3c798))
* reload before saving on reconnect ([#26534](#26534)) ([#26537](#26537)) ([22e278f](22e278f))
* Use true stderr for dumping trace ([#26524](#26524)) ([#26527](#26527)) ([e7e55db](e7e55db))

### Features

* Add `on_add_row` event for grid in Dialog ([e592b87](e592b87))
* ignore `tar: file changed as we read it` during backups (backport [#26462](#26462)) ([#26495](#26495)) ([30f767e](30f767e))
* Option to make webform embeddable ([f08fff5](f08fff5))

### Performance Improvements

* Avoid coalesce for `between` filters ([#26531](#26531)) ([#26532](#26532)) ([8263898](8263898))
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 15.29.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
add-test-cases Add test case to validate fix or enhancement released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants