Using Jira Data Center 9.4.15
I have a custom field called "Report PDF URL". I have a workflow transition step where I'd like to validate that the url entered into that custom field contains ".pdf".
I found this previous post:
https://community.atlassian.com/t5/Jira-questions/URL-Validation-for-Free-Text-field/qaq-p/1987373
and the suggested scriptrunner:
cfValues['URL Field Name'] ==~ /^((?:https?:\/\/)?(?:www\.)?[-\w@:%.+~#=]{2,256}\.[a-z]{2,6}\b[-\w@:%+.~#?&\/=]*|)$/
...but I'm unclear how to modify this for my use case.
Please help, thanks.