web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Trigger flow when Azur...
Power Automate
Unanswered

Trigger flow when Azure Devops work item is updated to a certain state

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I want to trigger a flow when a work item is updated to a certain state.  However, once that work item is in that state, I don't want it to trigger anymore.

 

I was hoping to do this by having a way to compare "old value" versus "new value", but didn't see a way to do that.

 

For example, trigger when a work item is transitioned to the "Proposed" state, but once in that state, if the work item is updated with comments, etc, I don't want the flow to trigger.

 

Thoughts?

Categories:
I have the same question (0)
  • Brad_Groux Profile Picture
    4,556 on at

    Don't worry about the trigger, worry about the operation. Add a condition to the flow, that checks if there is a "proposed" state value. If there is, do nothing. If there is not, put it in a proposed state. Further:

    If you could provide an expanded screenshot of your Flow and steps, your Flow run history, and of any detailed error messages you're receiving we could likely better assist you. Also, for the best results, you may want to review How to write a good forum post.

    If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION ☑️. If you find this reply helpful, please consider giving it a LIKE.

  • Community Power Platform Member Profile Picture
    on at

    This answer doesn't really help.  I understand what you're trying to say.  But I believe the reason @Zaemmel is asking this question is probably similar to my reason -- I'd want the flow to run when a work item is changed to "Ready for UAT" and send a message to a channel on MS Teams.  But as long as the ticket state is "Ready for UAT", when the ticket is commented on, another message is sent via MS Teams and I don't want that.  So I also thought a trigger would help, but I'm having difficulty with that.  I tried the following but realized that this is not going to work either.

     

    @and(equals(formatDateTime(triggerOutputs()?['body/fields/Microsoft_VSTS_Common_StateChangeDate'], 'yyyy-MM-dd-hh-mm'),formatDateTime(utcNow(), 'yyyy-MM-dd-hh-mm')),equals(triggerOutputs()?['body/fields/System_State'], 'Ready for UAT'))

     

    Does anyone have any other suggestions/ideas/help?

     

    Thank you.

  • Community Power Platform Member Profile Picture
    on at

    I figured it out. I entered the following for the trigger condition.  With what I had posted above, I replaced utcNow() with triggerOutputs()?['body/fields/System_ChangedDate'].

     

    @And(equals(formatDateTime(triggerOutputs()?['body/fields/Microsoft_VSTS_Common_StateChangeDate'], 'yyyy-MM-dd-hh-mm'),formatDateTime(triggerOutputs()?['body/fields/System_ChangedDate'], 'yyyy-MM-dd-hh-mm')),equals(triggerOutputs()?['body/fields/System_State'], 'Ready for UAT'))

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard