Defect #34856
closed
Time entry error on private issue
Added by salman mp over 3 years ago.
Updated over 3 years ago.
Description
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.
Files
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
- Has duplicate Defect #35038: Error message when limited user want to add time entry and change assignee for a private issue added
- Status changed from New to Confirmed
- Target version set to 4.1.3
Setting the target version to 4.1.3
- Assignee set to Marius BĂLTEANU
I would like to take a look on the fix proposed.
- Target version changed from 4.1.3 to Candidate for next minor release
- Target version changed from Candidate for next minor release to 4.1.4
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.
- Status changed from Confirmed to Resolved
- Status changed from Resolved to Closed
Also available in: Atom
PDF