Project

General

Profile

Actions

Defect #34856

closed

Time entry error on private issue

Added by salman mp about 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Time tracking
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

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

Related issues

Has duplicate Redmine - Defect #35038: Error message when limited user want to add time entry and change assignee for a private issueClosed

Actions
Actions #1

Updated by salman mp about 3 years ago

It's a patch that solve the problem

Actions #2

Updated by salman mp about 3 years ago

Also when that user has a role, that only permit to see issues, owned by he/she or assigned to he/she.

Actions #3

Updated by Mizuki ISHIKAWA about 3 years ago

Add a test to reproduce the problem.
The test will be successful after applying the time_entry.diff patch

Actions #4

Updated by Go MAEDA almost 3 years ago

  • Has duplicate Defect #35038: Error message when limited user want to add time entry and change assignee for a private issue added
Actions #5

Updated by Go MAEDA almost 3 years ago

  • Status changed from New to Confirmed
  • Target version set to 4.1.3

Setting the target version to 4.1.3

Actions #6

Updated by Marius BĂLTEANU almost 3 years ago

  • Assignee set to Marius BĂLTEANU

I would like to take a look on the fix proposed.

Actions #7

Updated by Marius BĂLTEANU almost 3 years ago

  • Target version changed from 4.1.3 to Candidate for next minor release
Actions #8

Updated by Marius BĂLTEANU almost 3 years ago

  • Target version changed from Candidate for next minor release to 4.1.4
Actions #9

Updated by Marius BĂLTEANU almost 3 years ago

I've updated the proposed patch to fix the test (it failed in my environment) and to fix the Rubocop warnings.

Actions #10

Updated by Marius BĂLTEANU almost 3 years ago

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.

Actions #11

Updated by Marius BĂLTEANU over 2 years ago

  • Status changed from Confirmed to Resolved

Patch committed.

Actions #12

Updated by Marius BĂLTEANU over 2 years ago

  • Resolution set to Fixed
Actions #13

Updated by Marius BĂLTEANU over 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF