How best to set custom field post function with user making transition

Patrick Davis March 28, 2023

Hi folks,

I'm working with a workflow requirement to essentially stamp a read-only custom field with the username of the person who conducts a specific workflow transition. After a little bit of rudimentary research, it seems possible that I can add a post function to the transition and use scriptrunner for this.

Have you solved this before? What has worked for you?

1 answer

1 accepted

0 votes
Answer accepted
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 28, 2023

Hi Patrick,

yes, they’re probably a variety of ways to do this, including an automation rule. Create a trigger based on issue, transition, then add any conditions you might need, then add a new action for edit issue.

Then, in the edit issue component, you can put in code, such as 

{{issue.initiator.accountID}}

Patrick Davis March 31, 2023

Adding a trigger is what I ended up doing, thanks for the suggestion.

Like John Funk likes this
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 2, 2023

Great! Glad it worked for you. 

Ashwini_More _miniOrange July 3, 2023

Can we do it with other users' details like the department? Like I want to fill the issue field with the reporter's department.

Like John Funk likes this
John Funk
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 3, 2023

Jira can't grab the Department from AD or other ID systems directly like that. But you can use an add-on in some cases to populate a custom field in Jira with the Department or Location or Leader, etc. 

Also, it's best if you create a new question for your circumstance so more people will see it and can respond. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events