Hello,
I would like to have automation when a pull request is created, the status is changed to "In Review". However, that should not happen if it's only draft pull request. It can be identified with a pull request title containing "Draft". I also exclude tickets of type "Incident" which have a different workflow.
No add-on tool possible.
The following automation rule returns "some errors" but only details "no actions were performed". Can someone please help me?
Would you please post an image of the audit log details showing the rule execution, including one with the error? That may provide some context to understand this symptom.
And as the rule appears longer than what you show, could you also post an image of the complete rule, ideally in a single image?
Thanks!
Kind regards,
Bill
Hello @Bill Sheboy
Here is below the audit log.
There is nothing more for the rule at the bottom of screen.
Thank you, best regards
Nicolas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that information...and I am fairly confident your conditions may be the problem. If you post images of your condition details I can confirm that.
What you show leads me to believe you have this in a condition:
{{pullRequest.title.toLowerCase().indexOf("draft")>0}}
That is invalid, as the greater-than sign is not valid in that expression.
There are at least 2 ways to test that condition:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
Please find below my condition, I used indeed a simple "JQL condition":
I switched to "Advanced compare condition" with your 1st change:
and am waiting for the next PR created. I keep you posted. Many thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Unfortunately, the positive match condition with the PR title did not work. This couldn't be tested previously (requires a PR with "draft" in title).
As you can see PR contains the word "DRAFT" but the if condition isn't matched.
Any idea? Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My apologies, Nicolas...It appears indexOf() returns a 0-based value. That is, the first position is at 0. When nothing is found, it returns -1.
And so the second value in that condition should be changed to -1 to help when draft is in the first position.
I will update the earlier posts also.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok super, I have modified it. Many thanks again for your support. Let's wait for a draft PR to confirm.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
I tried this and it didn't work for me unfortunately the status remains unchanged and the audit log give me this. Can someone help please
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @suha_shakaa -- Welcome to the Atlassian Community!
As this is an older thread, I recommend creating a new question and perhaps add a link back to this one. That will ensure the maximum number of people see it to offer suggestions.
When you post your new question, please include:
Those will provide context for the community to offer help. Thanks!
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Bill
I have posted a new question here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.