JIRA CLI does not take IDs as parameter values

Thomas Heidenreich
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 22, 2013

Hello,

it sees that the jira.sh does not take IDs as parameter for issues or links, or am I doing something wrong here:

I tried:

./jira.sh -a linkIssue --issue "10100" --toIssue "10101" --link "10003"

but get a "Remote error: Issue Does Not Exist"

Using:

./jira.sh -a linkIssue --issue "TST-1" --toIssue "TST-2" --link "Relates"

workes fine!

So what am I doing wrong here?

Thanks in advance

Thomas

3 answers

1 accepted

0 votes
Answer accepted
Bob Swift OSS (Bob Swift Atlassian Apps)
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 23, 2013

While most JCLI actions using the issue parameter support either, that specific function only supports issue keys. If it is important for it to also support ids, please open an issue.

Thomas Heidenreich
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 23, 2013

Yes, this is quite important to us, as the Structure Plugin for JIRA undo file provides only the IDs and we urgently need to roll back some 1000 messed up links.

Sadly I cannot open an issue as I dont have an account on your JIRA and the CAPTCHA on the signup page won't show.

Can this somehow be hotfixed?

Bob Swift OSS (Bob Swift Atlassian Apps)
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 24, 2013

Atlassian is working on fixing CAPTCHA for OnDemand :(. In the mean time, I opened JCLI-414 for you. I think it can be fixed soon.

Bob Swift OSS (Bob Swift Atlassian Apps)
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 24, 2013

A fix is available as a snapshot. By the way, deleteLink already supported both key and id.

Thomas Heidenreich
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 24, 2013

Thanks!

The snapshot seems to work fine with issue and toIssue IDs, any chance to get the ID also working for the --link parameter?

Bob Swift OSS (Bob Swift Atlassian Apps)
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 24, 2013

Oh, I missed that part :(. Let me see. Try getting a site id now.

Do you only need that for the delete case? That might be more possible than for the create case. Nevermind, I found what I was looking for.

Thomas Heidenreich
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 24, 2013

Great work :)

Now it exactly works how I need it, the provided undo file contains the following:

createLink 12345 54321 10001
deleteLink 23456 65432 10002

Thanks again, for the fast fix!!

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
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 24, 2013

Just an fyi... getIssueList also provides similar mapping information. But having to do a mapping means a script and added complexity.

0 votes
Norman Abramovitz
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 23, 2013

I am assuming you have access to your Jira database. Would it not be simplier to query the database to get the internal id to issue-id mapping? Join your two lists of data and then run your cli script.

Suggest an answer

Log in or Sign up to answer