Vote #78742
完了Filtering time entries after issue's target version doesn't work as expected in some cases
0%
説明
- Target version select is empty when you add the issue's target version filter To reproduce:
- Open spent time tab from a project
- Add the Issue's target version filter
- Observe that the dropdown is empty.
If you apply the query, a validation message will appear and the dropdown gets populated.
- Filtering time entries after multiple target version filters only after the first version. To reproduce:
- performe de above steps and apply the query
- expand the Target version select to multiselect
- select two versions that have issues with time entries.
- apply the query
- observe that only the time entries related to the issues from first version are returned.
Attached are two patches that fix these 2 issues.
journals
Thank you for finding the probelem. But I think that the root cause of the problem is that TimeEntryQuery#project returns nil instead of the current project. Because of this, subproject dropdown also is not working.
!{width: 531px; border: 1px solid #ccc;}.subproject-dropdown-is-not-working@2x.png!
--------------------------------------------------------------------------------
It seems that the drop-down have been broken by r16170.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Go MAEDA wrote:
> Thank you for finding the probelem. But I think that the root cause of the problem is that TimeEntryQuery#project returns nil instead of the current project. Because of this, subproject dropdown also is not working.
Indeed, you're right. Here is a patch that fixes this. It can be applied before or after my previous patches.
attachment:fix_filter_values_for_fixed_version_id.patch remains a valid patch because that if is not required, fixed_version_values already checks if the project is defined or not.
--------------------------------------------------------------------------------
Added a test also for subproject filter values. It should be applied after my previous patches.
Considering that these issues are quite important, maybe is a good idea to release soon the version:3.4.3 version (which has other important fixes).
--------------------------------------------------------------------------------
Marius, thank you for submitting updated patches. Those are works fine for me.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Committed, thanks.
--------------------------------------------------------------------------------
Jean-Philippe Lang, in this ticket there are 2 more patches that should be committed in my opinion:
1. attachment:fix_filter_values_for_fixed_version_id.patch which removes an unnecessary if and adds a test for the first problem reported by me. If you consider that if necessary, we could commit at least the test.
2. attachment:fix_filter_after_multiple_version_ids.patch which fixes the second problem reported by me in this ticket.
--------------------------------------------------------------------------------
Sorry, both patches are also committed, thanks.
--------------------------------------------------------------------------------
Jean-Philippe Lang wrote:
> Sorry, both patches are also committed, thanks.
No problem, thanks for committing these patches.
--------------------------------------------------------------------------------
related_issues
relates,Closed,13558,Add version filter in spent time report
duplicates,Closed,27117,Cannot select versions in Spent time report