1

我想在“RQ_Description Text”字段的开头添加一个单词,保持现有内容不变。下面的脚本完成了工作,但是富文本内容和图像在此过程中丢失了。我将如何保存它?

注意:我正在编写 MKS/IMS 完整性工具中的需求文档

#This script is used to edit "RQ_Description Text". 

#The file "input.txt" contains the Integrity item IDs     
open FH,"<D:/input.txt";

while(<FH>)
{
 # READ ITEM IDS
 my $new_chapter_id=$_;
 $new_chapter_id=~s/[^0-9]//g; 

 #READ THE CONTENTS OF RQ_DESCRIPTION TEXT FIELD
 my $command_export_read="im issues --fields=\"RQ_Description Text\" $new_chapter_id" ;
 my $command_output_export_read = qx($command_export_read);

 #ADD THE INTENDED TEXT TO THE EXISTING CONTENT
 $command_output_export_read = 'Abhishek'.$command_output_export_read;
 my $command_export_edit="im editissue --richContentField=\"RQ_Description Text=$command_output_export_read\""." $new_chapter_id" ;

 #UPDATE IN INTEGRITY
 my $command_output_export_edit = qx($command_export_edit);

}
close FH; 
4

0 回答 0