プロジェクト

全般

プロフィール

Vote #80907

未完了

Fix by date weekly filter query to use Setting.start_of_week

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Issues filter_56
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
56
version_id:
0
issue_org_id:
33554
author_id:
460882
assigned_to_id:
0
comments:
2
status_id:
1
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

Currently when you search issues or time log entries with using "this week", "next week", "last week" and "last 2 week" conditions it uses current user locale setting of when the week is started. For example EN locale is using Sunday as week start and RU locale is using Monday week starts. We have a @Setting.start_of_week@ that allow to configure when the calendar weeks should be started, but Issue filters ignores this setting.

This patch makes the fix, so the issues query use the @Setting.start_of_week@ value configured for the Redmine instance for weekly queries. And it were possible to have issue queries with weeks started from Monday having the EN UI locale configured.


journals

I like this change in general. I've seen cases where confusion about different query results arose in multilingual environments.
I don't think that coupling @Query@ with @Redmine::Helpers::Calendar@ in this way is a good idea, though. I think it would be better to extract both @Redmine::Helpers::Calendar#first_wday@ and @Redmine::Helpers::Calendar#last_wday@ into a new, encapsulated module (e.g. @Redmine::Utils::DayCalculation@) and use that where this logic is needed.

Note: this change will modify the results of existing custom queries for all users. While this is intentional, it might be something to take into account. Maybe it is best to mention it explicitly in the release announcement whenever this change is integrated and it gets released.
--------------------------------------------------------------------------------
I'm new in Redmine community. What are the usual procedures here? You've made some proposal about the implementation. Should it be voted and concluded somehow within contrubutors, or should I just rework my patch to proposed way to include it to release plan? How it works here, @Mischa_The_Evil please advice.
--------------------------------------------------------------------------------

Admin Redmine さんが約2年前に更新

  • カテゴリIssues filter_56 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0