Attachment Object

Applies to QAComplete 14.5, last modified on August 06, 2024
Since release 10.2, this functionality is obsolete and is supported for backward compatibility only. We recommend that you use QAComplete REST API to access and manage data in QAComplete.

An Attachment object represents a file or link attached to an item (a defect, contact, and so on) in QAComplete. An attachment can be:

  • A file
  • A URL, for example, http://smartbear.com
  • A UNC path, for example, file:///\\server\shared\screenshots.zip.

Using the API, you can get a list of attachments, download, add, and delete attachments. To do this, the authenticating user must have the Read, Add, Update, and Delete privileges for the items list screen (Releases, Defects and so on) that contains the attachments. You can view or set access privileges in  > Setup > Security > Security Groups > Manage Security Rights > select user group.

Properties

AttachmentId  :  integer

The unique identifier of the attachment.

FKId  :  integer

The ID of the QAComplete item (a release, defect, and so on) that contains the attachment. For defects, this is the BugID property of the defect; for releases – Id of the release, and so on.

EntityCode  :  string (max 100 chars)

The type of the item the file is attached to. Possible values:

  • Bugs (defects)
  • Contacts
  • FileExchanges (shared documents)
  • FunctionalSpecs (requirements)
  • ProjectPlans
  • ProjectPlanTasks
  • ProjectTasks (agile tasks)
  • Releases
  • TestCases (legacy test cases used in release 9.6.0 and earlier)
  • TestConfigurations
  • Tests
  • TestSets

AttachmentTypeCode  :  string

The attachment type. Always File.

Seq  :  integer

Read-only property. Shows the ordinal number of the file on the attachment list.

FileName  :  string (max 255 chars)

The file name, URL or UNC path.

FileNameZipped  :  string (max 255 chars)

For files, this is the file name of the zipped attachment in the QAComplete database.

For web links (URLs) and UNC paths, this is the same value as FileName.

Title  :  string (max 255 chars)

The user-friendly name (title) of the attachment.

XML entities in the title are double encoded:

& – &

< – &amp;#60;

> – &amp;#62;

The default value is the same as FileName.

Comments  :  string (max 8000 chars)

Comments to the attachment. Can include HTML markup. Default value: empty string.

FileFormatCode  :  string (max 100 chars)

Description of the file type.

DateCreated  :  dateTime

The date and time the attachment was created.

DateUpdated  :  dateTime

The date and time the attachment was last updated.

UpdateUserId  :  integer

The ID of the last user who updated the attachment.

UserName  :  string (max 78 chars)

The name of the last user who updated the attachment (in the LastName, FirstName format).

ProjId  :  integer

Read-only property. The ID of the QAComplete project that contains the attachment.

OriginalId  :  integer

If the entity to which the attachment belongs is synchronized with a JIRA item, the OriginalId property specifies the ID of the attachment in JIRA.

Relevant Operations

Example

XML

<Attachment>
  <AttachmentId>19</AttachmentId>
  <FKId>2</FKId>
  <EntityCode>Tests</EntityCode>
  <AttachmentTypeCode>File</AttachmentTypeCode>
  <Seq>0</Seq>
  <FileName>readme.txt</FileName>
  <FileNameZipped>Attach2-1407210141191-readme.zip</FileNameZipped>
  <Title>Read this first</Title>
  <FileFormatCode>Text File</FileFormatCode>
  <DateCreated>2014-07-21T01:41:19.247</DateCreated>
  <DateUpdated>2014-07-21T02:08:27</DateUpdated>
  <OwnerUserId>25315</OwnerUserId>
  <UpdateUserId>25315</UpdateUserId>
  <UserName>Doe, John</UserName>
  <ProjId>11873</ProjId>
</Attachment>

See Also

Attachments_Add Operation
Attachments_GetAttachment Operation
Attachments Operations

Highlight search results