Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,299,484
Community Members
 
Community Events
165
Community Groups

i want to add the username of whoever ran the last transition.

Hi, when i run a transition in the workflow how can i add the name of the user running that transition in the custom field

thank you.

 

Adsız.png

2 answers

0 votes
John M Funk Community Leader Jun 02, 2022

Hi Serkan,

You should be able to add a post function that sets the value of the custom field = currentUser()

Hi @serkan_sezer ,

you could set a custom script postfunction (ScriptRunner) on the transition who you're interested and in this postfunction, get the lastModifyUser with this code:

def lastModifyUser = ComponentAccessor.userManager.getUserByKey(ComponentAccessor.changeHistoryManager.getAllChangeItems(issue).last().userKey).name

Then use it to populate your custom field.

Hi, Thank you for the reply. I want to continue without using the ScriptRunner feature.

We do not have the ScriptRunner plugin.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

277 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you