Hello,
I'm trying to create a button that will trigger an external script (by using Groovy inline script).
I want this button not to be based on a transition within the WF itself, but as a standalone button, that will be able to be processed only if various conditions will be met.
After I've investigated the issue I understood that the solution can be achieved by creating a Custom web item (via Script Fragments of ScriptRunner) that will trigger a custom Rest endpoint in which my Groovy script will be written, but when I did that I realized that some of the class which I'm wishing to use are unavailable (e.g. import com.atlassian.jira.issue.fields.Field
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.issue.customfields.option.LazyLoadedOption)
Am I going in the right direction? or there is a different recommended best practice in order to achieve my goal?
Thanks,
Adiel