Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,028
Community Members
 
Community Events
184
Community Groups

Issue Picker Field is not working when set to Required by Behavior during issue transition.

def DJ = getFieldById("customfield_10702")
def TC = getFieldById("customfield_10809")
def TJ = getFieldById("customfield_10703")
def CR = getFieldById("customfield_10700")
def DI = getFieldById("customfield_10500")

if (s == "Duplicate defect" )

{


  TC.setHidden(true)
  DJ.setHidden(true)
  TJ.setHidden(true)
  CR.setHidden(true)
  DI.setHidden(false)
  DJ.setRequired(false)
  CR.setRequired(false)
  TC.setRequired(false)
  TJ.setRequired(false)
  DI.setRequired(true)


}

Here is the condition I am checking but getting Error "Please enter the value for the field"

Even if I choose the issue and test the field showing above mentioned error.

Please help in the scenario.

 

 

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jul 07, 2020

What have you actually configured for the Behaviour, and where is the rest of the script?

Hi Nic Brough _Adaptavist_,

Thanks for your quick reply.

 

We have select list and base on the value of select list issue picker field will appear which is made required.

But when I select value in select list and issue in issue picker field and clicked on trasition then the error like "Please enter the value for the field" is getting appear.

We have checked by logging whether the issue picker is getting value or not but its getting value in field but it is not working for us.

 

Please have a look in to it.

Thanks in advance.

Hi @Nic Brough -Adaptavist- , 

Please find the exact functionality we are trying to achieve through this behaviour:

  1. We have the following custom fields on a transition screen
    1. S - Select list (single choice) with the following options:
      1. Duplicate defect
      2. Not a defect
      3. Clarification required
    2. DJ - Text field (multi-line)
    3. TC - Text field (multi-line)
    4. TJ - Text field (multi-line)
    5. CR - Text field (multi-line)
    6. DI - Single Issue Picker
  2. On the execution of the transition, the field "S" is a Required field.
  3. On the transition screen if the value of field "S" is selected as "Duplicate Defect" the field "DI" should be displayed on the transition screen and should be a required field
  4. Similarly there are different fields that are displayed if a different value is selected for the filed "S"

The Behaviour is mapped to relevant project / issue type

The  problem we are facing is --> When the transition is executed and the value of the field "S" is selected as "Duplicate defect," the field "DI" is displayed on the transition screen and marked as required. We enter the issue key on the "DI" field and click on the transition button -->  the error message "You must enter a value for this field" is displayed below the "DI" field.

The entire script is provided below for reference:

def s = getFieldById("customfield_10701").getValue()
def DJ = getFieldById("customfield_10702")
def TC = getFieldById("customfield_10809")
def TJ = getFieldById("customfield_10703")
def CR = getFieldById("customfield_10700")
def DI = getFieldById("customfield_11300")


if (s == "Not a defect")
{
DJ.setHidden(false)
DJ.setRequired(true)
CR.setRequired(false)
TC.setRequired(false)
TJ.setRequired(false)
DI.setRequired(false)
TC.setHidden(true)
TJ.setHidden(true)
CR.setHidden(true)
DI.setHidden(true)
}
else if (s == "Clarification Requested"){
CR.setHidden(false)
CR.setRequired(true)
TC.setRequired(false)
TJ.setRequired(false)
DJ.setRequired(false)
DI.setRequired(false)
DJ.setHidden(true)
TC.setHidden(true)
TJ.setHidden(true)
DI.setHidden(true)
DJ.setRequired(false)
}
else if (s == "Duplicate defect" ){
TC.setHidden(true)
DJ.setHidden(true)
TJ.setHidden(true)
CR.setHidden(true)
DI.setHidden(false)
DJ.setRequired(false)
CR.setRequired(false)
TC.setRequired(false)
TJ.setRequired(false)
DI.setRequired(true)
}
else if (s == null ){
TC.setHidden(true)
DJ.setHidden(true)
TJ.setHidden(true)
CR.setHidden(true)
DI.setHidden(true)
DJ.setRequired(false)
CR.setRequired(false)
TC.setRequired(false)
TJ.setRequired(false)
DI.setRequired(false)
}

Hi All,

Is there anyone who can have any update on this so that we can complete this open point?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events