Choose a content of field dependent from other fields?

fabio marcelo May 22, 2012

Hi all,

Please it will be possible make this ?

If an issue have a custom field called SubArea and this field is filled with the value "Quality" and too i have a custom field called Classification and this field can be filled with value A or B.

If SubArea=Quality and Classification = A or B , i only can choose in my other custom fileld from the type user picker the names of the quality people. If SubArea or Classification was filled with any other value the user picker is free, i can choose any people.

Thanks in Advance

BR

Fabio

2 answers

1 accepted

0 votes
Answer accepted
Mizan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2012

I think this is possible using Javascript OR Behaviours Plugin

You will have to check the values in SubArea if it is Quality then remove all the users from the user picker customfield other than some specified users

Below is a JS(works for 4.4) to remove user(option) from the user picker

<script type="text/javascript">
AJS.$("#customfield_xxxxx option").each(function()    {
    if( AJS.$(this).val() == 'USER'){ 
        var m; m=m+1;
      }else{
        AJS.$(this).remove();
    }
    
});
</script>

EDIT : Sorry the above script does not work for customfield but for assignee field

fabio marcelo June 10, 2012

Hi Mizan,

Thanks for your help.

Please, Do you have any scripts that works with custom fields?

Thanks in Advance

BR

Fabio

0 votes
fabio marcelo June 10, 2012

Hi all,

Please do you have any clue?

Thanks in Advance

BR

Fabio

Suggest an answer

Log in or Sign up to answer