Same Projects across Stash and JIRA (and other Atlassian products)?

Justin Johnson October 11, 2012

I would like to give users the ability to create their own projects but want to ensure that the project is defined across all Atlassian products and doesn't clash with existing definitions. Currently I'm only looking at Stash and JIRA but my question applies to other products as well if we decide to support them later.

Is it possible to do this? If not is it possible to do so via a plugin? Does Atlassian have any plans to implement consistent Project definitions across products?

Thanks.

3 answers

1 accepted

0 votes
Answer accepted
Bryan Turner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 28, 2012

Justin,

I'm one of the Stash developers. While I can't speak to the roadmap for applying consistent project definitions across products, I saw your request for new events and added them. https://jira.atlassian.com/browse/STASH-2856 tracks the change.

Stash 2.0 adds ProjectCreationRequestedEvent and RepositoryCreationRequestedEvent. It also adds support for canceling all 4 events (the new creation events as well as the existing deletion events). For consistency, 2.0 deprecates ProjectDeleteRequestedEvent and RepositoryDeleteRequestedEvent and replaces them with "Deletion" variants.

In 1.3 and prior, there is no way to cancel even the deletion, using the existing events. Any exception thrown by an event handler is ignored by the system to prevent misbehaving plugins from destablising the core. In 2.0, a new CancelableEvent interface has been added and these 4 events implement it. It adds two new methods to the events which implement it:

void cancel(@Nonnull KeyedMessage message);

boolean isCanceled();

Event listeners may now use the event to cancel the requested operation.

When the operation is canceled, specific subclasses of a new RequestCanceledException will be thrown (ProjectCreationCanceledException, etc).

Hope this helps,
Bryan Turner
Atlassian Stash

Justin Johnson November 28, 2012

Excellent! When will 2.0 be released? =)

Bryan Turner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 29, 2012

I can't say for certain, mind you, but I'd guess if you checked www.atlassian.com sometime early next week it might be there.

0 votes
Justin Johnson November 14, 2012

Perhaps an alternate question is can we disable Project creation/deletion/rename in the tools and instead redirect (maybe via a new link added via a plugin) to another consolidated page to automate creation across all tools? I realize we would have to create this other page and handle all of the automation, but we need a way to have users automatically setup with a consistent Project definition across the tools.

0 votes
Justin Johnson October 18, 2012

I have successfully created a plugin with a ProjectCreatedEvent listener. I was hoping there was a ProjectCreateRequestedEvent (similar to ProjectDeleteRequestedEvent). If that existed then I was hoping I could also perform some validation in that event listener such as checking for the existence of the project in another tool and return an error to the user from within the Project creation screen.

Are there any plans to add a ProjectCreateRequestedEvent?

Is there a way to return user friendly error messages to the page the user was in when they initiated the event?

Thanks.

Suggest an answer

Log in or Sign up to answer