Hello everyone
I have a custom field and set it to required via field configuration for this specific issue type.
The only time it should be optional is when the issue is being created since the value cannot be set at this time.
At the moment, I have the following initialiser in my behaviour.
//Set Summary
String year = new Date().format('yyyy')
def Summary = getFieldById("summary")
if(Summary.getValue() == null)
{
Summary.setFormValue("Zinsnachzahlung " + year)
}
//Make PK-Support optional on create issue screen
if (getActionName() in ["Create Issue", "Create"])
{
def PKS = getFieldById("customfield_11904")
PKS.setRequired(false)
PKS.setReadOnly(true)
}
What this looks like.
After clicking on create however.
Any idea on how else I could achieve this?
Thanks and best regards
Marius
I wonder if we could workaround the issue by having a custom scripted field that just returns the value of the database picker. We could then search on that.
Thanks for the suggestion Daniel. It's taken a while for me to have a chance to look at it but I can confirm that using the resource to take the id value stored by my database picker field and then pull the friendly name from the resource I can store the values in a scripted field and search on that.
It's clunky but the main thing is that it works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The scriptrunner for jira plugin lets you define derived fields that are defined with a groovy script
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.