We need to create a scripted field in Jira that is able to check an API response and compare a specific value in the response against the value submitted by the customer in the field. For example:
Custom string field (value stored as var1)
REST API endpoint (var1 included in body of POST request)
API response key value (value stored as var2)
If var1=var2, customer submitted value is correct, allow submission of ticket
if var1!=var2, return an error describing a comment (test comment for now)
Attached is a working Groovy script with a POST request and body for parameters.
We need to create the following for testing the new field
test request type
test custom field
add new custom field to new test request type
add / modify script to have the functionality described above
create a ticket with test value (value1)
screenshot the error response if another value is submitted (value2 for example)
I have experience with Atlassian tools like Jira and Confluence as administrator. I have worked on customization of the tool and automation of tasks using Groovy and Python Rest Calls. Kindly DM me with the requirement and we can discuss further.
Thanks