Defect #34856
closedTime entry error on private issue
Added by salman mp over 5 years ago. Updated over 5 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
| time_entry.diff (856 Bytes) time_entry.diff | salman mp, 2021-03-08 16:16 | ||
| add_test.patch (1.53 KB) add_test.patch | Mizuki ISHIKAWA, 2021-03-18 05:20 | ||
| 0001-Allow-adding-time-entry-on-an-issue-that-became-priv.patch (2.55 KB) 0001-Allow-adding-time-entry-on-an-issue-that-became-priv.patch | Marius BĂLTEANU, 2021-06-09 00:58 |
Updated by salman mp over 5 years ago
Actions
#1
- File time_entry.diff time_entry.diff added
It's a patch that solve the problem
Updated by salman mp over 5 years ago
Actions
#2
Also when that user has a role, that only permit to see issues, owned by he/she or assigned to he/she.
Updated by Mizuki ISHIKAWA over 5 years ago
Actions
#3
- File add_test.patch add_test.patch added
Add a test to reproduce the problem.
The test will be successful after applying the time_entry.diff patch
Updated by Go MAEDA over 5 years ago
Actions
#4
- Has duplicate Defect #35038: Error message when limited user want to add time entry and change assignee for a private issue added
Updated by Go MAEDA over 5 years ago
Actions
#5
- Status changed from New to Confirmed
- Target version set to 4.1.3
Setting the target version to 4.1.3
Updated by Marius BĂLTEANU over 5 years ago
Actions
#6
- Assignee set to Marius BĂLTEANU
I would like to take a look on the fix proposed.
Updated by Marius BĂLTEANU over 5 years ago
Actions
#7
- Target version changed from 4.1.3 to Candidate for next minor release
Updated by Marius BĂLTEANU over 5 years ago
Actions
#8
- Target version changed from Candidate for next minor release to 4.1.4
Updated by Marius BĂLTEANU over 5 years ago
Actions
#9
- File 0001-Allow-adding-time-entry-on-an-issue-that-became-priv.patch 0001-Allow-adding-time-entry-on-an-issue-that-became-priv.patch added
I've updated the proposed patch to fix the test (it failed in my environment) and to fix the Rubocop warnings.
Updated by Marius BĂLTEANU over 5 years ago
Actions
#10
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.
Updated by Marius BĂLTEANU over 5 years ago
Actions
#11
- Status changed from Confirmed to Resolved
Patch committed.
Updated by Marius BĂLTEANU over 5 years ago
Actions
#12
- Resolution set to Fixed
Updated by Marius BĂLTEANU over 5 years ago
Actions
#13
- Status changed from Resolved to Closed