Skip to content

fix: is Empty and is Not empty operators#17317

Merged
hariombalhara merged 1 commit into
mainfrom
fix-is-empty-and-is-not-empty-operators-notbeing-saved
Oct 25, 2024
Merged

fix: is Empty and is Not empty operators#17317
hariombalhara merged 1 commit into
mainfrom
fix-is-empty-and-is-not-empty-operators-notbeing-saved

Conversation

@hariombalhara
Copy link
Copy Markdown
Member

@hariombalhara hariombalhara commented Oct 25, 2024

What does this PR do?

Reported over intercom - User not able to save existing form which is using is Empty operator
image
image

After Fix Loom

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

See loom

@keithwillcode keithwillcode added core area: core, team members only enterprise area: enterprise, audit log, organisation, SAML, SSO labels Oct 25, 2024
@hariombalhara hariombalhara self-assigned this Oct 25, 2024
@hariombalhara hariombalhara added the High priority Created by Linear-GitHub Sync label Oct 25, 2024
@hariombalhara hariombalhara marked this pull request as ready for review October 25, 2024 04:00
@dosubot dosubot Bot added routing-forms area: routing forms, routing, forms 🐛 bug Something isn't working labels Oct 25, 2024
@graphite-app graphite-app Bot requested a review from a team October 25, 2024 04:02
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Oct 25, 2024

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (10/25/24)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add ready-for-e2e label" took an action on this PR • (10/25/24)

1 label was added to this PR based on Keith Williams's automation.

@hariombalhara hariombalhara added the 📉 regressing This used to work. Now it doesn't anymore. label Oct 25, 2024
Comment on lines +220 to +240
it("should allow fields with no value if valueSrc is empty", () => {
const result = queryValueSaveValidationSchema.safeParse({
id: "7",
type: "group",
children1: {
rule1: {
type: "rule",
properties: {
field: "name",
operator: "is_empty",
value: [],
valueSrc: [],
},
},
},
});
expect(result.success).toBe(true);
});

it("should not allow fields with no value if valueSrc is not empty", () => {
const result = queryValueSaveValidationSchema.safeParse({
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Regression tests

Copy link
Copy Markdown
Contributor

@anikdhabal anikdhabal left a comment

Choose a reason for hiding this comment

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

Looks Good🙏

@hariombalhara hariombalhara enabled auto-merge (squash) October 25, 2024 04:18
@github-actions
Copy link
Copy Markdown
Contributor

E2E results are ready!

@hariombalhara hariombalhara merged commit 4c6f242 into main Oct 25, 2024
@hariombalhara hariombalhara deleted the fix-is-empty-and-is-not-empty-operators-notbeing-saved branch October 25, 2024 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working core area: core, team members only enterprise area: enterprise, audit log, organisation, SAML, SSO High priority Created by Linear-GitHub Sync ready-for-e2e 📉 regressing This used to work. Now it doesn't anymore. routing-forms area: routing forms, routing, forms

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants