Hello,
I am using Jira Cloud.
How to get custom field value using scriptrunner in Jira workflow validator?
I need to use Jira expressions.
Thank you.
Hi @이정왕
Jira expressions can be found here https://developer.atlassian.com/cloud/jira/software/jira-expressions/
But it would be great if you could share with us, what are you trying to accomplish. Maybe we can help you find a solution.
I have one more question.
How to call Rest api for custom field value in Workflow Validator in Jira Cloud?
Hi, @Alex Koxaras -Relational-
Thank you for your reply!
What I'm trying to achieve is:
First, read the value of one custom field.
Read the value from the asset object connected field to the field called the request target and put it into another custom field value.
So if its value is Y, it prevents creating an issue.
It is by using a script runner in the validator in the workflow.
I'll be waiting for @Alex Koxaras -Relational- reply.
Have a nice day ~!
@이정왕 kindly check this page for examples https://docs.adaptavist.com/sr4jc/latest/features/workflow-extensions/validators/example-validators
The logic is that you've got to find your custom field id and compare it with a value. Your requirement is "So if its value is Y, it prevents creating an issue.". That could be entered as:
issue<span>.</span>customfield_XXXXXX<span>.</span>value == "Y"
Something along these lines.
Hi @이정왕 ,
In Validators (and conditions for that matter), you cannot use the REST API to load any data. Unfortunately, that also means that there is no way to read the actual asset data.
Hi @Oliver Siebenmarck _Polymetis Apps_ ,
I couldn't have done it without you.
Thank you~!
Hi @Alex Koxaras -Relational- ,
This means a lot to me.
Thank you for your reply.
It looks like you're new here. Sign in or register to get started.