Is there a way in ClearQuest to request a list contained in a document?

I have a list of defect ID numbers contained in a Word document, and you want to know if there is a way to use this list in a ClearQuest query or SQL query in ClearQuest to move only these defects to a new state. We are possibly talking about hundreds of defects out of many hundreds, so I don’t want to individually select defects of all defects.

Thanks.

+4
source share
1 answer

If you use CQPerl, you can easily do this in an external script.

Read the data, then skip it as:

foreach $id (@idList) { my $entity = $session->GetEntity('defect', $id); $session->EditEntity($entity, $action); my $validate = $entity->Validate(); print "Validate results $validate."; $entity->Commit(); } 

If you need to read directly from a word, you can see here: http://www.wellho.net/solutions/perl-using-perl-to-read-microsoft-word-documents.html

 use Win32::OLE; use Win32::OLE::Enum; $document = Win32::OLE -> GetObject($ARGV[1]); open (FH,">$ARGV[0]"); print "Extracting Text ...\n"; $paragraphs = $document->Paragraphs(); $enumerate = new Win32::OLE::Enum($paragraphs); while(defined($paragraph = $enumerate->Next())) { $style = $paragraph->{Style}->{NameLocal}; print FH "+$style\n"; $text = $paragraph->{Range}->{Text}; $text =~ s/[\n\r]//g; $text =~ s/\x0b/\n/g; print FH "=$text\n"; } 
+1
source

All Articles