PQA Clearquest:: Spacing out

  • Posted on
  • by
  • in
  • Fixed minor problems with trailing spaces on fields
  • Fixed minor problem with space filled Software_Revision
  • Fixed problem where field names were reversed.
  • Submitter and Submit_Date are set by action hooks to the current username and current date/time. We'll need to turn this off if we want the old Submitter and Submit_Date.
  • Implemented Attachment Handling

Trailing spaces

There are some minor problems with the data involving spaces. For example, a Prod:HUT_Version is set to "BCM95704CA40 v1.0 revA0 " - Note that it has a trailing space. Well AddToFieldChoiceList() attempts to add this value but the Clearquest API trims the trailing space! This results in a validation error as "BCM95704CA40 v1.0 revA0 " is not equal to "BCM95704CA40 v1.0 revA0". The solution here is to trim the trailing space before calling AddToFieldChoiceList().

Space filled Software_Revision

Prod:Software_Version would sometimes come in as " " instead of "". My code was only checking for "" and changing that to "N/A". It now also checks for " ".

Field name reversal

Some fields, for example ReportedBy, were supposed to be renamed to another field name, i.e. Reported_By, in the destination database but my code reversed the field naming change. It's odd that Clearquest was OK with adding ReportedBy field to Cont as there was no ReportedBy field in Cont. Adding the correct field name solved a problem with Visibility and its action hook.

Attachments take time!

While the TransferAttachments() routine now works, it adds a significant amount of time to the processing of defects with attachments. Some attachments are as large as 82 Meg! There are zip files, Excel spreadsheets, screen dumps in the very inefficient BMP file format and Ethreal dumps and even tape I/O dumps. TransferAttachments() operates by extracting the files from the source database to disk then calling AddAttachment() to copy the files back into the new DB. While not the most efficient way to do this I see no other way given the current Clearquest API.

As a measure, previously it took 16 minutes and 44 seconds to merge 1382 defect records from TO -> Cont, with attachments it took 4 hours and 11 minutes!!!

Ah, figured out why it took so long. I was using a snapshot view that was housed on my laptop. So the attachment files were being written to the current working directory, my snapshot view on the laptop. So those writes and reads were over the network. To make matters worse my laptop was not even at Broadcom, rather it was at my house. So those 82 meg files had to travel from Broadcom though my small DSL connection and even through a VPN! No wonder it took so long!

Now running it in ~vobadm/My Documents on the server and it's much quicker... Only 25 minutes and 21 seconds.