How to create an auto assign to previous assignee in Jira?

alexxkey January 18, 2018

I don't know how create auto assignment to previous assignee using custom field and post function when I change issue status (or dragging it to other status column on the board). Here, at this community a read other comments, but there is still no clear understanding except "create custom field" and use post function.

Can somebody explain me how to do that in detail? Like "chose that menu, click certain button, then go to some settings etc"? I can use post function to assign next assignee, but don't know how to assign previous.

Here I illustrate what I mean.

Thanks in advance for help.

3 answers

1 accepted

3 votes
Answer accepted
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 18, 2018

Hi Alex, 

do you have the "Jira Misc Workflow Extension" or the "Suite Utilities for Jira" app? You need a post function to copy a value from a custom field to the assignee field. That is not working out of the box.

If you have one of these, I can give you a step-by-step solution. 

alexxkey January 18, 2018

No, I don't have, but I thought there is no need of third-party plug-in and it is possible to resolve this question using Jira tools.

So, I can use auto assign to next user but can't use auto assign to previous (last) without any plug-ins?:)

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 18, 2018

Not as far as I know. You have to put the actual user in a custom field, every time you make a transition in our workflow. That's ok with Jira out-of-the-box.

But for copying the user from the custom field to the assignee field, there is no function in Jira.

Like Sharon Levi Alfi likes this
alexxkey January 18, 2018

Ok, I get it. Can you describe how to do that using JMWE?)

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 18, 2018

I'll do tomorrow. For today, I'm out of office.

alexxkey January 18, 2018

Thank you, Thomas!

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 19, 2018

So here is what you have to do:

  • open http://<your-jira-url>/secure/admin/ViewCustomFields.jspa
  • Click on "Add Custom Field"
  • Select Field Type "User Picker" and click "Next"
  • Name your field "Last Assignee" and click "Create"
  • Do not associate any screens on the following page (the field is just used internally and shouldn't be set manually)

And now to the workflow:

  • Edit your workflow
  • Add the following postfunction to every transition:  "Copy Value from Field to Field" - Copy the Assignee to "Last Assignee"
  • In the transition where you want to assign the issue to the last assignee, just use that postfunction the other way round

 

But, if you have the Jira Misc Workflow Extensions, there is another postfunction that is much easier to use: "Assign to last role member" - you can assign the issue automatically to the role member, who had the issue assigned before. With that postfunction, you don't even need a custom field! I haven't tested that function up to now, but I think, this is exactly what you need.

Like # people like this
alexxkey January 19, 2018

Thank you very much, Thomas!

James Roxburgh July 5, 2018

Yes, thank you @Thomas Schlegel, very useful! 

Tauqir Rao November 14, 2019

@Thomas Schlegel  

I have a problem with post function. 

In "add post function" I do not have any option to update last assignee field.

 

updateField.PNG

 

 

In "Update issue field" I have following options

field.PNG

 

Please help me in updating last assignee field.



Priyanka Lavania
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 25, 2019

Hi @Tauqir Rao ,

 

I don't think you have either ScriptRunner or JMWe plugins installed, you would get the additional post function options once you install anyone of them.

 

Regards,

Priyanka

Tauqir Rao November 25, 2019

Hey @Priyanka Lavania

 

Thanks for your concern.I found another way to get the required functionality.

 

Regards

Sebastian Loeffler October 14, 2021

@Tauqir Rao  Which way did you find, '%%CURRENT_USER%%'?

1 vote
Graham Twine _Slm_ April 4, 2023

This is quite an old post however in the event that someone stumbles upon it.
It turns out this is quite simple in automation for jira

1 vote
Priyanka Lavania
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 19, 2019

This can also be done using Assign to last role member in script runner post function

Graham Twine _Slm_ August 22, 2019

This response should be down voted.

Please do a little more than say oh yes I have an awesome idea but i will not tell you

Priyanka Lavania
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 9, 2019

Hi @Graham Twine _Slm_

:) If you have Adaptavist script runner plugin, you can use its post function on workflow transition, name of the function is - assign to last member of the role, 

It will reassign the ticket to the person who was previous assignee from that role. 

Steps:

  1. Open desired workflow in edit/draft mode.
  2. Click transition on which the action is needed
  3. Click Add post function
  4. Click Script Post-Function
  5. Click Add
  6. Select Assign to last member of the role (script option)
  7. Select the role (check other options if you want on this screen)
  8. Click Update
  9. Publish the workflow

 

Hope this helps :)

Regards,

Priyanka

Graham Twine _Slm_ September 10, 2019

Thanks @Priyanka Lavania

I am quite comfortable in groovy. The issue at hand is this.

The last person who was assigned to the issue is in most cases not the developer I am attempting to assign the issue to.

The person is the first person to have the issue when it enters a given state.

 

G

Priyanka Lavania
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 10, 2019

Hi @Graham Twine

Got it, I had similar case where the only way I could find is to store this the value in another custom filed when status changes. With complex groovy it might be possible to check issue history and get previous assignee, but we rather chose simple approach.(Explained by Thomas Schlegel  above)

For role based assignee I used Script Runner.

 

Regards,

Priyanka

Parveen Vats January 19, 2023

Hi! Priyanka,

Can you plz explain it to me ? 

When we create any issue we can set default assignee or we can assign it for the first time manually after issue creation. Till this stage that should be considered as first/original assignee of the issue.

Later I want to change the assingee but I want that the first/original assignee of any issue to be captured in customer field whenever Assignee is changed. And then value in custom field should remain static even after second time assignee is being changed.

Custom field to be populated with first assignee name once change in assignee for the first time.

 

Plzzzzz help. I am new to Jira.

 

Thanks

hamidreza February 4, 2024

hi 

all change in issue، record in history field so i think you don't need to create new custom field

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events