Why is the automation not being triggered?

Phyllis Zhu November 9, 2016

Hi,

   I had previously tested out a few automation rules within the same project and everything worked well. Now I need to setup same/similar rules across projects and running into some problems. First one I need to resolve is why the rule does not run when I create a certain issue. 

What I need is when a new Change Control issues with specific words in the summary is created, three subtasks are created. I tried creating a few new Change Control tickets and the automation didn't run. 

Screen Shot 2016-11-09 at 2.33.51 PM.png

 

I tried a different trigger where if a comment is added to a CC ticket then it will create a subtask and that worked. 

 

I started off with the following rule and it didn't get triggered either. This is my ideal rule as it allows me to set some the assignee and any other fields, as necessary.

 Screen Shot 2016-11-09 at 2.48.10 PM.png

3 answers

3 votes
andreas
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.
November 10, 2016

Just in case other users come across this question: This was caused by the issue transition on create in the JIRA workflow using a custom event.

There's a bug currently in JIRA, where it does not send any webhooks to atlassian-connect add-ons (which Automation for JIRA cloud is) when workflow transitions use custom events in their post-functions.  This has the effect, that issue transitioned and issue created triggers may not be notified.

Currently the only work-around is to switch the workflow transition back to use system events, or to setup a scheduled JQL trigger that checks for these issues periodically.

Atlassian's latest reply about this was:

Vincent Chin [Atlassian]21/Oct/16 8:37 AM
Hi Andreas,
Just to update, Filip has created a ticket to track this at ecosystem. We are not sure when the fix will be worked at however but suffice to say we are already aware of the problem and we will work on it when we have time.
Best regards,
Vincent

Kadir Efendioglu January 17, 2017

Hey Andreas,

Is there any update on this topic. We can't get the benefits of the automation tool because of this. And do you know any workaround to achieve same results?

Best regards,

andreas
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.
January 18, 2017

Hi Kadir,

Sadly no - there hasn't been an update.  I know there's a team at Atlassian working on improving webhooks, but we don't know yet when these improvements will ship.

For now the only possible workarounds are to switch your workflow back to using system events, or  to setup a 'Scheduled JQL trigger' that tries to find issues that were missed every so often with a JQL query and then performs the automation rule.

Cheers,

  Andreas

Jamie Macari January 30, 2017

Hi Andreas,

I have run in to the same issue. I would rather use the workaround of switching the workflow back to using system events so that I do not have use another rule, but I am not sure how exactly. My automation rule creates and issue then creates sub-tasks. The 'create issue' transition in the workflow for the issue type my rule only has post functions 'issue initially created' and 'fire a issue created event...' Where am I going wrong?

Regards,

Jamie

andreas
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.
January 30, 2017

Hi Jamie,

So if you visit the postfunctions for the initial transition is this what you get:

Transition: Create - Code Barrel JIRA 2017-01-31 09-45-11.png

Make sure that it's the built in 'Issue Created' event and not another event with the same or similar name someone may have created.  So when you click edit for this post-function select the very first 'Issue Created' event.

For other transitions it should look like this:

Transition: Start Progress - Code Barrel JIRA 2017-01-31 09-46-54.png

Hope that helps!

Cheers,
  Andreas

 

Jamie Macari January 31, 2017

Hi Andreas,

Thank you for your continued help. Below is a screenshot of the post functions for the initial transition of the workflow in question, which I think should be correct based on your description. 

Capture.PNG

Regards,

Jamie

andreas
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.
January 31, 2017

Hi Jamie,

Interesting - that looks ok, but you seem to be missing the reindex function there.  I think it will be easier if you create a support request via https://codebarrel.io/support. I'd like to get some more details that probably shouldn't be posted here on answers:

  • Your JIRA version
  • Which database you're running on
  • Screenshots of your rule config and audit log (with 'Show more' expanded) 
  • Screenshot of an example issue that should have triggered the rule

Cheers,
  Andreas

Kadir January 31, 2017

Hello,

I am also willing to return to system default Workflow but I am missing re-index function too.

Even in "jira (Read-only System Workflow)" I don't have it. My JIRA version is v7.1.9. I made a copy of the default workflow, added this fire event to the create step but still no luck. 

I would be interested to follow the updates on this issue.

Best, 
Kadir 

Kadir February 1, 2017

Small update from my side:

"when: Issue created" was not working for me whatever I tried. As for the last option I saw "multiple issue event" option and tried my chances.

image2017-2-1 15:46:0.png


Luckily enough it worked perfect for me. 

Not sure but suspecting that german translated event names may have caused this issue.

andreas
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.
February 1, 2017

Hi Kadir,

That's strange - translations shouldn't affect this (and I just tested this to confirm as well).

I'd like to debug this further if possible.  Can you turn on DEBUG logging for 'com.codebarrel.automation.rulecomponent.jira.trigger.event' in your instance:

  • Got to 'Logging and profiling' in JIRA admin and hit 'Configure logging level for another package'.  Then add com.codebarrel.automation.rulecomponent.jira.trigger.event and set it to DEBUG
  • Create a rule with the 'Issue created' trigger
  • Then create an issue.

Your server log should now contain 'Matching with configured key of '<ISSUEEVENT>' against '<RULECONFIGUREDEVENT>''. There could be multiple entries if you have multiple rules - just include all of them.

I'd like to see what the values for ISSUEEVENT and RULECONFIGUREDEVENT are that you get.  

Feel free to create a request at https://codebarrel.io/support if you don't want to share server logs publicly here!

Cheers,

  Andreas

 

 

Kadir February 6, 2017

Hey Andreas,

Unfortunately, I don't have any access to logs in our JIRA. Can't read it.

0 votes
Fabrizio del Mauro April 12, 2017

Hi Andreas,

I have had problems when try to excecute the almos-the-same rules between diferent projects. 

The autobot is an Administrator in hour instance and in the respective projects with permissions.

Projects whereas the rules don't work

asd.PNGasd2.PNG

Can you help us, please?

Thanks!

 

andreas
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.
April 12, 2017

Hey Fabrizio,

Can you raise a support request at https://codebarrel.io/support please with some more details?

Can you include screenshots of your audit log showing rules that didn't execute please?

Can you also include screenshots of these rule configurations please?

Finally are your workflows using custom events?

Cheers,

 Andreas

0 votes
andreas
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.
November 9, 2016

Hi Phyllis,

So this is a bit strange.  I had a look in our logs and database, and I can see that the rule from the first screenshot ("Add sub-tasks on CC creation") was never executed.  There's no audit log entry in the database.  There's only 2 reasons I can think of for this:

  • The rule wasn't published yet, when you created the issue (i.e. the status lozenge was still in 'Draft' and not 'Enabled')
  • Or the issue was created in a different project perhaps?

For the rule from the second screenshot, I can see some executions in the audit log, however they both state that the JQL condition failed.  I'm not sure if you're happy for me to post the issue keys on this public forum for which they failed.  It might be better if we continue this on a private support request, which you can raise via http://codebarrel.io/support.

Can you please include, the project in which you're creating the issue, and the issue key of the issue that you crated, that should have triggered the rule. Finally also include the name of the rule that you wanted to execute (but didn't) in this support request!  That will allow us match the execution up exactly to the right thing in our logs, to ensure that I'm looking at the right thing here.

Cheers,
  Andreas

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events