Patch #16045

Add "Previous Assignee" entry when changing issue assignee

Added by Gurvan Le Dromaguet almost 4 years ago. Updated 5 months ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-

Description

Intention : assign ticket back to previous assignee easily, without scrolling down the list until I found it.

attached proposed implementation as svn patch. It needs to run "db:migrate"

Missing in the implementation:
- previous assignee in contextual menu
- maybe reusing changes done in r12419

Works good and very popular in my firm.

previous-assignee-v1.0.patch Magnifier (4.92 KB) Gurvan Le Dromaguet, 2014-02-06 18:37

20131010000000_add_previous_assignee.rb Magnifier (213 Bytes) Gurvan Le Dromaguet, 2014-03-03 12:07

last_assignee_wip.diff Magnifier (3 KB) Luka Lüdicke, 2016-11-17 11:43


Related issues

Duplicated by Redmine - Feature #24319: Last assigned to option in the Assignee selection list Closed

History

#1 Updated by Gurvan Le Dromaguet almost 4 years ago

Works against 2.4-stable rev 12697

#2 Updated by Toshi MARUYAMA almost 4 years ago

  • Description updated (diff)

#3 Updated by Toshi MARUYAMA almost 4 years ago

  • You missed db migrate file.
  • mix tabs and spaces
  • please add tests

#4 Updated by Gurvan Le Dromaguet almost 4 years ago

Thanks for pointing out !!! attached file, I will work on adding a test.

#5 Updated by Gurvan Le Dromaguet almost 4 years ago

Toshi MARUYAMA wrote:

  • mix tabs and spaces

What is the rule for Redmine ?

#6 Updated by Toshi MARUYAMA almost 4 years ago

Gurvan Le Dromaguet wrote:

Toshi MARUYAMA wrote:

  • mix tabs and spaces

What is the rule for Redmine ?

two spaces for indent.

#7 Updated by Samuel Samfra over 3 years ago

dear all, how do I install this ? patch -p0 for the patch ? What about the rb file ? thank you.. I come from the Java world :)

#8 Updated by Gurvan Le Dromaguet over 3 years ago

Samuel Samfra wrote:

dear all, how do I install this ? patch -p0 for the patch ? What about the rb file ? thank you.. I come from the Java world :)

1- apply "patch -p0"
2- copy rb file to db/migrate
3- run "RAILS_ENV=production rake db:migrate"

#9 Updated by Go MAEDA about 1 year ago

  • Duplicated by Feature #24319: Last assigned to option in the Assignee selection list added

#10 Updated by Luka Lüdicke about 1 year ago

I have a solution for this which does not require an extra column in the database for this, the information can be gathered from the journal_details

I am mentioning it just in case the reason for ignoring this proposal is the extra column.

#11 Updated by Go MAEDA about 1 year ago

Luka Lüdicke wrote:

I have a solution for this which does not require an extra column in the database for this, the information can be gathered from the journal_details

Sounds great. Could you attach your patch to this issue?

#12 Updated by Luka Lüdicke about 1 year ago

Alright, this from how I patched it at our company.

As you can see from the comments, it is a work in progress.
If you like it and want to include it, I can make a "cleaner" diff and add a unit test for the last_assignee method.

(my colleagues really love the feature)

things to look out for:

  • the option should not come up if current user und last_assignee are the same
  • the option should not come up if last_assignee is nil
  • when there is old assignee (new issue), the last_assignee should be the author (TODO)
  • the option should not appear in issue category and bulk update

#14 Updated by Luka Lüdicke 5 months ago

Luka Lüdicke wrote:

If you like it and want to include it, I can make a "cleaner" diff and add a unit test for the last_assignee method.

like I said, if you like it I would make the effort for a clean patch that you could "just" apply...

#15 Updated by Luka Lüdicke 5 months ago

suggestions for specs

Test Plan

Edit Issue

  1. open issue edit form
  2. use select box
  3. expect: last assignee is shown in the fist options
  4. expect: assignment to that user is successful

bulk edit

  1. open multiple issues with batch edit
  2. expect: successful page load and no last assignee option in assigned_to select box

Issue Category

  1. open project settings configuration
  2. open issue categories tab
  3. edit issue category
  4. expect: successful page load and no last assignee option in assigned_to select box

New Issue

  1. create new issue with an assignee
  2. open edit page of that issue
  3. expect: last assignee shows the author of the issue
  4. expect: assignment to the user is successful

Also available in: Atom PDF