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

Kamal Saini August 18, 2013

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

1 vote
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 18, 2013

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

--parent PGSNIFF-2615

Kamal Saini August 18, 2013

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

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 19, 2013

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.

Kamal Saini August 20, 2013

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

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 20, 2013

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

Kamal Saini August 21, 2013

Thanks for the help Bob. Created an issue here.

0 votes
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 18, 2013

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?)

Kamal Saini August 18, 2013

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

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 18, 2013

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.

Kamal Saini August 18, 2013

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 Sign up to answer