I am trying to set "Default outgoing email format" user property under System --> User Default Settings.
When I changes the setting and click "Apply" to apply it to all the existing users. I am thrown the following warning message.
Are you sure you would like to change all users who currently receive 'text'
email to receive 'html' email instead? A total of 98 users will be affected.
Note that this change cannot be undone, and should only be performed if you
really know what you are doing.
We have around 1000 active users.
I ran the following query to display all the users with the property 'user.notifications.mimetype' set and it returned only 121 rows.
SELECT au.user_key, pe.property_key, pe.propertytype, ps.propertyvalue
FROM app_user au
JOIN propertyentry pe ON au.ID = pe.entity_id
JOIN propertystring ps ON pe.ID = ps.ID
where pe.property_key like '%user.notifications.mimetype%'
AND pe.ENTITY_NAME='ApplicationUser';
121 row(s) returned.
Out of the 121 rows returned, 23 are set to value 'html' and 98 are set to value 'text', which is matching the number displayed in the warning message. What about the rest of the users and why are they not listed with any of the queries?
SELECT au.user_key, pe.property_key, pe.propertytype, ps.propertyvalue
FROM app_user au
JOIN propertyentry pe ON au.ID = pe.entity_id
JOIN propertystring ps ON pe.ID = ps.ID
where pe.property_key like '%user.notifications.mimetype%'
AND pe.ENTITY_NAME='ApplicationUser' AND ps.propertyvalue = 'html';
23 row(s) returned
SELECT au.user_key, pe.property_key, pe.propertytype, ps.propertyvalue
FROM app_user au
JOIN propertyentry pe ON au.ID = pe.entity_id
JOIN propertystring ps ON pe.ID = ps.ID
where pe.property_key like '%user.notifications.mimetype%'
AND pe.ENTITY_NAME='ApplicationUser' AND ps.propertyvalue = 'text';
98 row(s) returned
Appreciate your time and response.
Hi John,
I understand that you are adjusting the default user email preference setting in Jira, and in turn are wondering why you are seeing a much lower number of users with this preference defined in the SQL database.
I think I can help explain why this is. Jira doesn't set a "user.notifications.mimetype" value for each user when that user account is created. Only if the user account has manually edited their own profile on the Jira site and manually selected a preference here that was different than the global default at least once will they get that entry in the SQL database that indicates their preference.
If you go back one page the User Default Settings explains this behavior:
Set the default values for user preferences. If the user has not specified a preference then the values for the user will fall back to the default values set here. You can 'Apply' the email preference which will allow you to force each users value to be that of the default.
If an account in Jira has never done this, they won't have that value set at all. In turn their account will always use whatever the default setting is. Because you're then using the Apply action there, only those 98 users are directly having a preference on their account changed here.
The other 23 users that already set to use HTML would not notice this change, because they already selected it, and saved it in their profiles. As for the other 1000 or so users, they already have had that new default setting changed in their profile when you selected it on the previous page as the new default value. The apply action isn't forcing it to their accounts here. There is no need to apply it to their accounts, they are using whatever the default value is.
I hope that helps to explain the situation here. Please let me know if you have any questions or concerns about this.
Cheers,
Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.