JIRA Command Line Interface; how to link subtask and issue?

Hi All,

I am using JIRA 4.2.3 where importing subtask and link to parent issue is not available,

so i imported the subtasks and parent issues, and want to you CLI to link them.

I have the subtasks issue key and parent issue key, but i do not know how to link them.

Can kindly advice me on this problem?

3 answers

This widget could not be displayed.

Are you asking how to convert an issue (not a subtast) into a subtask of another issue like Convert to Subtask on the UI? If so, this is not possible via the CLI or available remote APIs.

The subtasks without parent as well as the issue items are sucessfully imported in the JIRA 4.2.3 (because the feature of indicating parent id and issue id is not available), so the next step is to link the subtask to the parent issue (ideally with issue id), however i do not know how to link them using CLI?

Or any work around?

or how do i use the "createIssue" cmd line, when i want to set 'due date', 'date created', 'status' and other custom field? because i do not see the duedate and the rest in the parameters.

i can use this command line to create the sub tasks associate with issue items if i can set those above. Thanks.

createIssue

Issues

Create a new issue or subtask for a project.

project, type,summary

parent, priority, reporter, assignee,description, components, affectsVersions,fixVersions, environment, security, field,values, field2, values2, asVersion,asComponent, asCascadeSelect, date,dateFormat, custom, autoVersion, autoComponent, comment, group, role,findReplace, findReplaceRegex, file,encoding

and may i know how to more than 2 fields (field, field2) in one command line?

Examples can often be used to help with this type of question. Specifically to your questions

  1. date is the due date for update issue
  2. the remote API does not allow the setting of the create date - it will be the date the issue is created :(. This is an old complaint against JIRA in general
  3. An arbitrary number of custom fields can be set with custom parameter. The field/value and field2/value2 parameters are conveniences and easier to use.

Hi may i know how to insert date into custom field that is in date format? i keep on getting java null pointer exception. below is the command:

bash-3.00$ ./jira.sh --action updateIssue --issue "EQAPSTAB-1090" --custom "'GERR Sub-Task Due Date:01/01/2012'"
Remote error: java.lang.NullPointerException
If i left only the ./jira.sh --action updateIssue --issue "EQAPSTAB-1090" then i will throw a appropiate error saying no field is updated.
so i suspect the date format is wrong.
Please kindly help me get over this problem, if not i have to update a lot of record manually.
Thanks

An example would be appreciated.

Thanks in advanced.

It works fine after a JIRA restart

bash-3.00$ ./jira.sh --action updateIssue --issue "EQAPSTAB-1090" --custom "'GERR Sub-Task Due Date:01/Jan/12'"

Thx bob, you are a life saver.

This widget could not be displayed.

After you imported the data do your subtasks mentioned above show up as subtasks or as issues?

This widget could not be displayed.

It appears as the subtasks.

The subtasks can be sucessfully imported without parent in the JIRA 4.2.3, so the next step is to link the subtask to the parent issue (ideally with issue id), however i do not know how to link them using CLI?

Or any work around?

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in Teamwork

What teamwork quotes inspire you?

Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork?  We've compiled a list here, along with...

109 views 15 7
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you