You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hello,
I am using behaviour to set the current user in a field (User picker type) when issue moves to Done (on Done screen).
I want to display only the full name of the current user, But wen I did it in my script, Jira cam't find this user.
This is my script:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.fields.CustomField
import java.sql.Timestamp
def customFieldManager = ComponentAccessor.getCustomFieldManager()
// Getting custom field object
def CustomFieldName = getFieldById("customfield_XXXXX")
//Get current user
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser();
def fullName = currentUser.displayName
CustomFieldName .setFormValue(fullName.toString())
How can I do this display without distroying the functionallity?
Attached print screen of the behaviour:
Thank you!
Daniel
I know this is very old post.
You can use in line 13.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.