ClearQuest 有没有办法查询文档中包含的列表?

发布于 2024-07-07 05:53:42 字数 156 浏览 8 评论 0原文

我有一个 Word 文档中包含的缺陷 ID 号列表,并且想知道是否有一种方法可以在 ClearQuest 查询或 ClearQuest 中的 SQL 查询中使用该列表来将这些缺陷移至新状态。 我们谈论的可能是数百个缺陷中的数百个,因此我不想从所有缺陷中单独选择缺陷。

谢谢。

I have a list of defect ID numbers contained in a Word document and want to know if there is a way to use that list in a ClearQuest query or an SQL query in ClearQuest to move just those defects to a new State. We're talking possibly hundreds of defects out of many hundreds, so I don't want to individually select the defects from all defects.

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧人九事 2024-07-14 05:53:42

如果您可以使用 CQPerl,则可以在外部脚本中轻松完成此操作。

读入数据,然后循环遍历它,如下所示:

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

如果需要直接从word中读取,可以在这里看到:
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";
    }

If you are ok using CQPerl you can easily do that in an external script.

Read in the data, then loop through it like:

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 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";
    }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文