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: ignore stale custom fields while checking back-links #22940

Merged
merged 2 commits into from
Oct 27, 2023

Conversation

ankush
Copy link
Member

@ankush ankush commented Oct 27, 2023

This happens when apps add custom fields to doctypes from other apps but don't remove it on uninstall or doctype removal.

If doctype doesn't exist then links to them can be safely ignored while cancelling/deleting.

@ankush ankush requested review from a team and shariquerik and removed request for a team October 27, 2023 08:01
@github-actions github-actions bot added the add-test-cases Add test case to validate fix or enhancement label Oct 27, 2023
@ankush ankush added backport version-14-hotfix backport to version 14 backport version-15-hotfix Backport the PR to v15 and removed add-test-cases Add test case to validate fix or enhancement labels Oct 27, 2023
@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

Merging #22940 (88f7fd6) into develop (48a34f9) will increase coverage by 0.21%.
Report is 12 commits behind head on develop.
The diff coverage is 90.24%.

@@             Coverage Diff             @@
##           develop   #22940      +/-   ##
===========================================
+ Coverage    62.14%   62.36%   +0.21%     
===========================================
  Files          770      770              
  Lines        73788    73809      +21     
  Branches      6364     6365       +1     
===========================================
+ Hits         45859    46031     +172     
+ Misses       24273    24188      -85     
+ Partials      3656     3590      -66     
Flag Coverage Δ
server 70.73% <90.24%> (+<0.01%) ⬆️

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

@ankush ankush merged commit 1560fa8 into frappe:develop Oct 27, 2023
23 of 25 checks passed
@ankush ankush deleted the ignore_deleted_doctypes branch October 27, 2023 08:38
mergify bot pushed a commit that referenced this pull request Oct 27, 2023
* fix: ignore non-existing back-links

* refactor: less indentation, guard clauses

(cherry picked from commit 1560fa8)
mergify bot pushed a commit that referenced this pull request Oct 27, 2023
* fix: ignore non-existing back-links

* refactor: less indentation, guard clauses

(cherry picked from commit 1560fa8)
ankush added a commit that referenced this pull request Oct 27, 2023
…22942)

* fix: ignore non-existing back-links

* refactor: less indentation, guard clauses

(cherry picked from commit 1560fa8)

Co-authored-by: Ankush Menat <ankush@frappe.io>
ankush added a commit that referenced this pull request Oct 27, 2023
…22943)

* fix: ignore non-existing back-links

* refactor: less indentation, guard clauses

(cherry picked from commit 1560fa8)

Co-authored-by: Ankush Menat <ankush@frappe.io>
frappe-pr-bot pushed a commit that referenced this pull request Oct 31, 2023
## [15.0.2](v15.0.1...v15.0.2) (2023-10-31)

### Bug Fixes

