After a restart of Jira or after disabling/re-enabling R4J, the attachments of some folders not available anymore:
Attachment of R4J folders do not exist anymore.
Within the R4J folder descriptions, the embedded images (attachments) are shown as a broken image.
Jira issues are NOT affected.
Improvement of R4J to these versions which should remove unused or temporary attachments only.
If you’re in version 4.13.1, 4.14, or 4.14.1, upgrade to 4.13.2, 4.14.2, or higher without restarting Jira or disabling the plugin.
Upgrade to R4J 4.13.2, 4.14.2, or higher.
If your folder attachments have been lost, you can recover these from your Jira DB backups and either:
Manually upload the attachments to your respective folders in the R4J folder user interface or
If the attachments are non-existing in your local machine, you can copy the attachment data from a previous database backup to the current database, and then manually copy and rename/match the attachments in the application directory.
If you plan to proceed with the solution #2, here are some important notes before you proceed with this option:
We strongly recommend to make backups always before doing any database changes.
Restore the last backup in your test/staging instance with the attachment still existing (could be from the previous version installed before installing 4.13.1, 4.14, or 4.14.1) for table "AO_242870_ATTACHMENT" only.
Limitation: New attachments added from the previous database backup up to the current database in table "AO_242870_ATTACHMENT" will be lost.
After the attachment data has been restored to the current database, you still need to put the attachments in the application directory.
Go to the folder that you want to attach to and get the folder id from the URL.
Query R4J table "AO_242870_ATTACHMENT" to get the attachments for the folder in #1:
SELECT FOLDER_ID,DISPLAY_NAME,FILE_NAME FROM "AO_242870_ATTACHMENT" WHERE "FOLDER_ID" = <folder_id>
Each attachment in "AO_242870_ATTACHMENT" was saved with the file name as DISPLAY_NAME and an auto-generated UUID as FILE_NAME.
Go to the application directory (…/jira/data/ease.requirements.files/folders/attachments/<project_key>/<folder_id>).
Put the attachment with the corresponding DISPLAY_NAME from your system to the application directory and rename it to the UUID value in FILE_NAME in #3.
Refresh the folder. The attachments should now be displayed.