Hi Team,
How to achieve this using behavior script or any java-script?
Thanks in advance
Hi @Teja ,
Following script may help you.
def roadMapField = getFieldById("customfield_xxxxxx")
def launchTypeField = getFieldById("customfield_xxxxxx")
String roadMapVal = roadMapField.getFormValue();
if(roadMapVal.equals("ABC")){
launchTypeField.setRequired(true);
} else {
launchTypeField.setRequired(false);
}
There are lots of methods that you can use in behaviours, please check this link.
Regards
Thank you for your swift reply,
I rephrased my question body.
Initially I wanted to enable/disable Launch Type field based on the selection Roadmap Item Type value. I will do the validation later using 'Validators' on create screen.
Ex: If Roadmap Item Type = "ABC" then enable Launch Type field.
If Roadmap Item Type = "XYZ" then readonly Launch Type field.
def roadMapField = getFieldById("customfield_xxxxxx")
def launchTypeField = getFieldById("customfield_xxxxxx")
String roadMapVal = roadMapField.getFormValue();
if(roadMapVal.equals("XYZ")){
launchTypeField.setReadOnly(true);
} else {
launchTypeField.setReadOnly(false);
}
The above code did not work.
Am I doing anything wrong?
Regards
Tejas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Teja ,
You can use this one in order to implement this scenerio.
If Roadmap Item Type = "Tactical" then make Launch Type field enabled.
def roadMapField = getFieldById(getFieldChanged())
def launchTypeField = getFieldById("customfield_15400")
String roadMapVal = roadMapField.getFormValue();
if(roadMapVal.equals("Tactical")){
launchTypeField.setReadOnly(false);
} else {
launchTypeField.setReadOnly(true);
}
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Teja
Could you please help me to keep a field available with other field's value?
Only when user set the Automation Status as Automated, Test Cases Reference will be shown below the Automation Status.
Thanks,
Anusha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Tansu Akdeniz Can Behaviours be used to display a field for specific projects alone & not be visible to every project ,after adding the field to the Issue type screen ? I'm looking for an alternative to using the usual options. Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Aisha M
Behaviors configuration is mapped to projects. If you hide a field in certain projects, it won't be visible in these projects screens.
For example, assume that we have 3 projects sharing same screen schemes and we want to make a field hidden in two of them. Then map the behaviors to those two projects and hide the field.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Tansu Akdeniz Thank you for the comment. So, if I have >40 projects & want the field to be visible in just 5 projects, then how can I make it happen using behaviors ? I guess selecting >35 projects should be tedious :) Or is there is a way to selected all projects & deselect a few
Also, is there is a way to like selected ALL PROJECTS & the issue type. & then have a script or something to enable the field in certain projects & disable in others or something ? Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Aisha M
You have to select all those projects manually and make the field hidden in bhv configuration. I do not know an easy way for mapping projects. Another traditional option is to split screen schemes between the projects.
Yes, it is possible. You can map to all projects then filter in your custom script if you are familiar with scripting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.