* Add translation to "Not Saved" state in print format builder ([#22920](#22920)) ([#22995](#22995)) ([8e8274e](8e8274e))
* developer mode in website theme ([#22958](#22958)) ([#22998](#22998)) ([138e679](138e679))
* don't encode `/` in html escaping ([#22871](#22871)) ([#22875](#22875)) ([2e456f8](2e456f8))
* escape print format code field([#22852](#22852)) ([#22866](#22866)) ([82d8809](82d8809))
* font loading on custom website theme (backport [#22967](#22967)) ([#22992](#22992)) ([3984214](3984214))
* Footer should show up once at end if not repeating header/footer ([#22902](#22902)) ([#22910](#22910)) ([e7ce38a](e7ce38a))
* group by didn't work for the frappe.client.get_value ([#22969](#22969)) ([#22973](#22973)) ([773b74f](773b74f))
* ignore stale custom fields while checking back-links ([#22940](#22940)) ([#22943](#22943)) ([7ce96d9](7ce96d9))
* ignore workspace links on delete ([#22895](#22895)) ([#22897](#22897)) ([821d1e9](821d1e9))
* improve label and description for `fetch_if_empty` ([9e690be](9e690be))
* list view formatting logic (backport [#22646](#22646)) ([#22849](#22849)) ([16363ab](16363ab))
* **migrate:** raise exception even if db is not available ([#22922](#22922)) ([#23000](#23000)) ([a02ba82](a02ba82))
* **minor:** hide grid row on modal close ([#22930](#22930)) ([#22932](#22932)) ([c5a9fdf](c5a9fdf))
* **minor:** use inline-flex in page-actions btn ([#22846](#22846)) ([#22868](#22868)) ([59114ef](59114ef))
* resolve page not found error ([fc9b644](fc9b644))
* revert to setting `frappe.dynamic_link` instead of using `cur_frm` ([37243c6](37243c6))
* revert unintentional quick entry default for Address ([#22974](#22974)) ([f7aaaf3](f7aaaf3))
* skip invalid numbers on SMS `receiver_list` (backport [#22879](#22879)) ([#23003](#23003)) ([5b905e3](5b905e3))
* use frm.set_value for updating fields ([#22860](#22860)) ([#22869](#22869)) ([1df1a27](1df1a27))
* web styles espresso (backport [#22924](#22924)) ([#22933](#22933)) ([b2c6f07](b2c6f07))

### Performance Improvements

* query fields only once ([#22982](#22982)) ([#22988](#22988)) ([7e2adb4](7e2adb4))
frappe-pr-bot pushed a commit that referenced this pull request Oct 31, 2023
# [14.54.0](v14.53.2...v14.54.0) (2023-10-31)

### Bug Fixes

* check label for fields ([4fbda9b](4fbda9b))
* child rows for cancelled docs in getdiff ([d79e0b9](d79e0b9))
* developer mode in website theme ([#22958](#22958)) ([#22997](#22997)) ([62841eb](62841eb))
* fetch prev docs from last amended doc ([9b12aa6](9b12aa6))
* Footer should show up once at end if not repeating header/footer ([#22902](#22902)) ([#22909](#22909)) ([11e5c00](11e5c00))
* group by didn't work for the frappe.client.get_value ([#22969](#22969)) ([#22972](#22972)) ([1cc4ce3](1cc4ce3))
* ignore stale custom fields while checking back-links ([#22940](#22940)) ([#22942](#22942)) ([b4ebde7](b4ebde7))
* ignore workspace links on delete ([#22895](#22895)) ([#22896](#22896)) ([4ac08b8](4ac08b8))
* improve label and description for `fetch_if_empty` ([b0e7479](b0e7479))
* list view formatting logic (backport [#22646](#22646)) ([#22848](#22848)) ([91b87da](91b87da))
* **migrate:** raise exception even if db is not available ([#22922](#22922)) ([#22999](#22999)) ([0f03ddd](0f03ddd))
* multiple rows changed in each table ([e7a3264](e7a3264))
* **query_doctypes:** Allow search in translated name (backport [#22590](#22590)) ([#22748](#22748)) ([254d2e5](254d2e5))
* remove indicator ([4b8d6e8](4b8d6e8))
* rename doctype ([56da0ba](56da0ba))
* rename imports ([fbb663d](fbb663d))
* return df label only when not none ([3d692d5](3d692d5))
* revert unintentional quick entry default for Address ([#22974](#22974)) ([70745b2](70745b2))
* skip invalid numbers on SMS `receiver_list` (backport [#22879](#22879)) ([#23002](#23002)) ([48ffb1f](48ffb1f))
* use latest doc name for test ([d146132](d146132))
* **UX:** Improve search relevance for link field (backport [#22729](#22729)) ([#22966](#22966)) ([abc3cca](abc3cca))

### Features

* add collapsible sections for row additions and deletions ([4267339](4267339))
* add html template for additions and deletions ([902c168](902c168))
* add html template for comparator ([b4fd381](b4fd381))
* add js for rendering html grids ([56d8911](56d8911))
* add logic for addition and deletion grids ([38dbb93](38dbb93))
* add logic for changed values and rows ([9c7fa7c](9c7fa7c))
* add validation for mandatory fields ([53b3783](53b3783))
* create single doctype for comparator ([5acecf1](5acecf1))
* webhook timeout (backport [#21410](#21410)) ([#22978](#22978)) ([dbbfa17](dbbfa17))

### Performance Improvements

* query fields only once ([#22982](#22982)) ([#22987](#22987)) ([8e92894](8e92894))

### Reverts

* Revert "refactor: force ipv4 localhost (#22394) (#22396)" (#22946) ([cb10eb0](cb10eb0)), closes [#22394](#22394) [#22396](#22396) [#22946](#22946)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 2023
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 backport version-15-hotfix Backport the PR to v15
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant