Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to make users choosing an issue type?

Ivan D November 28, 2022

Hello Community,

So far the solution to make users choosing an issue type is that: adding the dumb issue type like "Choose an issue type" (sure with conditions preventing to create a ticket) and making it the default issue type.

The issue is the type scheme contains Task, and this type as default one cannot be changed to a custom issue type in the scheme - it seems it's the known bug (at least, in v.7.5)

When using behaviours, the initial setting setFormValue("Choose an issue type") for Task works, but except the case when Task is actually needed - it's reset to the above.

So the goal is:
1) when switching to this project, the default issue type is "Choose an issue type"

2) When choosing any issue type, it is chosen

I've played around with this code:

def issueTypeField = getFieldById(ISSUE_TYPE)
//def summ = getFieldById(SUMMARY)

def issueTypeValue = getFieldById(getFieldChanged()).value.toString()
issueTypeField.setFormValue("Choose an issue type")
//summ.setFormValue(issueTypeValue)

if (issueTypeValue == "10000"){ //10000 is Task id
issueTypeField.setFormValue("Task")
}

Summary was used to check values.

Can someone help me out here?

Thanks!

 

0 answers

Suggest an answer

Log in or Sign up to answer