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: only make fetch_from field read only if no input #19192

Merged
merged 1 commit into from Dec 8, 2022

Conversation

ankush
Copy link
Member

@ankush ankush commented Dec 8, 2022

Edge case on #19025

Example:

  • A field is a link field.
  • B is a field that uses A to fetch some data.

Currently B is always made read-only. The read-only behavior only makes sense when B will get overridden by fetched value based on A, which won't happen if A is unset.

@ankush ankush marked this pull request as ready for review December 8, 2022 09:09
@ankush ankush requested a review from a team as a code owner December 8, 2022 09:09
@ankush ankush requested review from phot0n and shariquerik and removed request for a team and phot0n December 8, 2022 09:09
@codecov
Copy link

codecov bot commented Dec 8, 2022

Codecov Report

Merging #19192 (40d16da) into develop (775321b) will decrease coverage by 0.65%.
The diff coverage is 100.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #19192      +/-   ##
===========================================
- Coverage    64.00%   63.35%   -0.66%     
===========================================
  Files          751      751              
  Lines        68774    68793      +19     
  Branches      6039     6041       +2     
===========================================
- Hits         44022    43584     -438     
- Misses       21325    21772     +447     
- Partials      3427     3437      +10     
Flag Coverage Δ
server ?
server-ui 31.67% <ø> (-0.08%) ⬇️
ui-tests 51.07% <100.00%> (+0.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Member

@shariquerik shariquerik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ankush ankush merged commit 7578be8 into frappe:develop Dec 8, 2022
@ankush ankush deleted the fetch_from_empty branch December 8, 2022 11:08
mergify bot pushed a commit that referenced this pull request Dec 8, 2022
mergify bot pushed a commit that referenced this pull request Dec 8, 2022
ankush added a commit that referenced this pull request Dec 8, 2022
(cherry picked from commit 7578be8)

Co-authored-by: Ankush Menat <ankush@frappe.io>
ankush added a commit that referenced this pull request Dec 9, 2022
… (#19194)

* fix: only make fetch_from field read only if no input (#19192)

(cherry picked from commit 7578be8)

* chore: v13 js compatibility

Co-authored-by: Ankush Menat <ankush@frappe.io>
frappe-pr-bot pushed a commit that referenced this pull request Dec 13, 2022
# [14.19.0](v14.18.1...v14.19.0) (2022-12-13)

### Bug Fixes

* allow changing counter for prefix-less series ([#19180](#19180)) ([#19190](#19190)) ([a2a91bb](a2a91bb))
* child table not working ([e1b231a](e1b231a))
* do not rename select field options and values on doctype rename ([#19223](#19223)) ([#19226](#19226)) ([f511dfc](f511dfc))
* **docshare:** return None if share_name and value are None ([#19187](#19187)) ([#19189](#19189)) ([b8541e9](b8541e9))
* log unknown usernames too for failed attempts ([#19199](#19199)) ([#19201](#19201)) ([6db0b8a](6db0b8a))
* only make fetch_from field read only if no input ([#19192](#19192)) ([#19195](#19195)) ([17e8aa5](17e8aa5))
* reload shared dialog upon checking any perm ([#19196](#19196)) ([#19198](#19198)) ([cfa6ec2](cfa6ec2))
* set-config -g ([#19217](#19217)) ([#19219](#19219)) ([2fd7af7](2fd7af7))
* stabilize shared with dialog ([#19186](#19186)) ([c013d11](c013d11))
* TypeError when using frappe.throw() or frappe.msgprint() with lists ([#19255](#19255)) ([#19256](#19256)) ([0748324](0748324))
* unscrub and translate field names in tooltip explaining fetch from (backport [#19143](#19143)) ([#19174](#19174)) ([018984e](018984e))
* untranslated link fields in list view ([#19155](#19155)) ([4296681](4296681))
* **UX:** forget password shows error on wrong email ([#19235](#19235)) ([#19240](#19240)) ([ac1ca50](ac1ca50))
* validate parentfield while checking child perms ([a9871b2](a9871b2))
* workflow icon not visible in mobile view ([388a919](388a919))

### Features

* allow user to pick all columns ([#19236](#19236)) ([16a1253](16a1253))
* finer frappe Recorder control with decorator ([#19220](#19220)) ([#19222](#19222)) ([4402f12](4402f12))
* inter-process file locks (backport [#19133](#19133)) ([#19142](#19142)) ([c407dae](c407dae))

### Performance Improvements

* remove order_by from linked_with checks ([#19229](#19229)) ([#19243](#19243)) ([3fa0207](3fa0207))
frappe-pr-bot pushed a commit that referenced this pull request Dec 13, 2022
# [13.46.0](v13.45.3...v13.46.0) (2022-12-13)

### Bug Fixes

* attribute error on export of reports with additional columns ([#19105](#19105)) ([#19119](#19119)) ([da28290](da28290))
* do not rename select field options and values on doctype rename ([#19223](#19223)) ([#19225](#19225)) ([47f5fd0](47f5fd0))
* **docshare:** return None if share_name and value are None ([#19187](#19187)) ([#19188](#19188)) ([4e2620a](4e2620a))
* log unknown usernames too for failed attempts ([#19199](#19199)) ([#19200](#19200)) ([a75fa10](a75fa10))
* only make fetch_from field read only if no input (backport [#19192](#19192)) ([#19194](#19194)) ([994c1ed](994c1ed))
* reload shared dialog upon checking any perm (backport [#19196](#19196)) ([#19197](#19197)) ([fd44b34](fd44b34))
* set-config -g ([#19217](#19217)) ([#19218](#19218)) ([458707e](458707e))
* stabilize shared with dialog (backport [#19170](#19170)) ([#19185](#19185)) ([4f9d755](4f9d755))
* unscrub and translate field names in tooltip explaining fetch from (backport [#19143](#19143)) ([#19173](#19173)) ([fc430d1](fc430d1))
* **UX:** forget password shows error on wrong email ([#19235](#19235)) ([#19239](#19239)) ([5257ca7](5257ca7))
* workflow icon not visible in mobile view ([dcb3933](dcb3933))

### Features

* allow user to pick all columns ([#19236](#19236)) ([927b264](927b264))
* finer frappe Recorder control with decorator (backport [#19220](#19220)) ([#19221](#19221)) ([3b18e7e](3b18e7e))
* inter-process file locks ([#19133](#19133)) ([#19145](#19145)) ([b34e8ce](b34e8ce))

### Performance Improvements

* remove order_by from linked_with checks ([#19229](#19229)) ([#19242](#19242)) ([c2cde0c](c2cde0c))
SaiFi0102 pushed a commit to ParaLogicTech/frappe that referenced this pull request Dec 16, 2022
…rappe#19195)

(cherry picked from commit 7578be8)

Co-authored-by: Ankush Menat <ankush@frappe.io>
SaiFi0102 pushed a commit to ParaLogicTech/frappe that referenced this pull request Dec 16, 2022
# [14.19.0](frappe/frappe@v14.18.1...v14.19.0) (2022-12-13)

### Bug Fixes

* allow changing counter for prefix-less series ([frappe#19180](frappe#19180)) ([frappe#19190](frappe#19190)) ([a2a91bb](frappe@a2a91bb))
* child table not working ([e1b231a](frappe@e1b231a))
* do not rename select field options and values on doctype rename ([frappe#19223](frappe#19223)) ([frappe#19226](frappe#19226)) ([f511dfc](frappe@f511dfc))
* **docshare:** return None if share_name and value are None ([frappe#19187](frappe#19187)) ([frappe#19189](frappe#19189)) ([b8541e9](frappe@b8541e9))
* log unknown usernames too for failed attempts ([frappe#19199](frappe#19199)) ([frappe#19201](frappe#19201)) ([6db0b8a](frappe@6db0b8a))
* only make fetch_from field read only if no input ([frappe#19192](frappe#19192)) ([frappe#19195](frappe#19195)) ([17e8aa5](frappe@17e8aa5))
* reload shared dialog upon checking any perm ([frappe#19196](frappe#19196)) ([frappe#19198](frappe#19198)) ([cfa6ec2](frappe@cfa6ec2))
* set-config -g ([frappe#19217](frappe#19217)) ([frappe#19219](frappe#19219)) ([2fd7af7](frappe@2fd7af7))
* stabilize shared with dialog ([frappe#19186](frappe#19186)) ([c013d11](frappe@c013d11))
* TypeError when using frappe.throw() or frappe.msgprint() with lists ([frappe#19255](frappe#19255)) ([frappe#19256](frappe#19256)) ([0748324](frappe@0748324))
* unscrub and translate field names in tooltip explaining fetch from (backport [frappe#19143](frappe#19143)) ([frappe#19174](frappe#19174)) ([018984e](frappe@018984e))
* untranslated link fields in list view ([frappe#19155](frappe#19155)) ([4296681](frappe@4296681))
* **UX:** forget password shows error on wrong email ([frappe#19235](frappe#19235)) ([frappe#19240](frappe#19240)) ([ac1ca50](frappe@ac1ca50))
* validate parentfield while checking child perms ([a9871b2](frappe@a9871b2))
* workflow icon not visible in mobile view ([388a919](frappe@388a919))

### Features

* allow user to pick all columns ([frappe#19236](frappe#19236)) ([16a1253](frappe@16a1253))
* finer frappe Recorder control with decorator ([frappe#19220](frappe#19220)) ([frappe#19222](frappe#19222)) ([4402f12](frappe@4402f12))
* inter-process file locks (backport [frappe#19133](frappe#19133)) ([frappe#19142](frappe#19142)) ([c407dae](frappe@c407dae))

### Performance Improvements

* remove order_by from linked_with checks ([frappe#19229](frappe#19229)) ([frappe#19243](frappe#19243)) ([3fa0207](frappe@3fa0207))
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-14-hotfix backport to version 14
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants