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: format filter values in report print view #20717

Merged

Conversation

P-Froggy
Copy link
Contributor

Existing behavior:

Currently, when printing a report, the values of the filter overview at the top of the document don't get formatted but inserted as raw values.

Changes in query_report.js and report_view.js:

The filter's values now get formatted with frappe.format() when generating the html for the print view. This should handle all fieldtypes accordingly (I haven't tested it with all fieldtypes though).

In the before/after screenshots below you can see that:

  • Select and data fields get translated, if there is a translation for the string.
  • Link fields resolve the doc's title correctly
  • Date and time fields get localized

Before:
Screenshot 2023-04-15 232157

After:
Screenshot 2023-04-15 232224

@P-Froggy P-Froggy requested review from a team and shariquerik and removed request for a team April 15, 2023 21:57
@surajshetty3416 surajshetty3416 merged commit af500bb into frappe:develop Apr 18, 2023
@surajshetty3416 surajshetty3416 added the backport version-14-hotfix backport to version 14 label Apr 18, 2023
mergify bot pushed a commit that referenced this pull request Apr 18, 2023
Co-authored-by: Michael Weißer <michael.weisser@rindenmuehle.de>
(cherry picked from commit af500bb)
surajshetty3416 pushed a commit that referenced this pull request Apr 18, 2023
)

Co-authored-by: Michael Weißer <michael.weisser@rindenmuehle.de>
Co-authored-by: P-Froggy <60393001+P-Froggy@users.noreply.github.com>
frappe-pr-bot pushed a commit that referenced this pull request Apr 18, 2023
# [14.33.0](v14.32.1...v14.33.0) (2023-04-18)

### Bug Fixes

* allow filter values to be saved in custom report ([295d2b8](295d2b8))
* allow workflow action master rename ([2730f22](2730f22))
* bump poplib limit ([#20739](#20739)) ([#20740](#20740)) ([a58ef7a](a58ef7a))
* check communication subject existence before converting to text  ([#20738](#20738)) ([#20748](#20748)) ([3d047b4](3d047b4))
* clear all filters when in list view (backport [#20342](#20342)) ([#20746](#20746)) ([54d0dca](54d0dca))
* consider user email if send me a copy is checked ([#20627](#20627)) ([#20655](#20655)) ([3dc215d](3dc215d))
* **export:** Use fieldname if label is not set ([f497557](f497557))
* filter with capitalized operator was getting bypassed (backport [#20682](#20682)) ([#20684](#20684)) ([7831866](7831866))
* format filter values in report print view (backport [#20717](#20717)) ([#20752](#20752)) ([83fdb2e](83fdb2e))
* group buttons are overlapping (backport [#20671](#20671)) ([#20687](#20687)) ([149eed7](149eed7))
* Hide dropdown menu on click ([454f3a7](454f3a7))
* Load doc before checking permission ([a8348ce](a8348ce))
* make `owner` restricted ([8ad7ddb](8ad7ddb))
* Patch to update Background Jobs URL ([67add11](67add11))
* prioritize modal over freeze in grid-form ([953b331](953b331))
* Redirect Background Jobs to RQ Jobs ([2cc1092](2cc1092))
* Remove Background Jobs from dropdown ([0c7009c](0c7009c))
* remove desk access for Guest in post_model_sync ([#20719](#20719)) ([#20720](#20720)) ([97e0836](97e0836))
* remove guest permission from language ([#20677](#20677)) ([#20691](#20691)) ([de3b484](de3b484))
* Resolve conflicts ([a66fa64](a66fa64))
* Resolve conflicts ([abacaba](abacaba))
* route to form if name has slashes in it ([ae7d693](ae7d693))
* Show background jobs only to permitted users ([c065b2b](c065b2b))
* stale `frappe.local` ([#20695](#20695)) ([#20701](#20701)) ([2715d2d](2715d2d))
* update property if field exist ([3f10e63](3f10e63))
* use frappe.log_error in EmailServer exception handling ([25281e3](25281e3))
* **UX:** workspace breadcrumbs based on history ([#20529](#20529)) ([#20661](#20661)) ([260ef71](260ef71))

### Features

* redis cache decorator ([#20452](#20452)) ([3dff558](3dff558))
mergify bot pushed a commit that referenced this pull request Apr 18, 2023
Co-authored-by: Michael Weißer <michael.weisser@rindenmuehle.de>
(cherry picked from commit af500bb)

# Conflicts:
#	frappe/public/js/frappe/views/reports/query_report.js
#	frappe/public/js/frappe/views/reports/report_view.js
frappe-pr-bot pushed a commit that referenced this pull request Apr 25, 2023
# [13.56.0](v13.55.0...v13.56.0) (2023-04-25)

### Bug Fixes

* charts on dashboard not loading ([a00405c](a00405c))
* clear cache on delete of prop setters ([7fac775](7fac775))
* format filter values in report print view (backport [#20717](#20717)) ([#20761](#20761)) ([6fc359f](6fc359f))
* make role info translatable (backport [#20813](#20813)) ([#20828](#20828)) ([265d9b2](265d9b2))

### Features

* email oauth (v13) ([#20790](#20790)) ([b4b6b66](b4b6b66))
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 3, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants