Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Auto issue creation using JIRA automation

Sakura Yamada April 23, 2021

I have integrated JIRA with gitlab and created a rule in JIRA to create issue when build fails.

But when  build fails in gitlab issue is not getting created in JIRA automatically.

What should I  do to auto create issue?

1 answer

1 accepted

0 votes
Answer accepted
Bill Sheboy
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 23, 2021

Hi @Sakura Yamada  -- Welcome to the Atlassian Community!

For a question like this, please consider posting an image of your rule and an audit log entry showing an execution which does not behave as you expect.  That will provide some context for the community to advise you.  Thanks!

Best regards,

Bill

Sakura Yamada April 23, 2021

Thanks for replying. I am sharing the images for audit log and for rule. Untitled.pngUntitled1.png

Andreas Knecht
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 25, 2021

Hi @Sakura Yamada ,

Can you please provide some more details and show us how you've configured your gitlab integration in Jira?

Also can you show us a screenshot of the failing build that should have triggered this rule?

Cheers,
Andreas

Sakura Yamada April 26, 2021

Shared the screenshots for the Gitlab-JIRA integration. Also shared screenshot for build failure. I kept build name as blank (for all the builds) while creating rule. Also tried this automation for other pipelines but not able to trigger the rule. Please suggest me to solve this issue as soon as possibleBuildfailed.pngBuildfailed1.pngIntegration Screenshot.pngIntegrationSS1.png

Andreas Knecht
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 26, 2021

Thanks - and just to confirm this is a gitlab.com installation (not the server/on-premise version of gitlab) correct?

With the build above, where there actually any issue keys in context? Did the branch or commit message include a valid issue key in Jira?

Automation rules will only trigger if there's an issue in context of the build.

To confirm that's working can you go to the issue you mentioned and show me the development panel there? It should show the related build (that failed).

Sakura Yamada April 26, 2021

Yes this is the gitlab.com installation.

And I am trying to create a issue when the build fails. So how to mention issue key before creating issue?

Can you please tell me the procedure if I am missing something? I have not mentioned issue key anywhere as I am going to create the issue automatically when build fails.

Andreas Knecht
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 26, 2021

Thanks for clarifying that.  Yeah so currently this wont work since we only trigger automations if an issue key was mentioned in the commit/branch/build.

If you want to create an issue from scratch, then you'd have to setup a webhooks to do so.

So in Gitlab, configure an outgoing webhook when a build fails (not sure if this is possible) and then setup a rule in Automation like this:

  • Trigger: Incoming webhook
  • Action: Create issue

Hope that helps.

Suggest an answer

Log in or Sign up to answer