cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

im editissue is overwriting the existing data: I want to append the existing issue with more data

NehaAdhikari
Participant

im editissue is overwriting the existing data: I want to append the existing issue with more data

Hi All,

 

I am trying to update an issue which has some information and I need to update the issue by just adding new information to it, so my issue should add information to the existing one but when I am trying to update the issue with im editissue command it is overwriting the existing record which is not needed.

My command for creating the content is :

 

im createcontent --insertLocation --parentID=7899401 --type="ALM_Test Case" --field=Category="Heading" --richContentField=ALM_Text="<html><body><H4>Test data insertion for the first time</H4><p>Feature Sets<br> line breaks<br> in a text,<br> use the br<br> element.</p></body></html>"

this created a content with id 7900381

now I am executing the below command to update the issue and I am expecting it to append the information but it is replacing the existing information by overwriting it.

 

im editissue --richContentField=ALM_Text="<html><div class="section" id="feature-sets"><h1>Feature Sets</h1><ul class="simple"><li>Test data to be updated in existing content</li></ul></div></html>" 7900381

 

Please let me know if there is some additional parameters to the command or some other command to update the issue without overwriting it.

 

Thanks!!!

4 REPLIES 4

Re: im editissue is overwriting the existing data: I want to append the existing issue with more dat

What PTC's software are you using?

Re: im editissue is overwriting the existing data: I want to append the existing issue with more dat

PTC Integrity 10

and I am executing it from command prompt.

Re: im editissue is overwriting the existing data: I want to append the existing issue with more dat

I think someone had asked this question a while ago and I'm sure the answer is going to be the same:

There is no parameter or im command that allows to do what you want easily. The only way Integrity appends data to a field is if it's of type Long Text with the Logging option.

Given that you use the ALM "Text" field, you cannot use that option.

So the only solution is for you to write your script so it does the append: read the previous data, append the new data, save the whole thing. If you're using basic scripting as the example suggests, this is not an easy task.

If I had to do it, I would use a server-side trigger and a separate field to enter the new text. The trigger would grab the text from the new field and append it to Text. I would have it also clear the new text field to avoid confusion.

This could also be done via client-side scripting, with VBscript for example, or with the API.

Actually, because you're using the "Text" field which is pretty central to the ALM solution, I'm not sure of your exact use case, so there could be many variations on my explanations.

But the bottom line: is no parameter or command to do that.

Re: im editissue is overwriting the existing data: I want to append the existing issue with more dat

Hi @NehaAdhikari 

 

First execute "im issues --fields=ALM_Text:10:rich --showXHTML". Then store this information in some variable and append the same with new text content and parse to im editissue. This is the way you could preserve. 

 

Regards,
Sathish Kumar Kamaraj

Announcements