I'm attempting to duplicate the functionality shown in this video. I have two single-choice select fields, and I want to hide one based on the value of the other.
Automatable is customfield_10578, and Automation Status is customfield_10577.
When I go to choose a field, however, Automatable is not an option in the dropdown:
Which is fine; it's Automation Status that I'm trying to show/hide. So I select that, and write this script:
// Insert the Jira UI modifications API script for the behaviour.
const autoStatus = getFieldById("customfield_10577");
const autoYes = getFieldById("customfield_10578");
logger.info("Value : " + autoYes.getValue().name);
if(autoYes.getValue().name !== "Yes") {
autoStatus.setVisible(false);
logger.info("false");
}
else {
autoStatus.setVisible(true);
logger.info("true");
}
No overload matches this call.Overload 1 of 2, '(fieldId: "customfield_10577"): AffectedField', gave the following error.Argument of type '"customfield_10578"' is not assignable to parameter of type '"customfield_10577"'.Overload 2 of 2, '(fieldId: "customfield_10071" | "customfield_10505" | "customfield_10507" | "customfield_10064" | "customfield_10069" | "labels" | "assignee" | "customfield_10051" | "customfield_10052" | ... 165 more ... | "customfield_10517"): Field', gave the following error.Argument of type '"customfield_10578"' is not assignable to parameter of type '"customfield_10071" | "customfield_10505" | "customfield_10507" | "customfield_10064" | "customfield_10069" | "labels" | "assignee" | "customfield_10051" | "customfield_10052" | ... 165 more ... | "customfield_10517"'.(2769)
Hi @Esther Strom
I am Bobby (from the video!) I have had a look at your issue and I can't seem to replicate the issue. Would it be possible for you to raise a bug ticket here at our portal here: https://productsupport.adaptavist.com/servicedesk/customer/portal/23, so that one of our team can help you solve this?
Kind regards,
Bobby
@Bobby Bailey thanks for the response. I did open a ticket last week. It's very strange; with that particular behavior, I made no changes to it overnight but when I went back the next day the errors were gone and it was working. However, every time I try to create new behaviors, I either get those same errors or they just don't run (nothing in the logs).
Either the product is still quite buggy, the documentation is very incomplete, or something went wrong during the installation on our instance.
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.