Fetch user Display Name from DB

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

要約

The purpose of this guide is to explain how to retrieve a Display Name from the database using SQL queries. To clarify, this would be the display name of the user.

An example use case for retrieving the Display Name from the database would be:

Developing scripts that do different automation tasks and you want to extract information such as the display name.

If you want to find the display name in the Jira UI, you can do that by navigating the following:

1. Click on your avatar icon located at the top right corner of the dashboard.
2. In the drop-down menu, select "Profile".

The profile page will open and you will see your display name, along with other profile details like username, email, etc. 



環境

All environments



ソリューション

Use either of these queries to retrieve Display Names from your database

SELECT * FROM app_user AS au
INNER JOIN cwd_user AS cu ON cu.lower_user_name = au.lower_user_name
WHERE au.user_key LIKE 'JIRAUSER%';

SELECT lower_display_name FROM app_user AS au
INNER JOIN cwd_user AS cu ON cu.lower_user_name = au.lower_user_name; 
 


The differences between these queries are:

  • The first query gets all field data from users whose 'user_key' starts with 'JIRAUSER'. You can also specify a particular user's 'user_key' instead.
  • The second query gets only the 'lower_display_name' field for all users.

Last modified on Mar 31, 2024

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.