Saving attachments in QC Plus

By: Jeremy North

Last Updated: December 3rd, 2007

Attachment Basics

When viewing a report within QC Plus you can see if the report does have an attachment if, in the top right hand corner of the report header there is a paper clip icon. This instantly informs you that the report you are viewing has an attachment.

Hide image

Double clicking on the paper clip in the report header takes you to the attachment page.

Attachment Page

The attachment page for a report shows either the list of attachments linked to the report or a list of options on adding an attachment to the report.

The attachment page lists each file attached to the report as well as the path, size and timestamp. Double clicking on a file with the attachment list opens that file using the default file viewer for the selected file type.

Saving Attachments

You do not have to be on the attachments page to save the attachments associated to the report. You can access a save attachments context menu item from the default context menu for the report. While certain controls have their own specific context menu item (long description and steps are examples) the majority have a generic context menu which is pictured below. This generic context menu has a Save Attachments... menu item on it.

Hide image

The context menu on the attachments tab deals only with commands applicable to attachments.

Hide image

We will come back and complete the steps for saving an attachment shortly.

Where to save attachments?

By default QC Plus attempts to save attachments to your temp folder. However you always get the last say over where the save location is and can even customise this location for future use.

Setting up the default save location

Select Tools | Options to display the options dialog for QC Plus. I recommend browsing the options available as there are quite a number of customisations that you can do to the QC Plus application.

Hide image

Figure 1

The General options page contains the settings for default attachment location. There are three settings specific to attachments on this page all contained within the group box labeled Attachments.

The first edit control contains the folder you want your attachments to be saved in. You can select an existing folder using the ellipsis button to the right or enter in a new folder location. If the folder doesn't exist when saving an attachment you will be prompted to create the new folder.

The second and third options are related. These options allow you to specify a subfolder for the folder you selected in the first edit control. The subfolder is special in that it can contain the actual report number of the attachments you are saving. This enables you to have a unique folder for each reports attachment. The subfolder can also contain valid folder text but must also contain the $reportno$ string. This string is added to the end of the subfolder string if removed.

Using the settings specified in Figure 1 the following folder structure would be created.

Hide image

Back to saving the attachment

Now that the default folder is setup for saving attachments, it is time to save one. Locate the report you wish to save the attachment of and select Save Attachment from one of the context menus.

The first dialog you will be presented with is the dialog that confirms the location for the attachment.

Hide image

As we specified in the attachment options our folder has a subfolder that contains the report number prefix with the letters QC. You can see that the to right of the folder edit control there is an ellipsis so an alternate location can still be set for this particular attachment.

There is also a reminder that you can modify the default folder location using the options dialog.

Selecting OK to confirm the folder location is where you want this attachment to be saved. Confirm creating the new folder (if it didn't already exist) by selecting OK on the following dialog also.

Hide image

The cursor will be an hourglass while the attachment is being downloaded to your desired location. Once the attachment has been downloaded you are presented with another dialog with some more options to choose.

Hide image

Figure 2

Figure 2 shows the Attachment Saved dialogs default settings. By default, the attachment saved does no actions. While this is the default settings it definitely isn't the settings I prefer to use.

An explanation of these choices is in order.

Open destination folder     Select this option to open the folder in windows explorer.

Open attachment           Select this option to open the downloaded attachment in your default zip application ready for extraction.

Do nothing                          Take no action.

You must select one of the first three items. That is why radio button controls are used. The following two items are optional.

Unzip attachment              Select this option to unzip the downloaded attachment in the folder the attachment was downloaded in.

Delete attachment once unzipped          If you select to unzip the attachment you also have the option of deleting the attachments zip file from your system. You can only select this option if Unzip attachment is also selected.

Save settings for next time          Select this check box to have your selections be the defaults the next time the dialog is displayed. It is important to note that selecting this option does not suppress this dialog. This dialog will always be displayed.

Changing the saved settings

If you would like the Process saved attachment dialog to be displayed again, you can do this by unchecking the Process Saved Attachments item in the list on the Dialog options page.

Hide image

Note: The Process Saved Attachments option will only be displayed in this list when you have previously selected the Save settings for next time checkbox.

Summary

These are just some of the features QC Plus has when dealing with attachments in the QualityCentral database.


Where to get QC Plus

You can download QC Plus from http://www.jed-software.com/qc_download.htm.

The QC Plus homepage is http://www.jed-software.com/qc.htm.

Tips and Tricks will be posted on my blog http://jedqc.blogspot.com/.

About the author

You can contact Jeremy via the contact page on his website at http://www.jed-software.com/.

JED Software provides the Delphi community with developer tools, specialized components and other IDE enhancements. Some are free, while others incur a small fee.