Hi, i would like to set 1 filed based on other fields, is this possible? I have looked at https://studio.plugins.atlassian.com/wiki/display/JBHV/JIRA+Behaviours+Plugin#JIRABehavioursPlugin-Setonefieldbasedonanotherfieldwithinformationprovidedbytheserver
but i cant see how to do it.
Scenario:
Whilst creating an issue, user selects the severity = high, and module = UI. I would like to then default/set the value for Priority = medium.
Anyone have any tips on this?
Thanks
Like the example explains, you will need to do a few things here:
Look at the other advanced examples for more code snippets too.
You can add a script in the description.
<script type="text/javascript"> change = document.getElementById('customfield_10124'); if (change) { defect = document.getElementById('customfield_10171FieldArea'); defect.style.display='none'; change.onchange=function() { if (this.value == 'Defect') { defect.style.display=''; } else { defect.style.display='none'; } } }
I used the above script to change the visibility of one field based on the value of another.
Hi All.
Vishnu, could you help me for your solution in my problem.
I have custom filed multicheckbox(customfield_10000) and I would like displaying text custom filed(customfield_10001) if one of the option custom field(customfield_10000) is true - (set checkbox).
I'm not strong to correct your script, help me please. JIRA 5.2
I am not Vishnu :-)
However, something like this should work:
<script type="text/javascript"> multicheckbox = document.getElementById('customfield_10000'); if (multicheckbox) { text_field = document.getElementById('customfield_10001FieldArea'); text_field.style.display='none'; multicheckbox.onchange=function() { if (this.value) { // Anzeige des Textfeldes, falls überhaupt Wert in Multicheckbox gewählt
text_field.style.display=''; } else { text_field.style.display='none'; } } }
</script>
You can put this in the field description of custom-field 10000.
Hi Clemens!
Thank you for your attention!
And if I have some option custom field checkbox(for example, 8(10000 - 10008)) and 8 custom fields (10009 - 10017), I need to display custom fields on depending from one or more true checkbox. Could you help me, please.
Hi Artashes A,
Please descibe what you tried (with code example) and where you are struggling.
Clemens, HI.
Sorry for the long waiting. I found solution for my problem. Thanks for your attention!
HI, What was the Solution? Please share
Hi Warren!
I resolved my problem in jjupin:
//assign to the signaturestring[] availableFields = {"value_1", "value_2"};string[] t = usersInGroups("GL_Direktors");string[] selectedCheckboxes = customfield_10607; //I want to send someone to signfor (string field in availableFields){ if(elementExists(selectedCheckboxes, field)){for(number i = 0; i < size(t); i = i + 1){ if (isUserInRole(getElement(t, i), "ID", field)) {customfield_11300 = addElement(customfield_11300, getElement(t, i));}}}}
Thank you for your answer!
Opened a new thread for this question since it is on a pretty old post.
HI, could you please share the code,
I too have same scenario , will you please share the code. here
Thanks!
It looks like you're new here. Sign in or register to get started.