Retrieve user email type preferences from the database
Platform Notice: Data Center Only - This article only applies to Atlassian apps on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.
*Except Fisheye and Crucible
Summary
While you can set the default email type globally in Jira, users have the ability to override this setting within their own preferences. Should you need to retrieve a list of how each user has configured this setting, you can do so via the following SQL example.
Solution
Important Note
This query only returns users who have explicitly set an email type preference. If a user is not returned, they are inheriting the default global value.
select
au.lower_user_name
,ps.propertyvalue
from app_user au
join propertyentry pe
on au.id = pe.entity_id
and pe.entity_name = 'ApplicationUser'
and pe.property_key = 'user.notifications.mimetype'
join propertystring ps
on pe.id = ps.id;Was this helpful?