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 regression in case sensitivity for is/matches operator #3399

Merged

Conversation

jfdoming
Copy link
Contributor

@jfdoming jfdoming commented Sep 8, 2024

Fixes #3347.

A few changes here:

  • The actual bugfix is to remove the custom imported_payee field type in favour of reusing the logic for string. Instead, we do a two-stage mapping, from field to type and then from the type to the type-specific logic.
  • In order to facilitate the above, I removed the fieldTypes parameter to rule-related classes. The parameter always had the same value except in tests, so I just updated the tests to use the same types instead.

Steps to repro the issue on edge:

  1. Import a CSV with any transaction, making sure there is a valid "Imported Payee". example—note that with this CSV you'll need to select "Merchant" as the Payee.
  2. Go to create a rule, select "Imported payee", and select the contains op to start.
  3. Put the full payee name of the transaction in the value field and observe the transaction shows up as expected.
  4. Switch to matches or is with the same value and observe that there is now no match.

The same steps work as expected with this PR.

Copy link

netlify bot commented Sep 8, 2024

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit bf42f57
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/66f494ac41706700089af2c4
😎 Deploy Preview https://deploy-preview-3399.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@jfdoming jfdoming changed the title [WIP] Fix regression in case sensitivity for regexp match [WIP] Fix regression in case sensitivity for is/matches Sep 8, 2024
@jfdoming jfdoming changed the title [WIP] Fix regression in case sensitivity for is/matches [WIP] Fix regression in case sensitivity for is and matches Sep 8, 2024
@jfdoming jfdoming changed the title [WIP] Fix regression in case sensitivity for is and matches [WIP] Fix regression in case sensitivity for is/matches Sep 8, 2024
Copy link
Contributor

github-actions bot commented Sep 8, 2024

Bundle Stats — desktop-client

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
9 5.29 MB → 5.29 MB (+647 B) +0.01%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/shared/rules.ts 📈 +614 B (+9.36%) 6.41 kB → 7.01 kB
src/components/modals/EditRuleModal.jsx 📈 +35 B (+0.09%) 37.33 kB → 37.37 kB
src/components/filters/FiltersMenu.jsx 📉 -2 B (-0.02%) 12.55 kB → 12.55 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
static/js/index.js 3.31 MB → 3.31 MB (+649 B) +0.02%

Smaller

Asset File Size % Changed
static/js/AppliedFilters.js 20.97 kB → 20.96 kB (-2 B) -0.01%

Unchanged

Asset File Size % Changed
static/js/resize-observer.js 18.37 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.5 kB 0%
static/js/usePreviewTransactions.js 1.64 kB 0%
static/js/BackgroundImage.js 122.29 kB 0%
static/js/narrow.js 82.1 kB 0%
static/js/wide.js 225.27 kB 0%
static/js/ReportRouter.js 1.5 MB 0%

Copy link
Contributor

github-actions bot commented Sep 8, 2024

Bundle Stats — loot-core

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
1 1.19 MB → 1.19 MB (+36 B) +0.00%
Changeset
File Δ Size
packages/loot-core/src/shared/rules.ts 📈 +673 B (+7.54%) 8.72 kB → 9.38 kB
packages/loot-core/src/server/schedules/app.ts 📉 -55 B (-0.32%) 16.95 kB → 16.89 kB
packages/loot-core/src/server/accounts/transaction-rules.ts 📉 -224 B (-0.78%) 28.12 kB → 27.9 kB
packages/loot-core/src/server/accounts/rules.ts 📉 -825 B (-2.61%) 30.88 kB → 30.08 kB
packages/loot-core/src/server/rules/app.ts 📉 -148 B (-4.07%) 3.55 kB → 3.41 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
kcab.worker.js 1.19 MB → 1.19 MB (+36 B) +0.00%

Smaller

No assets were smaller

Unchanged

No assets were unchanged

@jfdoming jfdoming force-pushed the jfdoming/fix-case-sensitive-regexp-match branch from 535f82d to 6b44dd5 Compare September 8, 2024 21:20
@jfdoming jfdoming changed the title [WIP] Fix regression in case sensitivity for is/matches [WIP] Fix regression in case sensitivity for matches Sep 9, 2024
@jfdoming jfdoming changed the title [WIP] Fix regression in case sensitivity for matches [WIP] Fix regression in case sensitivity for matches operator Sep 9, 2024
@jfdoming jfdoming force-pushed the jfdoming/fix-case-sensitive-regexp-match branch 2 times, most recently from a37b5c7 to c16a12a Compare September 14, 2024 23:10
@jfdoming jfdoming changed the title [WIP] Fix regression in case sensitivity for matches operator [WIP] Fix regression in case sensitivity for is/matches operator Sep 14, 2024
@jfdoming jfdoming force-pushed the jfdoming/fix-case-sensitive-regexp-match branch from c16a12a to f846b0f Compare September 14, 2024 23:11
@jfdoming jfdoming changed the title [WIP] Fix regression in case sensitivity for is/matches operator Fix regression in case sensitivity for is/matches operator Sep 14, 2024
@jfdoming jfdoming force-pushed the jfdoming/fix-case-sensitive-regexp-match branch from f846b0f to 5f6a356 Compare September 14, 2024 23:15
Copy link
Contributor

coderabbitai bot commented Sep 18, 2024

Walkthrough

The pull request introduces modifications across multiple files, primarily focusing on enhancing the dynamic handling of operations related to filters and conditions. Key changes include the transition from static operation references to a more flexible system using the getValidOps function. Additionally, improvements in type safety and validation logic are made, particularly in the updateFilterReducer and the rules files. The changes aim to ensure that operations are contextually appropriate and that the overall structure of the code is more maintainable.

Changes

File Change Summary
packages/desktop-client/src/components/filters/FiltersMenu.jsx, packages/desktop-client/src/components/modals/EditRuleModal.jsx Shifted from static operation references to dynamic retrieval of valid operations using getValidOps.
packages/desktop-client/src/components/filters/updateFilterReducer.ts Updated type declaration of value for enhanced type safety.
packages/loot-core/src/server/accounts/rules.test.ts, packages/loot-core/src/server/accounts/rules.ts, packages/loot-core/src/server/accounts/transaction-rules.ts, packages/loot-core/src/server/rules/app.ts Removed fieldTypes parameter from constructors of Condition and Action, simplifying object instantiation.
packages/loot-core/src/shared/rules.ts Introduced FIELD_INFO and improved validation logic for operations, including new functions for operation validation.
packages/loot-core/src/types/models/rule.d.ts Added new properties cleared and reconciled to FieldValueTypes.
upcoming-release-notes/3399.md Documented a bug fix for case sensitivity in is and matches operators.

Assessment against linked issues

