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

Get IssueId when creating issue from command line

SOLVED
Highlighted
Newbie

Get IssueId when creating issue from command line

Hi Team,

I'm using batch file to create new issues ( im createissue) based on certain conditions. Is there any way i can get the ID of newly created item using the same batch file ?

Regards,

Arun

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Get IssueId when creating issue from command line

Hi Arun,

I am not sure whether using the --gui option gives you a result on the command line at all, as you'll get the visual feedback.

Without the --gui option your command should result in something like:

Modifying item ...

Editing fields ...

Submitting ...

Updated item <# ITEM_ID# >

View solution in original post

11 REPLIES 11
Highlighted

Re: Get IssueId when creating issue from command line

usually the new Item'S ID is the result value of a CLI "im createIssue .... " command.

Depending on the Integrity Version you are using, this result is either streamed out on STDIO or STDERR.

So you might have to check both and parse the result.

Highlighted

Re: Get IssueId when creating issue from command line

Thanks for the reply Matthias.

I was trying to capture STDIO / STDERR using below command - but got empty log file.Could you help.


im editissue --Field='Description=%DESCRIPTION%' --gui %ITEM_ID% 1>D:/Integrity/log1.txt 2>&1

**I'm able to get logs for viewissue commands.

Regards,

Arun

Highlighted

Re: Get IssueId when creating issue from command line

Hi Arun,

I am not sure whether using the --gui option gives you a result on the command line at all, as you'll get the visual feedback.

Without the --gui option your command should result in something like:

Modifying item ...

Editing fields ...

Submitting ...

Updated item <# ITEM_ID# >

View solution in original post

Highlighted

Re: Get IssueId when creating issue from command line

Thanks for the reply.

I was expecting Integrity tool to return some value after submitting the new Issue using --gui.

Even parsing from a log file (in Integrity Client machine) will do for me

Regards,

Arun

Highlighted

Re: Get IssueId when creating issue from command line

Hi Arun,

Could you mark which of Matthias' responses helped you resolve this issue? You can hit the Correct Answer button for the post that most closely resolved the issue and you can mark any post which also helped as Helpful by clicking on the Actions button at the bottom of a post and selecting Mark as Helpful.

The benefit of this is that if someone comes by this later, they can see what helped you get a resolution to your issue, and it also recognizes Matthias' contribution to helping you with this issue.

On a related note, if you feel that using the --gui flag should not prevent the item ID from being dumped to STDERR, you can open up a case with PTC Integrity Lifecycle Manager Support to have this added as a feature.

Regards,

Kael


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager
Highlighted

Re: Get IssueId when creating issue from command line

Thanks Arun!


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager
Highlighted

Re: Get IssueId when creating issue from command line

Hi Arun,

you can use the --xmlapi flag and parse their the command output to extract the IssueID.

HTH

Thierry

Highlighted

Re: Get IssueId when creating issue from command line

Thanks for the reply Thierry.

--xmlapi also not giving any output when used with --gui.

Regards,

Arun

Highlighted

Re: Get IssueId when creating issue from command line

Hi Arun

ok. maybe it work for you to first to create the Issue without --gui and then open it with 'im editissue --gui IssueID'?

or you want the possibility to cancel the issue creation?

Regards

Thierry

Highlighted

Re: Get IssueId when creating issue from command line

You could try the --displayIdOnly option. This has the effect you want of printing the ID of the newly created item. Using Korn you can do something like

co2=$(im createissue --type="Change Order" <<fields>> --displayIdOnly 2>&1)

print "Created Change Order issue $co2 and saved ID" >>deploy.log

Highlighted

Re: Get IssueId when creating issue from command line

Still getting same issue.

displayIdOnly not returning any value when used with --gui.


Regards,

Arun

Announcements