Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 21:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×

Forums

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

How to make attachment field mandatory based on cascading select?

KRC
Contributor
April 10, 2019

In our JSD customer portal, we want to make attachment field mandatory based on cascading select field option, which is (parent2,child3) in create transition

We tried using add-ons like JSU and JWT, but no luck.

or at least hide Attachments field in create transition when the cascading field option is not equal to (parent2,child3) and show attachments when options is equal to (parent2,child3).

 

Can anyone please share your knowledge or solution to achieve this?

 

Thanks  

2 answers

1 vote
Max Foerster - K15t
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 20, 2019

Hi @KRC

your use case can be achieved pretty quickly in JWT. I guess you didn't come across the usage example Make attachment mandatory depending on the value of certain custom field?

The only difference in the setup is that you will validate on a cascading select custom field. So using the Boolean validator with math, date-time or text-string terms, validate %{nnnnn.1} where nnnnn is the field code of your cascading select custom field and will return the value "child3". This means:

%{nnnn.1} = "child3" IMPLIES {00135} > 0, where {00135} is a virtual field for "Number of transition attachments"

in other words, your validating: "select list is NOT "child3" OR the number of attachments is > 0". So one of the options will always be true and the attachments only count when they have to. :)

Best, Max

0 votes
KRC
Contributor
April 10, 2019

Figured it out, but anyways plz share your knowledge. We might get a new perspective

I used JMWE, add-on.

  1. In create transition>validators> Fields required Validator(JMWE add-on)
  2. In fileds-  Choose Attachments
  3. Error Message - Add whatever u want to display
  4. Checked conditional validation and I used:  issue.getAsString("CascadeSelectCustomFieldName") == "Parent2,Child3"

Will update if anything changes.

Peace...

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events