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, #20168) #22120

Merged
merged 5 commits into from Aug 21, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 19, 2023

@mergify mergify bot requested a review from a team as a code owner August 19, 2023 10:18
@mergify mergify bot requested review from maharshivpatel and removed request for a team August 19, 2023 10:18
sagarvora and others added 2 commits August 19, 2023 16:46
* 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>
@sagarvora sagarvora changed the title fix!: create property setters for system generated custom fields (backport #20168) feat: rearranging standard fields in customize form (backport #19822, #20168) Aug 19, 2023
@sagarvora sagarvora removed their assignment Aug 19, 2023
@sagarvora sagarvora requested a review from ankush August 19, 2023 11:38
@sagarvora
Copy link
Collaborator

Tested locally ✅

field order working

@ankush ankush merged commit 060c4a7 into version-14-hotfix Aug 21, 2023
11 of 12 checks passed
@ankush ankush deleted the mergify/bp/version-14-hotfix/pr-20168 branch August 21, 2023 06:49
frappe-pr-bot pushed a commit that referenced this pull request Aug 22, 2023
# [14.46.0](v14.45.0...v14.46.0) (2023-08-22)

### Bug Fixes

* autoincr caching and clear site cache after restore ([#22079](#22079)) ([#22087](#22087)) ([af6393f](af6393f))
* button styling in quill ([#22069](#22069)) ([bc764aa](bc764aa))
* disallow unsafe attrs in jinja ([acbfb2a](acbfb2a))
* do not allow to create dashbaord chart, number card if doesn't have access ([4ebb841](4ebb841))
* don't enqueue sendmail jobs ([#22154](#22154)) ([ee2bb42](ee2bb42))
* **DX:** hide irrelevant sections in DocType if it's a child table (backport [#22053](#22053)) ([#22065](#22065)) ([2c8e4a6](2c8e4a6))
* file permissions (backport [#20877](#20877)) ([#21503](#21503)) ([f38b6a0](f38b6a0))
* hide "Edit" text on md viewport ([73a1b00](73a1b00))
* hide or show button to load more ([c2f20f7](c2f20f7))
* incorrect doctype map key in cache ([a01c362](a01c362))
* **minor:** grid row layout on small viewport ([9ad35d3](9ad35d3))
* rate limit for all HTTP methods ([#21929](#21929)) ([04cf5a6](04cf5a6))
* set correct document label in case `doc` is of type `str` ([8d3e4fb](8d3e4fb))
* translation of buttons in the Form tour ([#22055](#22055)) ([e680b2c](e680b2c))
* **UX:** Provision to ignore prepared report via route options ([#22077](#22077)) ([6bac8a8](6bac8a8))

### Features

* rearranging standard fields in customize form (backport [#19822](#19822), [#20168](#20168)) ([#22120](#22120)) ([060c4a7](060c4a7))

### Performance Improvements

* set lower priority for background processes ([#21841](#21841)) ([#22027](#22027)) ([f39bc79](f39bc79))

### Reverts

* Revert "fix(Contact): use existing full name" (#22119) ([c394053](c394053)), closes [#22119](#22119)
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 14.46.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 Sep 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants