Hi There,
I have a need to make the Attachment mandatory depending on the field selection during issue creation. I have got the following but that's not working, is this supposed to work even against system field like - Attachments?
Mapped to field > "is pres prepared"
def presentationPrepared = getFieldById(getFieldChanged())
def presentationAttachment = getFieldByName("Attachments")
def selectedOptionPresPrep = presentationPrepared.getValue() as String
def isPresentationPrepSelected = selectedOptionPresPrep == "Yes"
def isPresentationPrepNotSelected = selectedOptionPresPrep == "No"
presentationAttachment.setRequired(isPresentationPrepSelected)
Hello,
Unfortunately, you cannot do this using a behaviour. See this bug report for more information.
Instead, you can set up a custom script validator to handle this. There is an example on how to do so in the comments on that report. :)
Please let me know if you have any further questions.
Jenna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.