Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can i log the name who transited the issue?

Boyd Hong
Contributor
December 14, 2021

Hi,

When any logged-in user moves the issue status from 'Pending' to 'Work-In-Progress,' I plan to add an auto remark to the internal note section. For example, if user 'George1234' moves the issue status from 'Pending' to 'Work-In-Progress,' the name 'George1234' is added to the internal note area.

What is the best approach to identify the current user and make it a variable/smart-value?

Thanks,

Somnuek

2 answers

0 votes
Alex Koxaras _Relational_
Community Champion
December 15, 2021

Hi @Boyd Hong and welcome to the community,

There are three approaches with which you can accomplish that:

  • Via workflow
  • Via JA
  • Via listener (scripted) [not going to talk about it though]

If you want to do it via workflows, then could follow the approach of @Pramodh MIn this case you will only get the last person who made this transition, because this value will be overwritten.

With Jira Automation, you can create a rule and define within the scope of the project, to update a field (multi line text) and add with each transition the user's name to that field. Editing this field with advance editing you can add this code to retrieve the current user:

{ 
"update": {
"customfield_XXXXX": [{
"add": {{initiator.accountId.asJsonObject("id")}}
}]
}
}

 

It is not clear to me however from your question, what exactly is the internal note. Is it a field? Most likely yes. But what kind of field? Do you want to keep only one value or many? In which transitions you want this to occur? All of them or some of them?

0 votes
Pramodh M
Community Champion
December 14, 2021

Hi @Boyd Hong 

Create a User Picker Custom field and add the post function in transition from one status to another to populate the field with the current user option as below shown

Current User.png

You also need to add the field in the Screen to show who made the current transition if in case that is required.

FYI,

This is already recorded in Jira and you can search the issues who made the transition from one to status to another using Advanced JQL.

Thanks,
Pramodh

Dirk Ronsmans
Community Champion
December 15, 2021

Especially this last point:

This is already recorded in Jira and you can search the issues who made the transition from one to status to another using Advanced JQL.

I would urge you to use the build in feature instead of adding another automation to the system while it is already being recorded any way.

Debra Jones February 3, 2022

Can someone advise what the Advanced JQL would be for this?

Thanks

Like Boyd Hong likes this

Suggest an answer

Log in or Sign up to answer