Custom avatars missing after upgrade or migration of Jira server

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Custom project, request type, issue type or user avatars are missing after migrating JIRA applications to a new version or different server.

Causes

Custom project, request type, issue type or user avatars are not stored as part of the database or XML backup and so need to be migrated manually after upgrading or migrating JIRA applications.

Cause 1

If you have recently migrated your JIRA server from one server to another, and your JIRA version is at least 6.1.7, then it's possible that the <jira-home>/data/avatars directory was not migrated. As this is where general avatars are stored, this directory should be migrated along with the rest of the JIRA file system from the old server.

Cause 2

When upgrading/migrating JIRA from a version less than JIRA 6.1.7 to a version equal or greater than version 6.1.7 the avatars directory from an existing instance needs to be available before starting the JIRA instance. This is because upgrade tasks execute on the avatars directory, causing these files to be renamed. If the files are not available, these files can not be updated and then 'avatars' directory becomes out of sync with the file system.

To avoid this situation, take a copy of the Avatars directory when upgrading JIRA and place this into the avatars directory of the JIRA Home Before upgrading JIRA to a JIRA 6+ environment. This will ensure that the avatars are correctly migrated to the expected version.

Basically, you must have the avatars directory ready and available in the avatars directory (under <jira-home>/data/avatars) when upgrading to JIRA 6.1.7 and higher from a version older than 6.1.7.

Diagnosis

Cause 1

  • Your JIRA version is equal to or greater than 6.1.7
  • JIRA_HOME/data/avatars (or if multi-node data Jira Data Center, <jira-shared-home>/data/avatars) was not migrated with the other JIRA data

Cause 2

  • You upgraded/migrated JIRA from a version less than JIRA 6.1.7 to a version equal or greater than version 6.1.7
  • Execute the following query on your JIRA Database:
SELECT id, filename FROM avatar;
  • Check that the filenames in your avatars directory <jira-home>/data/avatars/ match the reported filenames. The Filenames will have the format:  ID_[size]_FILENAME.
  • (info) In some cases you may notice an extension: '*jrvtg.png' This is an indication that the avatar files have been upgraded from an older version of JIRA. 

Resolution

  1. Move or copy the images in <jira-home>/data/avatars/ from the old JIRA application instance to the new one.
  2. If Cause 2, ensure the Avatars directory file names match those in the database

Example

Below there is an example of custom avatars, and the relation between the database entries and file system:

Custom project avatar

Custom project request type avatar

Custom issue type avatar




Database entries and file system files on <jira-home>/data/avatars


The same applies for user profile custom avatars.


Last modified on Jun 27, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.