Vote #81298
完了Time entry error on private issue
0%
説明
When someone edit a private issue that he/she is not auther of that, and simultaiusly changed assignee and submit a time entry, there will raise an error that says "issue number is wrong" and "time entry is wrong" too.
journals
It's a patch that solve the problem
--------------------------------------------------------------------------------
Also when that user has a role, that only permit to see issues, owned by he/she or assigned to he/she.
--------------------------------------------------------------------------------
Add a test to reproduce the problem.
The test will be successful after applying the time_entry.diff patch
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Setting the target version to 4.1.3
--------------------------------------------------------------------------------
I would like to take a look on the fix proposed.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
I've updated the proposed patch to fix the test (it failed in my environment) and to fix the Rubocop warnings.
--------------------------------------------------------------------------------
Also, I've added an extra condition to allow this only when the previous assignee is the current user (@issue.previous_assignee == User.current@). Please let me know what do you think.
--------------------------------------------------------------------------------
Patch committed.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
related_issues
duplicates,Closed,35038,Error message when limited user want to add time entry and change assignee for a private issue