Project60 / Project60/org.project60.banking
DefaultOptions matcher & contribution status override
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 22
- Forks
- 45
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 7
Description
Hello @bjendres , a quick clarification on the DefaultOptions matcher, if you like:
Some clients of mine asked me to be able to override the contribution status when they are doing a manual processing of a transaction.
Currently, even if you do declare the contribution status_id on the failsafe/default/manual rule, because of those 2 entries:
- https://github.com/Project60/org.project60.banking/blob/master/extension/CRM/Banking/PluginImpl/Matcher/DefaultOptions.php#L143
and - https://github.com/Project60/org.project60.banking/blob/master/extension/CRM/Banking/PluginImpl/Matcher/DefaultOptions.php#L147
the contribution will be either saved as 'Completed' or 'Cancelled'. Shouldn't DefaultOptions matcher be able to check if there is a variable that overrides the internal status assignment ?
On the other hand, we could use the postprocessor to re-update the contribution based on the rule but that would create some overhead.
I am just not sure what should be the proper approach. In case the ideal thing would be to expand the 'DefaultOptions' matcher to adapt to this behaviour, I would gladly create a PR for that.
Kind regards,
Vangelis
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 in extension/CRM/Banking/PluginImpl/Matcher/DefaultOptions.php, especially the referenced lines 143 and 147, and trace how manual, default, and failsafe rules assign contribution status. Done means determining and implementing the agreed behavior for an explicitly declared contribution status without the matcher forcing Completed or Cancelled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, payments
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100