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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Using trigger "When: Pull request created" how can you run the rule only once for multiple issues

In Jira Automation when using the When: Pull request created I typically have an Issue fields condition step that checks for a Component field value and then post a message to Microsoft Teams.

The issue I'm facing is that if the pull request in question contains more than one issue it will post multiple messages to teams, one for each issue in the pull request.

Is there a way of validating the component of either all or the first issue in the pull request and proceed to only post a single message to Microsoft Teams.

 

Thanks!

2 answers

Good to know.

Hi @Marc-André 

Full disclosure: I am not actively using the DevOps triggers at this time, and based on what I understand about them, I wonder if you could...

  • When the pull request trigger fires the rule, it has the {{pullRequest.title}}
  • As you note the title contains multiple issues, you could parse those issue keys out using the text functions and RegEx
  • Then pick one of them (e.g. first) to get the sampled key
  • Use an Advanced Compare Condition to prevent a loop, only proceeding if the trigger Issue key matches the sampled key
  • Log your message to Microsoft team

 

Best regards,

Bill

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Bitbucket Smart Commits vs. Genius Commits - What's the difference?

If you already heard about Smart Commits in Bitbucket, know that you just stumbled upon something even better (and smarter!): Genius Commits by Better DevOps Automation for Jira Data Center (+ Server...

114 views 0 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you