Objective Addressed Explanation
Ensure filters like is and matches work correctly (Issue #3347)
Improve dynamic operation handling for filters (Issue #3347)

Possibly related PRs

  • Undoable auto transfer notes + auto notes for cover #3411: The changes in FiltersMenu.jsx and EditRuleModal.jsx both involve a shift to using the getValidOps function for determining valid operations, enhancing flexibility in operation handling based on field types, which aligns with the dynamic approach introduced in this PR.
  • fix: csv import deduplication #3456: While primarily focused on CSV import deduplication, the changes in ImportTransactionsModal.jsx regarding transaction validation and state management may indirectly relate to the overall data handling improvements seen in the main PR's updates to filtering logic and operation validation.

Suggested labels

sparkles, merged


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between b3669b3 and 8348614.

Files selected for processing (11)
  • packages/desktop-client/src/components/filters/FiltersMenu.jsx (3 hunks)
  • packages/desktop-client/src/components/filters/updateFilterReducer.ts (1 hunks)
  • packages/desktop-client/src/components/modals/EditRuleModal.jsx (3 hunks)
  • packages/loot-core/src/server/accounts/rules.test.ts (14 hunks)
  • packages/loot-core/src/server/accounts/rules.ts (6 hunks)
  • packages/loot-core/src/server/accounts/transaction-rules.ts (4 hunks)
  • packages/loot-core/src/server/rules/app.ts (1 hunks)
  • packages/loot-core/src/server/schedules/app.ts (1 hunks)
  • packages/loot-core/src/shared/rules.ts (3 hunks)
  • packages/loot-core/src/types/models/rule.d.ts (1 hunks)
  • upcoming-release-notes/3399.md (1 hunks)
Files skipped from review due to trivial changes (3)
  • packages/loot-core/src/server/accounts/transaction-rules.ts
  • packages/loot-core/src/server/rules/app.ts
  • packages/loot-core/src/server/schedules/app.ts
Additional comments not posted (34)
upcoming-release-notes/3399.md (1)

1-6: The release notes look good!

The release notes accurately reflect the bug fix described in the PR objectives and the AI summary. The categorization as a "Bugfix" is appropriate, the author is clearly identified, and the title provides a concise description of the fix.

packages/desktop-client/src/components/filters/updateFilterReducer.ts (1)

14-14: Improved type safety.

The explicit type annotation RuleConditionEntity['value'] | null for the value variable enhances type safety by ensuring that value can either be of the specified type or null. This may help prevent potential runtime errors related to type mismatches.

The change is a type-level improvement and does not affect the runtime behavior of the function. It makes the code more maintainable by clearly communicating the expected type of value.

packages/loot-core/src/types/models/rule.d.ts (1)

40-41: LGTM! The new properties enhance the rule condition capabilities.

The addition of the cleared and reconciled boolean properties to the FieldValueTypes type definition is a positive change that expands the rule condition capabilities. These properties likely represent additional states related to financial transactions or records, allowing for more nuanced handling of transaction states.

This change may facilitate improvements in features like reconciliation and reporting. However, it's important to ensure that existing code relying on the FieldValueTypes type is updated to handle these new properties correctly.

To verify the impact of this change, run the following script:

Verification successful

The addition of 'cleared' and 'reconciled' properties is well-integrated and consistent with the codebase.

The verification process confirms that the new 'cleared' and 'reconciled' boolean properties in the FieldValueTypes are properly integrated into the existing rule system and used consistently across the codebase. Key observations:

  • The properties are correctly defined in 'packages/loot-core/src/types/models/rule.d.ts'.
  • They are incorporated into the FIELDS object in 'packages/loot-core/src/shared/rules.ts'.
  • The new properties are utilized in various parts of the application, including account syncing, transaction handling, and rule processing.

No inconsistencies or potential issues were identified as a result of these additions. The changes appear to enhance the rule condition capabilities as intended, without causing any apparent problems in the existing codebase.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify if the new properties are handled correctly in the codebase.

# Test 1: Search for usages of the `FieldValueTypes` type. 
# Expect: Relevant code segments that may need to be updated.
rg --type typescript -A 5 $'FieldValueTypes'

# Test 2: Search for rule condition checks on the new properties.
# Expect: Code segments that utilize the new properties in rule conditions.
rg --type typescript -A 5 $'(cleared|reconciled)\s*:\s*boolean'

Length of output: 178


Script:

#!/bin/bash
# Description: Verify the impact of adding 'cleared' and 'reconciled' properties to FieldValueTypes

# Test 1: Search for usages of the `FieldValueTypes` type in .ts and .js files
echo "Searching for FieldValueTypes usages:"
fd -e ts -e js | xargs grep -n "FieldValueTypes" || echo "No matches found for FieldValueTypes"

# Test 2: Search for 'cleared' and 'reconciled' properties in .ts and .js files
echo -e "\nSearching for 'cleared' and 'reconciled' properties:"
fd -e ts -e js | xargs grep -n -E "(cleared|reconciled)\s*:\s*(boolean|true|false)" || echo "No matches found for cleared or reconciled properties"

# Test 3: Look for rule-related files and their contents
echo -e "\nSearching for rule-related files:"
fd -e ts -e js | grep -i "rule" | while read -r file; do
    echo "File: $file"
    cat "$file" | grep -n -E "(FieldValueTypes|cleared|reconciled)"
    echo -e "---\n"
done

Length of output: 8390

packages/loot-core/src/shared/rules.ts (5)

Line range hint 8-51: LGTM!

The removal of the imported_payee field from TYPE_INFO aligns with the PR objective of transitioning to a more flexible system for handling field types and their associated operations.


53-72: Great addition!

The introduction of the FieldInfoConstraint type and FIELD_INFO object enhances the structure and type safety of the code. It provides a centralized way to define field constraints, including the specific rules for the imported_payee field. This change improves maintainability and ensures consistent enforcement of field-specific rules.


76-80: Nice improvement!

Dynamically generating the FIELD_TYPES map from the FIELD_INFO object is a great way to ensure consistency and reduce duplication. This change centralizes the field type information and improves maintainability by keeping the field-to-type mapping in sync with the defined field constraints.


83-101: Excellent addition!

The isValidOp and getValidOps functions are a great addition to the codebase. They centralize the logic for operation validation and retrieval, making it more robust and maintainable. By considering the field-specific constraints defined in FIELD_INFO, these functions ensure that disallowed operations are properly excluded. This change enhances the flexibility and reliability of the code when working with field operations.


214-217: Good improvement!

Expanding the getFieldError function to include new cases for string and boolean types is a positive change. It enhances the error handling and feedback for invalid input values, providing users with more informative error messages. This improvement contributes to a better overall user experience when working with the application.

packages/desktop-client/src/components/filters/FiltersMenu.jsx (3)

22-22: LGTM!

Importing the getValidOps function is a good change that allows for dynamically determining the valid operations based on the field type.


80-80: Verify the exclusion of the 'isbetween' operation.

Using getValidOps(field) to dynamically determine the valid operations based on the field type is a good approach. However, please verify that excluding the 'isbetween' operation is intentional and document the reason for its exclusion.


262-262: LGTM!

Using getValidOps(field) to dynamically determine the valid operations based on the selected field type is a good change that ensures the available operations are contextually appropriate.

packages/loot-core/src/server/accounts/rules.test.ts (15)

Line range hint 12-31: Test looks good!

The test covers parsing of various valid and invalid date formats using the parseDateString function. The test cases are comprehensive.


34-49: Test changes look good!

The test has been correctly updated to use the notes field instead of name. The logic of testing condition operators against null field values remains intact.


55-64: Test changes look good!

The test has been correctly updated to use the notes field instead of name. The logic of testing condition operators against undefined field values remains intact.


68-84: Test looks good!

The test verifies that the date conditions correctly restrict the allowed operators based on the date format. It checks for the expected errors when using invalid operators with a 'YYYY-MM' date format.


Line range hint 87-108: Test looks good!

The test comprehensively verifies the behavior of the is operator with date conditions. It checks the operator against different date formats and ensures correct matching at the corresponding granularity. The test also covers the isapprox operator with a specific date value.


Line range hint 110-161: Test looks good!

The test thoroughly verifies the behavior of the is operator with recurring date conditions. It checks the operator against different recurring patterns specified using start date, frequency, and optional patterns or interval. The test ensures correct matching of dates that satisfy the recurring condition. It also covers the isapprox operator with a recurring date condition.


164-181: Test looks good!

The test verifies the behavior of comparison operators (gt, gte, lt, lte) with date conditions. It checks that the operators correctly compare the dates and return the expected results.


184-193: Test changes look good!

The test has been updated to use the payee field as a string type instead of imported_payee. The logic of testing the is and oneOf operators with case-insensitive matching remains intact.


197-225: Test changes look good!

The test has been correctly updated to use the notes field instead of name. The logic of testing the is, oneOf, contains, and matches operators with case-insensitive matching and different scenarios remains intact.


229-230: Test change looks good!

The test has been correctly updated to use the notes field instead of name. The logic of testing the matches operator with an invalid regex pattern remains intact.


234-252: Test looks good!

The test verifies the value validation for number conditions. It checks that the isapprox, is, and isbetween operators accept valid values and throw errors for invalid ones. The test cases cover the relevant scenarios.


255-294: Test looks good!

The test comprehensively verifies the behavior of various operators (is, isapprox, isbetween, gt, gte, lt, lte) with number conditions. It checks that the operators correctly compare the numbers and return the expected results. The test cases cover all the relevant operators and different scenarios.


300-312: Test changes look good!

The test has been correctly updated to use the notes field instead of name. The logic of testing the set operator's behavior, including setting the field value, handling invalid fields, and handling invalid action operations, remains intact.


315-318: Test looks good!

The test verifies that the set operator throws an error when given an empty value for the account field. This is an expected behavior to prevent setting empty account values.


325-353: Test changes look good!

The test has been correctly updated to use the notes field instead of name. The logic of testing the execution of rules, including applying actions when conditions are met, returning updated fields, and returning the original object when conditions are not met, remains intact.

packages/loot-core/src/server/accounts/rules.ts (7)

257-258: LGTM!

The removal of the fieldTypes parameter and the direct usage of FIELD_TYPES constant improves the code by reducing coupling. The validation logic is comprehensive and the parsing of the value parameter is delegated to the condition type's parse function, allowing for type-specific parsing.


494-502: LGTM!

The removal of the fieldTypes parameter and the direct usage of FIELD_TYPES constant improves the code by reducing coupling. The validation logic covers various scenarios and the setting of the field and type properties based on the op value is a clear and concise way to handle different action types.


729-732: LGTM!

The removal of the fieldTypes parameter from the mapping of conditions and actions is consistent with the changes made to the Condition and Action constructors. The constructor provides a clear and concise way to create a Rule instance with the necessary properties.


177-190: LGTM!

The additional validation for string condition values is a good addition. The assertion that the value is a string ensures that the value is of the expected type. The assertion that the value is a non-empty string for certain operations prevents invalid or empty values from being used. These changes improve the robustness and reliability of the string condition parsing.


Line range hint 563-567: LGTM!

The execNonSplitActions function provides a clear and concise way to execute non-split actions on a transaction. The creation of a copy of the transaction object ensures that the original transaction is not modified. The iteration over the actions array and the execution of each action on the update object is a straightforward approach. The function is focused on its responsibility and does not introduce any changes or new functionality.


Line range hint 569-687: LGTM!

The execActions function handles the execution of actions on a transaction, taking into account split transactions. The separation of parentActions and childActions based on the splitIndex option is a clear way to handle actions that apply to the parent transaction and split transactions separately. The calculation of the total split count and the early return for transactions with no splits or child transactions is a good optimization.

The handling of fixed split amounts and the distribution of the remaining amount to splits without a fixed amount is a complex process, but it is well-structured and handles various scenarios such as fixed percentage splits and remainder splits. The removal of the split at index 0 (reserved for "Apply to all" actions) from the subtransactions array is a necessary step to ensure that the resulting transaction object is consistent.

Overall, the function is well-organized and handles the execution of actions on transactions with splits effectively.


Line range hint 1060-1106: LGTM!

The migrateIds function provides a way to migrate IDs in a rule based on a provided mappings object. It handles different condition operations (is, isNot, oneOf, notOneOf) and updates the value and unparsedValue properties accordingly. It also handles actions of type id with the set operation and updates the value property.

The function keeps the original value in the rawValue property, which is important for handling undo operations and maintaining a consistent mapping. The function is well-structured and handles the migration of IDs in a rule effectively.

Overall, the function is a useful utility for migrating IDs in rules and maintains the necessary data for consistent mapping and undo operations.

packages/desktop-client/src/components/modals/EditRuleModal.jsx (1)

581-582: LGTM!

The changes to use isValidOp for checking if the current operation is valid for the new condition's field look good. This ensures that the operation is appropriate for the context of the field, enhancing the robustness of the condition handling.

@@ -651,7 +653,7 @@ function ConditionsList({
) : (
<Stack spacing={2} data-testid="condition-list">
{conditions.map((cond, i) => {
let ops = TYPE_INFO[cond.type].ops;
let ops = getValidOps(cond.field);
Copy link
Contributor

@coderabbitai coderabbitai bot Sep 18, 2024

Choose a reason for hiding this comment

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

Use getValidOps consistently.

Consider using getValidOps consistently to retrieve valid operations for all condition fields instead of having a separate hack for recurring dates and amount inflow/outflow. This would make the code more maintainable and less error-prone.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This could be done in a separate refactor, but right now there is no way for getValidOps to perform op-specific logic. The change would also need additional testing that I don't want to add to an already-large PR. But thanks for the suggestion! I made a note of it.

Copy link
Contributor

Choose a reason for hiding this comment

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

@jfdoming, I understand. Deferring this change to a separate refactor makes sense to keep this PR focused. Thank you for considering the suggestion.

(_/)
( ..)
(")
(")

@youngcw youngcw added this to the v24.10.0 milestone Sep 20, 2024
@jfdoming jfdoming added regression This bug appeared after a recent release and needs to be fixed before the next release and removed regression This bug appeared after a recent release and needs to be fixed before the next release labels Sep 23, 2024
Copy link
Member

@MatissJanis MatissJanis left a comment

Choose a reason for hiding this comment

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

LGTM, however I would prefer not to merge this for the upcoming release. This is a rather risky change with a big blast radius.

@jfdoming
Copy link
Contributor Author

jfdoming commented Sep 28, 2024

LGTM, however I would prefer not to merge this for the upcoming release. This is a rather risky change with a big blast radius.

Thanks for the review! This has fully broken adding any is/oneOf/matches conditions on imported payee for me and others. IMO we can test it more thoroughly but we should try to get some version of it in, there have been many reports of this on discord as well. If you'd like I can try to make a more minimal version?

@MatissJanis
Copy link
Member

Ah.. I didn't realize it's that bad. In that case: lets merge now. We still have a few days to have it in edge and test thoroughly.

@jfdoming
Copy link
Contributor Author

Ah.. I didn't realize it's that bad. In that case: lets merge now. We still have a few days to have it in edge and test thoroughly.

Yeah sounds good. I'll make an effort to test a bunch of rules stuff later this weekend to make it safe. Also sorry, realized I came off as a bit combative 😅 just wanted to convey the breakage, really appreciate the diligence though.

@oddstr13
Copy link

Yea, I hit this issue as a hard roadblock when first testing out Actual, and have completely shelved it pending a fix 😄

@jfdoming jfdoming merged commit 545c8d5 into actualbudget:master Sep 28, 2024
20 checks passed
@jfdoming jfdoming deleted the jfdoming/fix-case-sensitive-regexp-match branch September 28, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Some filter types return no results
4 participants