Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Structure: How do I use the function USER_DISPLAY_NAME with a username?

Diana
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 1, 2024

I'm trying to make a Formula column that will display the full name from a Notes column where I type in their username.

See screenshot example:

structure-view.PNGformula-box.PNG

Basically, "Notes" column is a place to add points of contact users but aren't assigned to or are reporters of the issue, so we use the Notes column and map it to the Formula column to display their name. Then the ultimate goal would be to Group by Formula. Is there something wrong with how my formula is written?

This is a test example, so "usera" is the username with "User A" is their full name. Same for "userb"

EDIT: also adding that "usera" and "userb" are active users

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Stepan Kholodov _Tempo_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 2, 2024

Hello @Diana Gorv 

The Notes column contains text or numeric values only, and in your case it looks like you want to reference the actual user attribute, and access one of its properties (name). This is not possible to do this way. You can use the formula:

if issuetype = 'Story" : notes

and display 'usera' or 'userb' - the exact values that exist in the Notes column - but if you want 'usera' to be interpreted as a user with user name 'User A', then you need to reference either a different column or a relative field that has this attribute. For example, if an issue has 'usera' as Assignee, you can extract the name through the field like this:

if issuetype = "Story" : user_display_name(assignee)

I hope this helps. If you need further assistance or have other questions about Structure, please reach out to us directly at our support portal and we'll get back to you shortly.

Best regards,
Stepan
Tempo (the Structure app vendor)

Diana
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 5, 2024

@Stepan Kholodov _Tempo_ Thank you for the quick response.

That makes sense. After your response, I dug a little deeper and researched on the documentation and realized the function calls USER_DISPLAY_NAME(UserKey).

I checked using the rest api http://www.example.com/jira/rest/api/2/user?username=usera, and the userkey read as "key":"JIRAUSER12345".

So then, I checked if this can be turned off with dark features (using http://www.example.com/jira/secure/admin/SiteDarkFeatures!default.jspa), and followed this example by adding 

com.atlassian.jira.user.dbIdBasedKeyGenerationStrategy.disabled

to dark features. I then created another user, and I was able to get the formula to display the full name based on the text from the Notes column.

dark-feature.PNG

But it's a lot of workaround, and it doesn't change the previous user's keys, so I'll go by what you suggest and use a custom user picker field.

I think it would be nice if the structure had a formula function that can call by username too, like "DISPLAY_FULL_NAME(username)".

Many thanks!

TAGS
AUG Leaders

Atlassian Community Events