Project60 / Project60/org.project60.banking
RegexAnalyser's "lookup" action is flawed
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 22
- Forks
- 45
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 7
Description
The lookup action in CiviBanking's RegexAnanlyser has some severe flaws. Usually the lookup function should deliver the unique, single value (e.g. an account number), or return nothing.
However the current implementation has the number of shortcomings. Let's assume we're looking up a contact via a bank account:
- If the contact has more than one reference for to the same account (e.g. there are duplicate entries) the lookup will fail, because it's not unique. That should not be the case, because duplicates should be ignored.
- If another contact has an identical account, but is in trash (
is_deleted=1) the lookup will fail - this should not be the case because contact's in trash should be ignored. - In the current implementation, the processing of affected transactions will cause an exception, stopping the processing of this transaction altogether. This means the transaction cannot even be processed manually until the duplicate references are removed.
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 locating the RegexAnalyser implementation and its lookup action. Reproduce the cases described with duplicate references and trashed contacts, then inspect how affected transactions handle lookup failures. Done means duplicate references and trashed contacts do not invalidate a unique lookup, and a lookup problem does not stop the transaction from being processed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100