Skip to content

Conversation

@VangelisP
Copy link
Contributor

This small addition implements a new functionality that will reset the status of the transaction from 'Processed' to 'New'. it will also remove the stored suggestions for that transaction.

This is being delivered into 2 parts:

  • On the api/v3/BankingTransaction.php we add a new function called civicrm_api3_banking_transaction_reset. It accepts the transaction ID as the one and only parameter.
  • On the /templates/CRM/Banking/Page/Review.tpl we add a new button on the analysed and ignored' transactions, along with an ajax call to the new API command mentioned above.

Screenshots:

image

image

@bjendres
Copy link
Member

bjendres commented Jul 7, 2023

Great stuff!

Does it work in both UI modes (traditional and simplified)?

@bjendres
Copy link
Member

bjendres commented Jul 7, 2023

also... maybe we should add a configuration option to be able to turn this off, I could see that potentially causing a lot of havoc - e.g. when the reconciled transactions have been exported to accounting, and then somebody resets some of them. Until now, once processed, you cannot modify a transaction any more...

@bjendres
Copy link
Member

bjendres commented Jul 7, 2023

Does this exclusively work on ignored transactions?

@VangelisP
Copy link
Contributor Author

Right now, yes, it works exclusively for ignored transactions. Do you think it would be better to expand this to all of them ?

I can also provide a checkbox configuration somewhere to allow to turn off this feature or not.

Lastly, let me check because I worked on the traditional UI and not the simplified one

@bjendres
Copy link
Member

bjendres commented Jul 7, 2023

Right now, yes, it works exclusively for ignored transactions. Do you think it would be better to expand this to all of them ?

I don't think that would be a good idea. Resetting the 'ignored' ones is already kind-of dodgy, but still waaay better then resetting otherwise processed transactions without being able to undo the changes that happened in the process (e.g. created contribution, extended membership, etc)

I can also provide a checkbox configuration somewhere to allow to turn off this feature or not.

I think that would be great, see HERE

Lastly, let me check because I worked on the traditional UI and not the simplified one

If it doesn't, that's also fine - just good to know. But then maybe add a note in with the configuration option (see first item of this post).

@VangelisP
Copy link
Contributor Author

I agree as well, resetting the status on normal transactions will cause a chaos in Production environments (good for testing but bad for live).

I think that would be great, see HERE

No problem! I will add that option

If it doesn't, that's also fine - just good to know. But then maybe add a note in with the configuration option (see first item of this post).

Sure thing! 😉

@VangelisP
Copy link
Contributor Author

VangelisP commented Jul 7, 2023

Right, so this last commit does the following:

  • Adds a new checkbox in the form configuration:
  • If the checkbox is enabled, we render the button of the 'Reset status' only on ignored transactions on both interfaces (simplified/traditional)

image

If you are happy, I can squash the commits into one commit and force update this PR

@Detsieber
Copy link
Member

Sorry for my delayed comment (due to vacation).

-->> this is really great work and a significant improvement for Civibanking!

@bjendres bjendres changed the base branch from master to issue/383 July 21, 2023 08:46
@bjendres bjendres merged commit 3a67fb2 into Project60:issue/383 Jul 21, 2023
@bjendres
Copy link
Member

bjendres commented Sep 4, 2023

Remark: this is not in master yet

@MarcMichalsky
Copy link
Contributor

I would like to ask what the status is here?
In the list, this PR seems to be merged, but it was only merged into an issue branch. Will it be merged into the master branch?

@gngn23
Copy link

gngn23 commented Dec 11, 2025

I'd like to join @MarcMichalsky in his question about including this in a recent release.
I could provide a PR against the 1.3.x branch if that helps.

I was able to apply the diff to release 1.2.0 by hand using patch -p1 < DIFF-FILE.

patching file CRM/Admin/Form/Setting/BankingSettings.php
Hunk #3 succeeded at 215 with fuzz 2.
patching file CRM/Banking/Page/Review.php
patching file api/v3/BankingTransaction.php
patching file templates/CRM/Admin/Form/Setting/BankingSettings.tpl
patching file templates/CRM/Banking/Page/Review.tpl

Un-ignore (aka "Reset status") worked for me with this.


Patching release 1.3.2 would be a tiny bit more complicated (because CRM/Admin/Form/Setting/BankingSettings.php changed some more), but I think this is quite simple to fix.
Since I am going to evaluate 1.3.2 anyway, I will also test the un-ignore-transaction feature.


I did not succeed to apply the diff to 1.4.0-beta1.

@jensschuppe
Copy link
Collaborator

I created #501 as a rebased version of this PR, so that it doesn't go unnoticed anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants