This articles provides the solution to the following error messages that you may receive in Spira if you have missing default project attachment types/folders for a project:

APPLICATION.Business.Attachment::Insert: Inflectra.SpiraTest.Business.ProjectDefaultAttachmentTypeException, Can't locate the default project attachment type for project X

or

APPLICATION.Business.Attachment::Insert: Inflectra.SpiraTest.Business.ProjectDefaultAttachmentFolderException, Can't locate the default project folder for project X

If you receive these error messages, you need to run the following SQL against the database:

INSERT INTO TST_PROJECT_ATTACHMENT_TYPE
(
PROJECT_ID, NAME, DESCRIPTION, ACTIVE_YN, DEFAULT_YN
)
VALUES
(
[PROJECT_ID], 'Default', 'The default document type for a project', 'Y', 'Y'
)
GO

INSERT INTO TST_PROJECT_ATTACHMENT_FOLDER
(
PROJECT_ID, PARENT_PROJECT_ATTACHMENT_FOLDER_ID, NAME
)
VALUES
(
[PROJECT_ID], NULL, 'Root Folder'
)
GO

where [PROJECT_ID] is replaced by the ID of your actual project.

 

Article Info
  • Last Updated: 4/4/2013
  • Article ID: KB44
  • Views: 2241