Defect #34856

Time entry error on private issue

Added by salman mp 5 months ago. Updated about 1 month ago.

Status:ConfirmedStart date:
Priority:NormalDue date:
Assignee:Marius BALTEANU% Done:

0%

Category:Time tracking
Target version:4.1.4
Resolution: Affected version:4.1.1

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.

time_entry.diff Magnifier (856 Bytes) salman mp, 2021-03-08 16:16

add_test.patch Magnifier (1.53 KB) Mizuki ISHIKAWA, 2021-03-18 05:20

0001-Allow-adding-time-entry-on-an-issue-that-became-priv.patch Magnifier (2.55 KB) Marius BALTEANU, 2021-06-09 00:58


Related issues

Duplicated by Redmine - Defect #35038: Error message when limited user want to add time entry an... Closed

History

#1 Updated by salman mp 5 months ago

It's a patch that solve the problem

#2 Updated by salman mp 5 months ago

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

#3 Updated by Mizuki ISHIKAWA 4 months ago

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

#4 Updated by Go MAEDA 4 months ago

  • Duplicated by Defect #35038: Error message when limited user want to add time entry and change assignee for a private issue added

#5 Updated by Go MAEDA 4 months ago

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

Setting the target version to 4.1.3

#6 Updated by Marius BALTEANU 3 months ago

  • Assignee set to Marius BALTEANU

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

#7 Updated by Marius BALTEANU 3 months ago

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

#8 Updated by Marius BALTEANU 3 months ago

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

#9 Updated by Marius BALTEANU about 1 month ago

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

#10 Updated by Marius BALTEANU about 1 month 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.

Also available in: Atom PDF