I am trying to set up a Jira automation rule for my project that will get triggered when a pull request is created. As part of the rule, I want to perform an api web request to gitlab using the title of the pull request as a query parameter.
When I try to dohttps://my-gitlab-api-url?search={{pullRequest.title.urlEncode}}I am getting back a 500 response. I've tried the alternate approach as well by doing https://my-gitlab-api-url?search={{#urlEncode}}{{pullRequest.title}}{{/}}and this does not work either. It doesn't seem that I can get the pullRequest.title smart value to be url encoded. Am I missing something? Thanks.
Hello Joshua
Thanks for writing to us. If title is String value, then urlEncode should work on it. 500 response code does not means that URL was not encoded, seems like some other issue.I would request you do some research at your end:
For help in debugging you can refer document: https://support.atlassian.com/jira-software-cloud/docs/debug-a-rule/
If encoding is happening(which I believe is) then probably you are forming wrong query param, might will have to try correct url.
Hope this helps!
CheersSherry
Thanks! I added a "Log Action" as you suggested in the rule, and was able to figure out the problem. It was a misformatted query param like you mentioned. Once I restructured the URL it worked like a charm. Much appreciated!
@joshua.peeling Good to hear this!
It looks like you're new here. Sign in or register to get started.