Re: [GNC-dev] First time pull request
john <[email protected]> Fri, 17 Nov 2023 10:20:16 -0800
| Newsgroups | gmane.comp.gnome.apps.gnucash.devel |
|---|---|
| Message-ID | <[email protected]> |
> On Nov 17, 2023, at 09:37, Stephen Cohoon <[email protected]> wrote: > > I have created a set of patches I would like to push for a new feature > (described below) that I have wanted for years. I have not previously > contributed to this project (other than a couple of bug reports) so I don't > know the correct procedure to submit the code. I expect to have some kind > of code review and revisions as appropriate before it is accepted into the > code base. I made my changes and tested with today's stable branch. I > have tested it on my Linux machine and I ran make check which showed 100% > pass. I don't have a Windows machine to test with and it will be a while > before I can test it on my Mac. > > What should I do next? git push? > > THE PROBLEM: > I have credit cards from multiple banks for which I use OFX/QFX transaction > imports. There is a lot of variability among these institutions as to how > they populate the transaction fields. At least one bank actually allows me > to enter memo text through their website and mobile app. For this bank I > want to append that memo text to the description field in the imported > transaction. Other banks put text that does not interest me so I want to > ignore it. Currently, Gnucash does not give me the ability to control this > on import in the way I want to. > > THE NEW FEATURE: > I have added two check box options to the Account Edit window. They > function completely independently. The OFX Append Memo option appends the > Memo field of the OFX transaction record to the Description field in the > imported transaction. The OFX Suppress Notes option prevents the import > from populating the Notes field in the imported transaction. > Put your changes in a feature branch and push that feature branch to your Github fork of GnuCash, then create a pull request from there. That said, I don't like your design: It doesn't make sense to clutter up the accounts structure with configuration for OFX imports considering that even for the fraction of users who even use OFX imports only a few accounts will have such imports. You also need to take a wider view: There are three available fields for storing text information and OFX <STMTTRN> objects provide 3 possible sources of text to put in them (two of them, NAME and PAYEE2, are exclusive). A good general design would give the user wide latitude to place the information from the OFX stream into the transaction's text fields. Regards, John Ralls