Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for conditional automation step options always showing #14968

Conversation

andz-bb
Copy link
Contributor

@andz-bb andz-bb commented Nov 5, 2024

Description

Automation step options that should conditionally render based on other settings are currently always showing. I think the only place this is used is the send email automation step where calendar invite options should be shown only when Add calendar invite is checked.

Addresses

BUDI-8820

Screenshots

before
SCR-20241105-kzny

after
SCR-20241105-lbqe

Launchcontrol

fix for send email automation step settings

@andz-bb andz-bb requested a review from deanhannigan November 5, 2024 12:26
Copy link

qa-wolf bot commented Nov 5, 2024

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

@@ -865,7 +865,7 @@
<!-- Custom Layouts -->
{#if stepLayouts[block.stepId]}
{#each Object.keys(stepLayouts[block.stepId] || {}) as key}
{#if canShowField(key, stepLayouts[block.stepId].schema)}
{#if canShowField(stepLayouts[block.stepId].schema)}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  function canShowField(value) {
    const dependsOn = value?.dependsOn
    return !dependsOn || !!inputData[dependsOn]
  }

this function used to have key and value parameters but key was removed, meaning all cases where this was being called with two arguments were broken

Copy link
Contributor

@deanhannigan deanhannigan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice catch!

andz-bb and others added 4 commits November 5, 2024 13:34
…ndering-send' of github.com:Budibase/budibase into budi-8820-conditional-automation-step-options-always-rendering-send
@andz-bb andz-bb enabled auto-merge November 5, 2024 13:55
@andz-bb andz-bb merged commit 53955c1 into master Nov 5, 2024
13 checks passed
@andz-bb andz-bb deleted the budi-8820-conditional-automation-step-options-always-rendering-send branch November 5, 2024 13:58
@github-actions github-actions bot locked and limited conversation to collaborators Nov 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants