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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Integrity batch copy items

wstokes
7-Bedrock

Integrity batch copy items

 

 

I would like to copy multiple ALM_Tasks using the Integrity CLI, with a single batch file.

This seems straightforward using

 

im copyissue --type=ALM_Task <ID>

However, I would like to newly copied items to be associated with a different Change Request, and have a slightly different summary. Experimenting with the commands, it seems that

 

im copyissue --type=ALM_Task --field=ALM_Work Item For=<New CR> --field=Summary=<New Summary> <ID>

should work.

 

However, other fields are not copied, such as the named reviewer or the planned effort. I can see there are options in the CLI help such as 

 

--copyFields, --copyFieldsList, --addFieldValues

which I have tried to test out, but I can't seem to get the behavior I want.

 

Is there a straightforward way to simply copy an item, as is, with ALL the current fields? Once I have done this, I could then edit the fields I want as a second command if necessary.

 

thanks

2 REPLIES 2
awalsh
17-Peridot
(To:wstokes)

There are a couple things that could be going on:

  • --copyfields copies all common fields by default, but an administrator can set a copy field list. If your administrator has set a list of fields, then you would have to use the --copyfieldlist to set the list of fields. There's unfortunately no way to say "all common fields"
  • The field is not relevant or editable when creating the item. If you are copying an item, then the new item is created in the initial state. Fields that are only editable or relevant for a later state, or which depend on certain values will not be copied.

 

 

wstokes
7-Bedrock
(To:awalsh)

@awalsh, ok this makes sense.

 

I think the best approach for me would be to copy the item, using the default fields, and then automatically invoke an 

im editissue

 command, to edit the fields to match the original item. If it has to be a two-step process then that is not really a problem I don't think. I just wanted to make sure I wasn't missing a hidden "copyall" option or something...

 

thanks again

Announcements


Top Tags