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

CLI creates, JIRA deletes project in one step

Harry Clark August 27, 2015

I am creating a project with Atlassian CLI. The JIRA log shows the project created, by the ID used to sign on, and then deleted, by id JIRA. There is no error message from the creation. What on earth is in effect that causes a project to be deleted as soon as it is created? Obviously the project creation is correctly specified. Thanks for any advice.

Here is the run command.

java -jar atlassian-cli-4.4.0/lib/jira-cli-4.4.0.jar --server http://localhost:8080  --user "xxxxx" --password "xxxxx" --action run --file custproject.txt

Here is the command file. There is an error from the second line, project "3449" does not exist, the contents of the  @project@ variable (The advanced settings for project key have been changed to allow 4 digits)

 

--action createProject --project "3449" --name "Customer Project" 
--lead "kvesupport"  --permissionScheme "Vanguard Issue" 
--notificationScheme "Vanguard Issue" --issueTypeScheme "Vanguard Issue"
 --issueTypeScreenScheme "Vanguard Issue" --workflowScheme "Vanguard 
Issue" --fieldConfigurationScheme "Vanguard Issue"

--action addProjectRoleActors --project @project@ --role "KVE" --group "KVE"

Here is the create log entry

 

Aug/26/15 2:56 PM 
...
projects
Project created

Customer Project
Show more

Operation details:

Date:Aug/26/15 2:56 PM (GMT-5) America/New_York

IP:127.0.0.1

Name:Customer Project

Key:3449

Project Lead:kvesupport

Default Assignee:Unassigned

Here is the delete log entry

Aug/26/15 2:56 PM
JIRA
projects
Project deleted

Customer Project
Show less

Operation details:

Date:Aug/26/15 2:56 PM (GMT-5) America/New_York

IP:127.0.0.1

 

 

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

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 27, 2015

I would assume you are running JIRA 6.4.x from these symptons. Please install the latest SNAPSHOT from Release Notes 4.5. That contains a fix so that the project will not be deleted after it is created. JIRA 6.4 contains some project creation incompatibilities that required the CLI to do some thing differently to maintain the capability to create standard projects with shared schemes. In your case, the project could be created but could not be modified to match your specific request. With the fix, the project will remain but you will be given an error indicating not all the changes could be made. One case for this is if the user creating the project is not able to access the project after it is created due to permission issues. Open an issue if you have further problems.

Harry Clark August 28, 2015

Thanks. We went with [A-Z][A-Z0-9]+ for the key as suggested and the project was created okay (permissions etc correct). The doc specifies letter first but the regex pattern for key in the advanced settings accepts all digits. That's a bug

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 28, 2015

I'm not sure it's a bug. The documentation recommends something, but the application doesn't force it. An oversight maybe - if I were Atlassian, I'd have hard coded a leading letter and then a couple of check boxes for "allow -" and "allow numbers" for the next 9.

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 28, 2015

Certainly having a letter first is important for probably a number of add-ons/integrations and most likely JIRA itself as I doubt they test much for "abnormal" settings. While I don't know any specific logic that would fail for our add-ons, I would not recommend it (just asking for trouble) and likely not support any such use if any significant problem occurred.

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 27, 2015

>The advanced settings for project key have been changed to allow 4 digits

Do not do this.  It breaks JIRA in interesting and potentially catastrophic ways.  Please correct that (It must start with a letter) and try again.

Harry Clark August 27, 2015

I changed the project key to all letters and it worked. I deleted the proj, changed the key to begin with a letter, followed by digits, and it also worked. Is this reliable? Nic, are you with Atlassian? Is this an official answer? Thanks in any case

PS, when the project creation worked (the project was not deleted) the @project@ var in the 2nd line was not recognized. I had to put in the key.

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 27, 2015

No, I'm not with Atlassian, although I did join a partner (Adaptavist) a couple of years ago. I've been working with Jira for over 10 years and run into all sorts of problems with the project keys when people have put dodgy rules in, and it has gone through all sorts of iterations. It's not actually so much that Jira breaks, as more add-ons. Greenhopper (now Agile) used to be the main reason you couldn't start with a number. But there's lots of others, and things still break when you do it. The official line from Atlassian (which I don't have a bookmark for, sorry) is that your naming scheme should fit within this: - minimum length 2 - maximum length 10 - First character A-Z - The rest of the key can be A-Z, 0-9 or an underscore

Harry Clark August 27, 2015

Here is the documentation. It does specify starting letter but the regular expression in the settings accepts starting digits. That's a bug. https://confluence.atlassian.com/jira/changing-the-project-key-format-192534.html

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 27, 2015

That's the page, yes. The regex in the examples looks ok to me though.

TAGS
AUG Leaders

Atlassian Community Events