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
Add filter by Due Date #1755
base: master
Are you sure you want to change the base?
Add filter by Due Date #1755
Conversation
This makes the Due Date filter appear on a new row by itself. Maybe it would be better if all 3 date fields were together on the same line ? One option could be to shorten the labels ( |
The filter should just be displayed if |
@atrol We are not in a bug context here, I guess you meant access_has_project_level() ? |
@dregad right, access_has_bug_level is not the right function (copy/pasted from IssueViewPageCommand) But access_has_project_level() seems also not to be the right function for it, at least if "All Projects" is selected in project selection.
access_has_any_project_level might be the right function for it. |
I've copied the LAST_UPDATED filter as DUE. Fixes #28669 Signed-off-by: Damien Regad <dregad@mantisbt.org>
You're right. As a side note, there's quite a few occurrences of using array_has_project_level() in filter_form_api.php, possibly some of these are wrong but I don't have time to analyze in detail ATM. |
The Date Submitted / Last Updated and Due Date filters display 'No' when no filter exists. This is not consistent with other filter fields. This changes the display value to 'any', to be consistent. Fixes #28831
Until now, the labels for "Date Submitted" and "Last Updated" filters were displayed with a "Filter by" prefix, making them longer than necessary. This commit removes the prefix, leaving just the date field's name as filter label; the full description (i.e. "Filter by xxxx") is now displayed only as label for the checkbox to enable/disable the filter when it is expanded). Fixes #28831
Tracked in #28831 |
However on narrower displays it does not look good at all, with
An alternative would be to display the date filters on a line of their own, but no everyone uses Due Date, and it would waste vertical space and have a filters line with only 2 elements on it. So I guess it's better to leave it like that. |
925c212
to
ef4328f
Compare
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.
It would be great to have "pseudo dates" support here. For example:
overdue
- due date is <= current datenext week
- next week + overduenext month
- next month + overdue
This way a filter can be saved and re-used by all users and work overtime without having to keep updating the due date range.
filter_form_get_input( $t_filter, 'do_filter_by_date', $t_show_inputs ), | ||
2 /* colspan */, | ||
null /* class */, | ||
'do_filter_by_date_filter_target' /* content id */ | ||
)); | ||
$t_row2->add_item( new TableFieldsItem( | ||
$get_field_header( 'do_filter_by_last_updated_date_filter', lang_get( 'use_last_updated_date_filters' ) ), | ||
$get_field_header( 'do_filter_by_last_updated_date_filter', lang_get( 'tag_updated' ) ), |
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.
Not sure why we use tag_updated
string here.
@@ -911,6 +911,7 @@ $s_start_date_label = 'Kezdődátum:'; | |||
$s_end_date_label = 'Záródátum:'; | |||
$s_use_date_filters = 'Szűrés a beküldés dátuma szerint'; | |||
$s_use_last_updated_date_filters = 'Szűrés a frissítés dátuma szerint'; | |||
$s_use_due_date_filters = 'Szűrés az esedékesség dátuma szerint'; |
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.
Don't update strings_hungarian
.
This is @tgulacsi's original patch, as submitted in #28669.
PR submitted as-is, without testing (yet).