Create a Event Listener for ReviewCompletionEvent


I am very new to Java but have developed in other languages. I am trying to create a simple event listener that triggers a script upon a ReviewCompletionEvent. Went through as much of the docs as I can but I just need some help to get started. These are some of the KB I referenced:


  1. Where do I create the class file and the atlassian-plugin.xml?
  2. Does this code look remotely close to what I need?
private static final Class[] HANDLED_EVENTS = new Class[] {

public Class[] getHandledEventClasses()
    return HANDLED_EVENTS;

public void handleEvent(Event event)
    if (event instanceof ReviewCompletionEvent)
        /* INSERT Instructions to perform once the ReviewCompletionEvent is found */

3 answers

0 vote
Timothy Chin Community Champion Feb 18, 2014

Which app are you talking about?

Oops! Crucible/FE. I assumed ReviewCompletionEvent would only be a FE/Crucible method.

After a code review is completed I would like to have a listener trigger a script. With this ability the script can give me great power and flexibility with my SDLC workflow. I would like to pass to this script a param or two as well.

0 vote
David Simpson Community Champion Feb 19, 2014
  1. Make sure you've got the Atlassian SDK installed
  2. Create a new plugin using the command atlas-create-fecru-plugin - this will build a skeleton plugin template
  3. Having created the plugin, you should now have an atlassian-plugin.xml file in the directory src/main/resources
  4. Create a new Java class at say src/main/java/com/yourcompany/fecru/plugin/listener/
  5. Add the listener module in src/main/resources/atlassian-plugin.xml:
    <listener key="example-listener" class="com.yourcompany.fecru.listener.ReviewCompletionEvent"/>
  6. Type atlas-run in the root of your project and see whether it worked

Hopefully that will get you on your way.

Suggest an answer

Log in or Join to answer
Community showcase
Maarten Cautreels
Posted Thursday in Off-topic

Friday Fun: What's your favourite beer/drink

As a Belgian, beer-lover and home brewer, beer is one of my great passions. I love the fact that with just a few ingredients (usually just water, hop and malt) you can create so many different tastes...

291 views 38 9
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