Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Triger on a Rule doesn't work fine when searching for an string that contains numbers #8825

Closed
4 tasks done
JcMinarro opened this issue Apr 26, 2024 · 0 comments
Closed
4 tasks done

Comments

@JcMinarro
Copy link

JcMinarro commented Apr 26, 2024

Support guidelines

I've found a bug and checked that ...

Description

I am trying to create a rule for a recurrent transactions that contains a number on the description.
The description is always the same, it is /TXT/D|LIQUID. CUOTA PTMO. 123456
When I try to search by the full description (description_is:"/TXT/D|LIQUID. CUOTA PTMO. 123456") the transaction is not found.
I have tried with "description contains" (description_contains:"/TXT/D|LIQUID. CUOTA PTMO. 123456"), and it doesn't work neither.
Finally I have found a way to it, splitting the query into two "Description contains" -> description_contains:"/TXT/D|LIQUID. CUOTA PTMO." description_contains:"123456"` It works, but I don't think it is the best way.

Any idea way the other triggers don't work?
I assume it should be something related with some regex used to match the description

Debug information

{
  "id": 1743,
  "created_at": "2024-04-26T00:01:05.000000Z",
  "updated_at": "2024-04-26T00:01:06.000000Z",
  "deleted_at": null,
  "user_id": 1,
  "user_group_id": 1,
  "title": null,
  "transaction_journals": [
    {
      "id": 1761,
      "created_at": "2024-04-26T00:01:04.000000Z",
      "updated_at": "2024-04-26T00:01:05.000000Z",
      "deleted_at": null,
      "user_id": 1,
      "user_group_id": 1,
      "transaction_type_id": 1,
      "transaction_group_id": 1743,
      "bill_id": null,
      "transaction_currency_id": 1,
      "description": "/TXT/D|LIQUID. CUOTA PTMO.  123456",
      "date": "2024-04-25T22:00:00.000000Z",
      "interest_date": null,
      "book_date": null,
      "process_date": null,
      "order": 0,
      "tag_count": 0,
      "completed": true,
      "transactions": [
        {
          "id": 3521,
          "created_at": "2024-04-26T00:01:05.000000Z",
          "updated_at": "2024-04-26T00:01:05.000000Z",
          "deleted_at": null,
          "reconciled": false,
          "account_id": 65,
          "transaction_journal_id": 1761,
          "description": null,
          "transaction_currency_id": 1,
          "amount": "-83.330000000000",
          "foreign_amount": "",
          "foreign_currency_id": null,
          "identifier": 0,
          "account": {
            "id": 65,
            "created_at": "2024-01-21T01:08:18.000000Z",
            "updated_at": "2024-03-28T18:45:47.000000Z",
            "deleted_at": null,
            "user_id": 1,
            "user_group_id": 1,
            "account_type_id": 3,
            "name": "***REMOVED SENSITIVE VALUE***",
            "virtual_balance": "0.000000000000",
            "iban": "***REMOVED SENSITIVE VALUE***",
            "active": true,
            "order": 3
          },
          "budgets": [],
          "categories": []
        },
        {
          "id": 3522,
          "created_at": "2024-04-26T00:01:05.000000Z",
          "updated_at": "2024-04-26T00:01:05.000000Z",
          "deleted_at": null,
          "reconciled": false,
          "account_id": 404,
          "transaction_journal_id": 1761,
          "description": null,
          "transaction_currency_id": 1,
          "amount": "83.330000000000",
          "foreign_amount": "",
          "foreign_currency_id": null,
          "identifier": 0,
          "account": {
            "id": 404,
            "created_at": "2024-04-13T00:02:40.000000Z",
            "updated_at": "2024-04-13T00:02:40.000000Z",
            "deleted_at": null,
            "user_id": 1,
            "user_group_id": 1,
            "account_type_id": 4,
            "name": "(unknown destination account)",
            "virtual_balance": "",
            "iban": null,
            "active": true,
            "order": 0
          },
          "budgets": [],
          "categories": []
        }
      ],
      "meta": [
        {
          "id": 5083,
          "created_at": "2024-04-26T00:01:05.000000Z",
          "updated_at": "2024-04-26T00:01:05.000000Z",
          "transaction_journal_id": 1761,
          "name": "payment_date",
          "data": "2024-04-26 00:00:00",
          "hash": "fc5c3b95f9906929da5553b2badf4d7db6a165fc20f8fd85e26dc7bf338aaa7e",
          "deleted_at": null
        },
        {
          "id": 5084,
          "created_at": "2024-04-26T00:01:05.000000Z",
          "updated_at": "2024-04-26T00:01:05.000000Z",
          "transaction_journal_id": 1761,
          "name": "import_hash_v2",
          "data": "2d4b156901a04313601b41f995b9dc97eda787c1df5a2f24522bbefa67a573e9",
          "hash": "586b7a0bdb91167d0e014da0c05d75f054fe9122c518d09891194c8e722333d8",
          "deleted_at": null
        },
        {
          "id": 5085,
          "created_at": "2024-04-26T00:01:05.000000Z",
          "updated_at": "2024-04-26T00:01:05.000000Z",
          "transaction_journal_id": 1761,
          "name": "external_id",
          "data": "a8d19cb7940394348a40370563655a5e",
          "hash": "a1ab69eb9a3c858de5c090d6016ce53ca327ca483f9e25bc64e61ff290f9e476",
          "deleted_at": null
        },
        {
          "id": 5086,
          "created_at": "2024-04-26T00:01:05.000000Z",
          "updated_at": "2024-04-26T00:01:05.000000Z",
          "transaction_journal_id": 1761,
          "name": "original_source",
          "data": "ff3-v6.1.12|api-v2.0.12",
          "hash": "41cb0f1ada928091a1382c1d85eeefc29dda44572c3f202720af8011c6cdf860",
          "deleted_at": null
        }
      ],
      "tags": [
        {
          "id": 1,
          "created_at": "2024-01-21T02:36:35.000000Z",
          "updated_at": "2024-01-21T02:36:35.000000Z",
          "deleted_at": null,
          "user_id": 1,
          "user_group_id": 1,
          "tag": "booked",
          "tagMode": "nothing",
          "date": null,
          "description": null,
          "pivot": {
            "transaction_journal_id": 1761,
            "tag_id": 1
          }
        },
        {
          "id": 3,
          "created_at": "2024-01-21T03:17:33.000000Z",
          "updated_at": "2024-01-21T03:17:33.000000Z",
          "deleted_at": null,
          "user_id": 1,
          "user_group_id": 1,
          "tag": "Importer",
          "tagMode": "nothing",
          "date": "2024-01-20T23:00:00.000000Z",
          "description": "",
          "pivot": {
            "transaction_journal_id": 1761,
            "tag_id": 3
          }
        }
      ],
      "categories": [],
      "budgets": [],
      "notes": [],
      "locations": [],
      "attachments": [],
      "links": [],
      "piggy_bank_events": []
    }
  ]
}

Expected behaviour

I would expect that description_is:"/TXT/D|LIQUID. CUOTA PTMO. 123456" and description_contains:"/TXT/D|LIQUID. CUOTA PTMO. 123456" find my transaction

Steps to reproduce

1-. Be sure a transaction with description /TXT/D|LIQUID. CUOTA PTMO. 123456 exists in your DB
2-. Create a rule with a trigger: description_is:"/TXT/D|LIQUID. CUOTA PTMO. 123456"
3-. Test the trigger

====================
1-. Be sure a transaction with description /TXT/D|LIQUID. CUOTA PTMO. 123456 exists in your DB
2-. Create a rule with a trigger: description_contains:"/TXT/D|LIQUID. CUOTA PTMO. 123456"
3-. Test the trigger

Additional info

No response

@firefly-iii firefly-iii locked and limited conversation to collaborators Apr 26, 2024
@JC5 JC5 converted this issue into discussion #8827 Apr 26, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant