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

feat: rearranging standard fields in customize form (backport #19822) #22121

Closed

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 19, 2023

This is an automatic backport of pull request #19822 done by Mergify.
Cherry-pick of 19d211f has failed:

On branch mergify/bp/version-14-hotfix/pr-19822
Your branch is up to date with 'origin/version-14-hotfix'.

You are currently cherry-picking commit 19d211f1d2.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   frappe/custom/doctype/customize_form/customize_form.py
	modified:   frappe/model/meta.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   frappe/custom/doctype/customize_form/customize_form.js
	both modified:   frappe/custom/doctype/customize_form/test_customize_form.py

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

* feat: rearranging standing fields

* fix: fixed creation of property setter

* refactor: renamed setup_sortable

* fix: loading field_order property

* refactor: removed redundant db call

* fix: field_order not found

* test: Added tests for field order in customize form

* refactor: better naming

* refactor: simplified logic

* feat: Updating field order on custom field creation

* feat: Added support for custom fiels

* refactor: moving to meta

* refactor: changed property type to json

* fix: new standard field insert order.

* fix: don't modify insert_after of system generated custom fields.

# This is because system generated fields are to be treated as standard fields. If the user restores the form to default, this value will be used to reset the original position.

# The new position of form fields are stored in the field_order Property Setter.

* fix: treat system generated fields as standard fields when sorting.

* revert: check for is_system_generated

* Revert "fix: new standard field insert order."

This reverts commit 6cdbe42.

* fix: prioritize field_order over insert_after.

# Use insert_after as fallback in event the field doesn't exist in field_order

* fix(test): delete existing custom field

* fix: order of standard fields without field_order property.

* Revert "Revert "fix: new standard field insert order.""

This reverts commit c830f1b.

* test: field order of newly migrated standard fields.

* fix(test): clear test_standard_field from previous test run.

* fix: sort with insert_after for system generated fields.

* fix(test): reset standard field creation before re-run and after successful test.

* fix: insert_after position should be + 1

* chore: remove debug statement

* test: system generated customized fields

* chore: remove print

* chore: lint all

* fix: show quick link to Table MultiSelect DocTypes

* refactor: change backend implementation of `CustomizeForm` and `Meta`

* test: simplify tests

* fix: rename `idx` to `index` for clarity

* perf: define `existing_fields` conditionally

---------

Co-authored-by: Aradhya <aradhyatripathi51@gmail.com>
Co-authored-by: Aradhya Tripathi <67282231+Aradhya-Tripathi@users.noreply.github.com>
Co-authored-by: Sagar Vora <sagar@resilient.tech>
(cherry picked from commit 19d211f)

# Conflicts:
#	frappe/custom/doctype/customize_form/customize_form.js
#	frappe/custom/doctype/customize_form/test_customize_form.py
@mergify mergify bot requested a review from a team as a code owner August 19, 2023 10:19
@mergify mergify bot requested review from surajshetty3416 and removed request for a team August 19, 2023 10:19
@mergify mergify bot added the conflicts label Aug 19, 2023
@sagarvora
Copy link
Collaborator

cherry-picked in #22120 instead.

@sagarvora sagarvora closed this Aug 19, 2023
@mergify mergify bot deleted the mergify/bp/version-14-hotfix/pr-19822 branch August 19, 2023 11:22
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants