8000 fix: ensure has_value_changed works for Datetime, Date and Time fields by scdanieli · Pull Request #24919 · frappe/frappe · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: ensure has_value_changed works for Datetime, Date and Time fields #24919

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

Merged
merged 2 commits into from
Feb 19, 2024

Conversation

scdanieli
Copy link
Contributor

self.get(fieldname) may return a str for Datetime, Data and Time fields and should be converted to datetime, date resp. timedelta objects before comparison.

@scdanieli scdanieli requested review from a team and shariquerik and removed request for a team February 18, 2024 15:06
@ankush ankush force-pushed the fix-has-value-changed branch from 51f5590 to 0d84743 Compare February 19, 2024 05:12
@ankush ankush added backport version-14-hotfix backport to version 14 backport version-15-hotfix Backport the PR to v15 labels Feb 19, 2024
@ankush ankush enabled auto-merge February 19, 2024 05:13
@ankush ankush merged commit beb75ef into frappe:develop Feb 19, 2024
ankush added a commit that referenced this pull request Feb 19, 2024
…s (backport #24919) (#24922)

* fix: ensure has_value_changed works for datetime, date and timedelta fields

(cherry picked from commit a1cb19c)

# Conflicts:
#	frappe/model/document.py
#	frappe/utils/data.py

* test: add more tests for has_value_changed

(cherry picked from commit 0d84743)

# Conflicts:
#	frappe/model/document.py

---------

Co-authored-by: scdanieli <23150094+scdanieli@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
ankush added a commit that referenced this pull request Feb 19, 2024
…s (backport #24919) (#24921)

* fix: ensure has_value_changed works for datetime, date and timedelta fields

(cherry picked from commit a1cb19c)

# Conflicts:
#	frappe/model/document.py
#	frappe/utils/data.py

* test: add more tests for has_value_changed

(cherry picked from commit 0d84743)

# Conflicts:
#	frappe/model/document.py

* chore: conflicts

---------

Co-authored-by: scdanieli <23150094+scdanieli@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
frappe-pr-bot pushed a commit that referenced this pull request Feb 20, 2024
## [14.66.2](v14.66.1...v14.66.2) (2024-02-20)

### Bug Fixes

* **calendar:** Replace route in load_last_view ([#24894](#24894)) ([#24927](#24927)) ([fa184d6](fa184d6))
* ensure has_value_changed works for Datetime, Date and Time fields (backport [#24919](#24919)) ([#24921](#24921)) ([8087a7a](8087a7a))
* handle bad cron expressions (backport [#24938](#24938)) ([#24941](#24941)) ([4efcdb5](4efcdb5))
* ignore and gracefully handle img optimization failure ([b112333](b112333))
* invite contact as user ([136ac70](136ac70))
* keep order in `get_values_from_single` ([#24907](#24907)) ([#24923](#24923)) ([3347144](3347144))
* lower socket timeout for validating email domain ([#24915](#24915)) ([#24917](#24917)) ([427e681](427e681))
* **page:** Catch LocalStorage quota exception ([#24885](#24885)) ([#24930](#24930)) ([3a36f7d](3a36f7d))
* send_workflow_action_email ([#24929](#24929)) ([#24933](#24933)) ([5f29c83](5f29c83))
* set same cookie expiry on client side (backport [#24560](#24560)) ([#24567](#24567)) ([744b363](744b363))
* use communication date in timeline ([0632cb3](0632cb3))
* **weblist:** Fix "More" button not working ([#24893](#24893)) ([#24925](#24925)) ([1715638](1715638))
frappe-pr-bot pushed a commit that referenced this pull request Feb 20, 2024
# [15.15.0](v15.14.1...v15.15.0) (2024-02-20)

### Bug Fixes

* **calendar:** Replace route in load_last_view ([#24894](#24894)) ([#24928](#24928)) ([2557384](2557384))
* ensure has_value_changed works for Datetime, Date and Time fields (backport [#24919](#24919)) ([#24922](#24922)) ([87e7702](87e7702))
* handle bad cron expressions (backport [#24938](#24938)) ([#24942](#24942)) ([18512d6](18512d6))
* invite contact as user ([4e308e4](4e308e4))
* keep order in `get_values_from_single` ([#24907](#24907)) ([#24924](#24924)) ([d8f663b](d8f663b))
* lower socket timeout for validating email domain ([#24915](#24915)) ([#24918](#24918)) ([796c7c0](796c7c0))
* **page:** Catch LocalStorage quota exception ([#24885](#24885)) ([#24931](#24931)) ([cb3a435](cb3a435))
* send_workflow_action_email ([#24929](#24929)) ([#24934](#24934)) ([7e9eec0](7e9eec0))
* use communication date in timeline ([8bebcb6](8bebcb6))
* **weblist:** Fix "More" button not working ([#24893](#24893)) ([#24926](#24926)) ([4732928](4732928))

### Features

* pass doctype as context when translating label (backport [#24903](#24903)) ([#24916](#24916)) ([6cdc0a7](6cdc0a7))
* Queue selection for webhooks ([#24876](#24876)) ([#24932](#24932)) ([bd2b90c](bd2b90c))

### Performance Improvements

* defer imports during CLI (backport [#24945](#24945)) ([#24946](#24946)) ([a23a758](a23a758))
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 5, 2024
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.

2 participants
0