1

I want to add one word in the beginning of "RQ_Description Text" field, keeping the existing content as it is. The below script gets the job done, However the Rich text content and images are lost in the process. How would I preserve it?

NOTE: I'm working on a Requirement Document in MKS/IMS Integrity Tool

#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; 

0 Answers0