Hi Community, Just want to ask if I can make System Fields such as Priority to be a dynamic form.
I do have backup , which is literally scriptrunner , but I want to make it easier if its possible
Scenario is we have 4 Levels of Priority and the default value is Priority 4, when an agent is editing an issue in Edit Screen, if the agent change the value of Priority 4 to Priority 1 or Priority 2, related fields must be filled-up , if Priority 3 or 4 , nothing will be filled up
I have this script on my behavior as a backup but I think it is not working as what I've expect because it still requires me to fill up related fields even if the Priority is 3 or 4
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.fields.CustomField
def samplefield = getFieldById("customfield_xxxxx")
def priority = getFieldByName("xxxxx")
if(priority.getValue()==("Priority 1") || ("Priority 2"))
{
samplefield.setRequired(true)
} else if(priority.getValue()==("Priority 3" || ("Priority 4") {
samplefield.setRequired(false) }
Can you help me guys out of this problem? Thank you!