Project60 / Project60/org.project60.banking
DB Error raised if propagated value for text field is too long
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 22
- Forks
- 45
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 7
Description
We propagate the values of the transaction's purposes to a custom field for contributions. We have a transaction with a value containing 941 characters for the purpose field. For this transaction, the propagation fails with a DB Error. No further information show up in the logs.
Our custom field is of type alphanumeric with length 255. I tried it with a field length of 1.000, same result.
One idea to address this issue is to introduce an action to cut field values to a certain length. More generally, an action could provide the possibility to extract a substring of a certain length from a field value at a certain position.
Steps to reproduce:
- Import this demo importer plugin to CiviBanking configuration
- Create a custom field for contributions called
purpose - Adapt this default matcher by replacing
contribution.custom_157by the corresponding value for your custom field and import the matcher - Use the importer to import this demo transaction data
- Use the matcher to match the demo transaction to a contact and to create a contribution for it
Exptected behaviour:
The dialog to create a contribution is shown.
Observed behaviour:
The dialog to create a contribution doesn't show up. A DB Error is shown.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by importing the linked demo plugin, matcher, and transaction data, then reproduce the failure when matching a transaction to create a contribution. Inspect the importer and matcher flow around propagation into the alphanumeric custom field and capture the underlying database error. Done means the contribution dialog appears for the 941-character purpose value, with behavior for values exceeding the field length defined and tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100