Fiz uma integração via API e gostaria de utilizar a condição parecida com:
Se "Send web Request" contains "Successfully published web request", transicionar item para a fila "X".
É possivel fazer essa comparação?
@Cesar Bastos , please try to replicate this steps
Step 1: Even if your Send Web Request is empty, it is possible to collect the sending log of this request through the jira log action. For that, you need to check this box in the Action of "Send Web Request":
Step 2:
After the "Action" of the Send Web Request you will add a new Action called "Log Action" and this log action will include the following variables: {{webResponse.status}}{{webResponse.statusCategory}}
Just copy and paste :)
Response.status = Success code (200 if ok)
Response.statusCategory = Status Category (Success, error, etc)
Step 3: After the Log Action, I added a new action in the automation called "Re-fetch". This is like a Jira base refresh and particularly I just used it to ensure that when jira starts reading the statusCategory condition, it will find value in the log.
Step 4:
After the re-fetch open a BRANCH for the Current Issue (or the target issue you want).
Inside this branch, you will add a condition like "Advanced compare condition" and put the following configuration in it:
Step 5:
After performing the comparison condition, still inside the BRANCH, add the final Action of your rule. What do you really want to do if the web response result is successful (transition issue, edit issue, comment issue, etc).
In my case I put a comment issue and it worked perfectly in this logic. See the complete log of my automation:
Forgive me if I forgot something, but it's important to know that you can turn the result of your web request into a condition using this logic, so from there you can build a better automation that will do what you need.
That is my complete automarion rule:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For a question like this, please include images of your complete automation rule and the audit log details showing the rule execution. Those will provide context for the community to offer suggestions.
For you Send Web Request action, did you enable the option to "Wait for response", and then check the response values, as @Burak Bal suggested?
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.
You can use Log Action and you can see status of request with {{webhookResponse.status}} smart value. I assume that the web request is sent with Jira Automation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This does not work because the API return me nothing in the body. I need something to compare if the rule worked successfully
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Cesar Bastos , can you confirm if this Send Web Request is sent with jira automation?
Because even the body is EMPTY, if it has been sent by jira automation you can take the code and/or category status from your web request. Then you can use one of them as a conditional for your automation rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, is it send with Jira Automation. How can i use this as a conditional for my automation?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.