How to add sub-task using "CLI Plugin for Confluence".

Hi,

I am trying "CLI Plugin for Confluence" to fulfill import request for normal users (non-admins). I am following this link : https://bobswift.atlassian.net/wiki/display/CCLI/How+to+allow+users+to+import+JIRA+issues+from+Excel+or+CSV. I was trying to import sub-tasks along with some stories. Below is the command generated :

Run: -a createIssue --labels "Imported" --type "Sub-task" --description "this is a new story added by excel import." --comment "How are you" --project "PGSNIFF" --reporter "ksaini2" --assignee "rkumar66" --custom "'Parent:PGSNIFF-2615'" --summary "new issue with right amount of data-2." --priority "Critical"

Here is the error reported :

Remote error: Issue type 'Sub-task' is not valid.

Environment details :

Jira version - 5.2.4

Confluence version - 4.3.1

I have tried it by providing different type name for example : "Task" too but still getting the same error. Can you please let me know if it is possible using this plugin or not?

Thanks

Kamal

2 answers

1 accepted

You need to provide the parent paramenter to create a issue of type subtask:

--parent PGSNIFF-2615

Hi Bob,

Thanks a lot for your comment. I know that it requires a --parent element but what to do if I am importing an excel file having sub-task for say 10 different parent issues.

What I am doing is, I have created a confluence page as you mentioned in the link that I am following and I don't want to provide "--parent" element in page itself. I want to provide it from excel file as I am providing name and values for other components of an issue for example - "reporter", "assignee" as column header and values under these headers.These are automatically convert into --reporter "reporterName" --assignee "assigneeName".

Using this, I have created a column with name "Parent" in excel file and provided a value for parent under it. But when I tried to import it, it end up with errors. Where I was expecting --parent PGSNIFF-2615 but it showed --custom "'Parent:PGSNIFF-2615'" in generated command. That is why the process got failed.

Can you please tell me if I can provide a parent value for an issue from an excel file like I am providing other component values for an issue? Please let me know if you need more information or if I am doing something wrong here?

Thanks,

Kamal

Parent should work the same way and does in my tests. Open an issue, state what JCLI and JIRA version you are using, attach the csv file, and include the exact command you are running.

Hi Bob,

Thanks for the comment. I am unable to sign up here (https://bobswift.atlassian.net/secure/Signup!default.jspa). I have entered all the details but signup page is not showing the random word to enter. I tried to click on signup but nothing is happning. Please see attached image

Sorry about that. I have reported the issue to Atlassian (JIRA-34421). Try again now as I have temporarily relaxed the condition.

Thanks for the help Bob. Created an issue here.

0 votes

Can you confirm a couple of things first.

1. You seem to be saying you are using the confluence CLI to create issues. But issues are a Jira function, so I don't know why you're using the confluence CLI. Could you clarify exactly what you are doing here?

2. Do you have Task and Sub-Task in Jira and are they valid in the pgsniff project (i.e. can a user create them in the web-ui?)

Hi Nic,

1. I have a requirement where I want to provide normal users a way to import issues in jira using csv or excel file. As jira provides import functionality to admin users only so I need something which can enable normal users to import issues in jira. Here ( https://bobswift.atlassian.net/wiki/display/CCLI/How+to+allow+users+to+import+JIRA+issues+from+Excel+or+CSV) I have found a way to do this. I am able to import issues successfully using non-admin user permissions. But when I tried to import sub-task it fails with error.

2. Yes, every jira project is having type task and test. The thing is that in jira, I can't create a sub-task or sub-test without any parent issue. From UI if I need to create a task/test then first I have to create an issue (story/defect etc.) first then only I can create a sub-task/sub-test under it. That is why I am trying to import issue of type task from csv by providing a issue id as a parent of it. You can see in the generated command in my question above.

Please let me know if you need any other information.

Thanks for your help,

Kamal

1. So, you're not talking about Confluence at all. And you want a CSV import for non-admins, and to use sub-tasks. Ok, we have a sensible question now.

2. I'm really not quite sure what you are expecting here. By definition, you cannot create sub-task issues without parents. No import or data manipulation will allow you to break that rule because it would be nonsense. From memory, you must use the --parent option to name the parent issue, and, of course, have "Sub Task" in the project's issue scheme.

1. I talked about confluence because this plugin is realted to confluence and I am using confluence page to import issues in jira using normal user permissions. I am not importing anything from jira UI.

2. I know that it makes sense to provide sub-task and sub-test a parent and I have used "Parent" as a column header in my csv file and provide an issue id as a parent under it. But it is not working and it converts it into --custom "'Parent:PGSNIFF-2615'" instead of --parent PGSNIFF-2615.

Thanks for the help.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,934 views 12 18
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot