-
Notifications
You must be signed in to change notification settings - Fork 741
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: filters on vehicle expenses report #2440
Merged
ruchamahabal
merged 4 commits into
frappe:develop
from
asmitahase:fix-filters-on-vehicle-expenses-report
Nov 25, 2024
Merged
fix: filters on vehicle expenses report #2440
ruchamahabal
merged 4 commits into
frappe:develop
from
asmitahase:fix-filters-on-vehicle-expenses-report
Nov 25, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asmitahase
changed the title
Fix filters on vehicle expenses report
fix: filters on vehicle expenses report
Nov 22, 2024
let filter_based_on = frappe.query_report.get_filter_value("filter_based_on"); | ||
|
||
if (filter_based_on == "Fiscal Year") { | ||
set_filter_requirement("fiscal_year", true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
set_filter_requirement("fiscal_year", true); | |
set_reqd_filter("fiscal_year", true); |
Call this set_reqd_filter
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
ruchamahabal
approved these changes
Nov 25, 2024
mergify bot
pushed a commit
that referenced
this pull request
Nov 25, 2024
(cherry picked from commit f382a94)
mergify bot
pushed a commit
that referenced
this pull request
Nov 25, 2024
(cherry picked from commit f382a94)
This was referenced Nov 25, 2024
ruchamahabal
pushed a commit
that referenced
this pull request
Nov 25, 2024
Co-authored-by: Asmita Hase <[email protected]>
ruchamahabal
pushed a commit
that referenced
this pull request
Nov 25, 2024
Co-authored-by: Asmita Hase <[email protected]>
frappe-pr-bot
pushed a commit
that referenced
this pull request
Nov 26, 2024
## [14.35.2](v14.35.1...v14.35.2) (2024-11-26) ### Bug Fixes * filters on vehicle expenses report (backport [#2440](#2440)) ([#2446](#2446)) ([6d35f11](6d35f11)) * ignore linked ledger entry record on employee advance cancellation (backport [#2432](#2432)) ([#2434](#2434)) ([8058d74](8058d74)) * **Salary Structure Assignment:** validate cost center company on server-side (backport [#2445](#2445)) ([#2449](#2449)) ([51831cb](51831cb))
frappe-pr-bot
pushed a commit
that referenced
this pull request
Nov 26, 2024
## [15.35.3](v15.35.2...v15.35.3) (2024-11-26) ### Bug Fixes * Editable Letter Head field in Salary Structure Doctype (backport [#2436](#2436)) ([#2443](#2443)) ([f948a36](f948a36)) * filters on vehicle expenses report (backport [#2440](#2440)) ([#2447](#2447)) ([4e4425c](4e4425c)) * ignore linked ledger entry record on employee advance cancellation (backport [#2432](#2432)) ([#2433](#2433)) ([e1d9514](e1d9514)) * redundant fetching of Interviewers in Interview ([#2441](#2441)) ([62cd631](62cd631)) * **Salary Structure Assignment:** validate cost center company on server-side (backport [#2445](#2445)) ([#2450](#2450)) ([7f5e969](7f5e969))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue:
Filters on Vehicle expense report are conditional based on "Fiscal Year" or "Date Range" but they are all set to be
mandatory. So when "Fiscal Year" is selected the report shows up but the console throws error for date filters not being set. When "Date Range" is selected the missing filter on Fiscal Year prevents the report from loading and "Please set filter" shows up.
The problem is gone even if the order of the filters in the report script is exchanged. Will dig deeper into this, for now
Fix:
Made the requirement of the filters conditional based on "Fiscal Year" or "Date Range"
Before
After
The issue was in frontend script, no-tests-required