I have a ticket that displays up to date changes to the description text, but shows an earlier version of the ticket when I try to edit. This older version appears to be the last version I edited. Another user reviewed my edits and re-wrote the description. Now I cannot make edits to the latest version.
This only happens in new view. When I revert to the old view, I can edit the latest version. Has anyone had any problems like this?
Hello,
How did you make it required? Did you write code?
Yes - please find my code below.
Should I be exclusively mentioning model.setRequired(false) in the if condition for Missing Vehicle Model?
def category = getFieldByName("Feature Request Category")
def year= getFieldByName("Year")
def make= getFieldByName("Make")
def model = getFieldByName("Model")
def crField = getFieldById(getFieldChanged())
def selectedOption = crField.getValue() as String
if ((selectedOption.contains("Missing Vehicle Model")))
{
year.setRequired(true)
make.setRequired(true)
}
else
{
year.setRequired(true)
make.setRequired(true)
model.setRequired(true)
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you attach this code to the Feature Request Category? I mean, you added the Feature Request Category to your behaviour and added this code in this field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes I did. Mapped to the Feature Request Category field and the project / Issue Type.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Added a line of code model.setRequired(false) to the if condition -first case and it seems to be working fine now. No matter in what order Feature Request Category values are selected the behavior of Model field seems to be working as expected. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good to hear! :)
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.