Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

can we replace issue id with our own defect tracking (ClearQuest) id? please advice how if we can

Andy Kuan August 3, 2015

can we replace issue id with our own defect tracking (ClearQuest) id? please advice how if we can.

I'm using Create Issue REST API in C#. I'm able to create issue with api, just like to know if it's possible we can replace the pre-assign issue id with our ClearQuest id.

Thanks.

4 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Andy Kuan August 3, 2015

Volodymyr,

we are able to interface between JIRA issues and our ClearQuest system. do you have any suggestion how do we do this? create a custom field and store the clearquest id in it or something else?

Please advice. Thanks.

Andy

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 3, 2015

That's the standard way to do it - Custom field with the CQ ID in it. Ideally, CQ should have a field with the JIRA Key in it too.

Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 3, 2015

As always, Nic is absolutely right :-)

Andy Kuan August 4, 2015

I guess you two are top jira developers Sorry, one more question I had used the string data = "{\"fields\":{\"project\":{\"key\":\"CQT\"},\"summary\":\"Sample issue\",\"description\":\"Creating an issue via REST API\",\"issuetype\":{\"name\":\"Bug\"}}}"; to test my create issue without any issue. now I tried to add one simple assignee field in the string. "{\"fields\":{\"project\":{\"key\":\"CQT\"},\"summary\":\"CDTS00416494 CUSP - Error on Page on KYC pop up- Bank locator\",\"description\":\"CDTS00416494 CUSP - Error on Page on KYC pop up- Bank ocator\\n\\r\",\"issuetype\":{\"name\":\"Bug\"},\"assignee\":\"andykuan\"}}" I got "The remote server returned an error: (400) Bad Request." Can you tell where I did wrong? Thanks.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 2015

I'm not so much of a developer - I've written stuff, but nothing huge, my area is admin and the human side of using JIRA (for <mumble> years). I get the impression Volodymyr is probably ahead of me on development, as he's picked up some of the more technical stuff! Anyway, two things: First, I'm not sure about the punctuation in the second request - are the brace pairs all closed off correctly? Second, is andykuan a valid assignee for the project? (i.e. could you assign yourself the issue if you do this issue create using the UI?)

Andy Kuan August 4, 2015

andykuan is my Jira id and I can create issue by using UI and assign to myself. the first string worked. I just appended the assignee field in the end on second test string. is "assignee" a valid field name? JIRA REST API is so hard for debugging, I have no clue where the error is.

3 votes
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 3, 2015

No, it's not possible. Issue IDs are generated sequentially.

1 vote
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 6, 2015

Andy,

Priority JSON:

"priority" : {"name" : "High"}
Andy Kuan August 7, 2015

Thank you. Sir. will try it.

Andy Kuan October 13, 2015

Hi Do you know how to search issues with a specific status in a project? thanks

1 vote
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 4, 2015

Andy,

For the assignee  JSON piece should be:

"assignee": {"name" : "andykuan"}

For the versions JSON is:

"versions" : [{"name" : "Version1"}, {"name" : "Version2"}, and so on]

So you can assign multiple versions. If you need one: "versions" : [{"name" : "Version1"}]

image2015-8-6 0:18:8.png

 
Andy Kuan August 5, 2015

thanks. I will try.

Andy Kuan August 5, 2015

what can I say? you did it again. it worked. Sorry, one more question, can you please tell me the Affected Version field name and the JSON syntax too? thank both of you so much.

Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 5, 2015

Andy, updated the answer with JSON for the Affected Version.

Andy Kuan August 5, 2015

Sorry, I know how to add versions from UI, but I am asking the Affected Version field. it's a text field not options Thanks

Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 5, 2015

Field name is "versions" and JSON is in the answer. Also the field is not a "text field" but rather "multi select versions" field. Added image illustrating this.

Andy Kuan August 6, 2015

thank you, Sir. it worked.

Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 6, 2015

Welcome, Sir :-)

Andy Kuan August 6, 2015

Hi Volodymyr, Sorry, one more question, can you please tell me the "Priority" field name and JSON string syntax like "versions"? appreciated

Andy Kuan August 11, 2015

Sorry, one more question, do I need to take care email notification by API if I used REST API create issue? I got email notification if I create issue from UI but I didn't receive email if I used API create issue. many thanks.

Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 11, 2015

Not sure, but guess that you get emails when the issue is assigned to you. Try to put yourself as assignee when creating through REST.

Andy Kuan August 11, 2015

I did assign the issue to myself but didn't receive email when I used REST. I did receive email when I use jira UI.

Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 11, 2015

I guess that's the way it is.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events