GNOME Bugzilla – Bug 336843
RFE: Attach images/files/urls to transactions.
Last modified: 2018-06-29 21:00:54 UTC
For accountability purposes, it would be very useful to be able to attach an image (receipt, cancelled check, etc) to a transaction; possibly through using a Sane frontend, or possibly by just allowing files to be attached and moved to a data directory. Binary data could be stored separately from the transaction data for space reasons, so that the financial data could be easily moved, but the data store wouldn't have to go with it.
More generally, would "attach an URL" also meet your needs? An URL can also be file:/foo/bar.jpeg and of course it should be clickable...
Quicken has a great implentation of this. Use the help on their support site to understand how they do this. I currently have no great need of using this program unless this feature is implemented. It is really the main thing which will make using a computer so much better than paper - much more organized then a filing cabinet of paper - and less time consuming to look up later...
*** Bug 113093 has been marked as a duplicate of this bug. ***
*** Bug 464120 has been marked as a duplicate of this bug. ***
*** Bug 481961 has been marked as a duplicate of this bug. ***
I would also enjoy this feature very much. Adding a URL would be a great intermediate step. Some rudimentary file management would be very helpful and would pave the way for a sane plugin to scan files directly from an entry. Thanks for the great software!
Thanks to Derek on the gnucash-devel mailing list, my request there (see below between asterisks) now has found an even more appropriate audience. ** Would it take much to implement hyperlink capabilities in textual fields, e.g. Description in a Transaction? It would be nice to have a clickable link to a document for each transaction (invoice, receipt etc.). And of course to be able to drag document icons into the field for automatic link generation -- but I guess that would be several steps up. ** I am not myself in a position to follow up either of the two paths towards a solution hinted to above (Sane & Quicken), thus I can only add my agreement to the requests already in place.
*** Bug 540222 has been marked as a duplicate of this bug. ***
There was an offer for a bounty on this request. http://lists.gnucash.org/pipermail/gnucash-devel/2008-August/023820.html Given that this is a longstanding enhancement request from a number of users, it seems like an ideal candidate for putting a bounty on, if there's a developer willing to take it.
Is there any update on this request? I am considering switching from Peachtree to GnuCash and Peachtree has supported this functionality since 2008. I guess it's the only thing blocking me from using GnuCash. I have moved to completely paperless using this feature in Peachtree and I don't want to have to deal with paperwork again if I switch to GnuCash.
Also looking to attach documents, although I would be happy with inserting a URL. Any news on this possibility?
I'd be very happy if this got implemented! URL good but files would be even better. The ultimate could be a 'file store', a single file that acts as a container for all files/images attached to transactions (for easy of backup).
Are there any news on this? I think the option of attaching an electronic document to a transaction would make a great addition. For most of the commercially available software this is a standard feature and a very useful one, if I may add.
I would be glad to have a go at implementing this. Please see below for further details: http://lists.gnucash.org/pipermail/gnucash-devel/2011-April/031768.html
I believe it would make sense to attach not only images but at least pdf files as well. In any case the system could just let the user upload any kind of file he wants, but for known types common it could show a preview or open in a tab. while it is common to have invoices stored in images or pdf each user may use something different like .doc files or html (I've seen that already) also, it should let users attach more than one file for each transaction
This is a crucial piece of missing functionality (missing for many many years now). What kind of financial contribution needs to be made to have this incorporated?
I would highly support this feature as well. It is probably the only feature that is keeping me back from using GnuCash over Quicken. I emptied 90% of my filing cabinet from being able to attach documents to my transactions.
Is there any status update on this?
Both main free software applications in this field lack this functionality and have a years old outstanding bug, making it very uncomfortable for those of us who need this basic feature. Dyne.org can even offer a bounty for this, please let us know if that would motivate any developer to act upon this feature request. thanks, ciao
Created attachment 259327 [details] [review] Patch to store file URIs per transaction The functionality works under Linux with the XML backend, however there are a few untested areas and TODOs: - SQL backend (untested), I added a column which of course would cause issues for existing tables. - Code to execute the associate file is modeled after gnc_gnome_help() - which is platform dependent. I have no objective C experience so the Mac functionality is completely not implemented. Windows is untested and likely needs a tweak or two.
Hi folks, I intended to post the comments above as patch comments in addition to the following post: I recently posted a message to gnucash-devel looking for some feedback on a patch I created to store file:// URI's to a transaction. The method I used knowingly broke backwards compatibility with the backend storage but I believe I've been pointed in the right direction to implement this in gentler way. As you probably see in the patch notes above, I only have ability to build/test for the Linux platform. There are a few platform specific things for Mac and Win32 that another developer will need to tweak. (Namely, the methods for executing/opening the stored links, as they are different per platform) I'm not sure when I'll get more time to work on this as I'm very busy, but hoping I'll find some time later this month. Thanks, Patrick
I have not reviewed your patch (I need this for Mac) but I just wanted to express my gratitude for you working on moving this essential enhancement forward. Thanks!
Created attachment 259399 [details] [review] Patch to store file/location URIs per transaction A few updates: - URI is now stored in KVP instead of the Transaction struct. This should maintain compatibility with existing installations. (Per John Rails' suggestion.) - Split menus and dialogs for storing a file link vs. a location link. - Added menus to right-click in addition to top menu - Added UNTESTED code for Mac and Win32. I think it's close but I have no way to compile/test. I've only tested this with the XML backend, but believe it should function with SQL properly as well. (Now that it's converted to KVP..) Thanks, patrick
Comment on attachment 259399 [details] [review] Patch to store file/location URIs per transaction Works fine with Fedora 18 and appears backwards compatible with 2.4.13.
Comment on attachment 259399 [details] [review] Patch to store file/location URIs per transaction Why go to the trouble of making properties if you're not going to use them? Better to make TransSetAssociation and TransGetAssociation static and use g_object_set/get. What's qofTransSetAssociation for? There's no reason to wrap xaccTransSetAssociation in qof_instance_begin_edit(). The minimum GTK version for Gnucash 2.5 is 2.24, so ifdef HAVE_GTK_2_14 is never true. Besides, the macro is GTK_VERSION_CHECK. Nice try on the Mac version of gnc_launch_assoc, but it wouldn't even compile. Best that you #if 0 it and comment "FIXME:Implement". There's some formatting work. You might want to run astyle --indent=spaces=4 --brackets=break --suffix=none and then regenerate the patch. Rather than using git diff, commit your changes and use git format-patch. That makes it much easier to apply.
Created attachment 259708 [details] [review] A little more cleanup... John, all, I don't have much time this week at all, but given that everyone seems to be giving this so much attention I thought I'd give it my spare half hour tonight. I've tried to address several of your comments below, but unfortunately I wasn't able to hit all these punch items this go-around. Thanks again, please see specific responses below.. Cheers! >Why go to the trouble of making properties if you're not going to use them? >Better to make TransSetAssociation and TransGetAssociation static and use >g_object_set/get. I'd patterned these functions after the other TransGet/Set functions in Transaction.c. None of the others use the g_object_set/get method so I'll have to spend more time to figure out how that's implemented. >What's qofTransSetAssociation for? There's no reason to wrap >xaccTransSetAssociation in qof_instance_begin_edit(). OK good to know. I've removed it and set the QofAccessFunc/QofSetterFuncs in xaccTransRegister to TransSetAssociation and TransGetAssociation. >The minimum GTK version for Gnucash 2.5 is 2.24, so ifdef HAVE_GTK_2_14 is >never true. Besides, the macro is GTK_VERSION_CHECK. This same check is made in several other places in GNUCash code: plugins/customer_import/dialog-customer-import-gui.c plugins/bi_import/dialog-bi-import-gui.c In any case, I've removed the check in favor of the newer library version. >Nice try on the Mac version of gnc_launch_assoc, but it wouldn't even >compile. >Best that you #if 0 it and comment "FIXME:Implement". Shot in the dark :).. Without a Mac compiler it's tough to code. (Especially since Objective-C is rather foreign to me.) It's #ifdef'd out now. I wonder if the same should be done for the Windows code, though for that I strongly believe it's VERY close, despite that I haven't tried to compile it... >There's some formatting work. You might want to run astyle -->indent=spaces=4 >--brackets=break --suffix=none and then regenerate the patch. I just noticed that in the Mac code in particular - Sorry, late night coding.. >Rather than using git diff, commit your changes and use git format-patch. That >makes it much easier to apply. Got it.. attached in that fashion.
Comment on attachment 259708 [details] [review] A little more cleanup... I fixed up a minor glitch, implemented the Mac version of gnc_launch_assoc (which doesn't work with pdfs, at least on my box, but we can deal with that later), fixed up the commit message, and dcommitted. r23397.
Another minor glitch fixed in the Win32 bindings. Patrick, we use MinGW for Win32, so one must include <windows.h> in order to pull in the mscvrt.dll API. Transactions need some sort of visual indication that there's a link set. A new single-character-wide column was suggested on the devel list -- that writer also suggested a thumbnail pop-over when the mouse hovers on the indicator. Regardless of what we do about that, when there *isn't* a link set, the 'Open Associated File' menu item should be disabled so that it's grayed out. It's enabled now for all transactions.
Created attachment 263203 [details] [review] Added conditional to grey-out/disable 'Open File/Link'; minor bugfix Added the following. Haven't looked at visual indication yet. BUG 336843 (Attach images/files/urls to transactions): - Added conditional to grey-out/disable 'Open File/Link' when association is unset - Converted 'Open Location' dialog to gtk_dialog_new_with_buttons - fixed invalid options from last submitted patch - made dialog modal
Comment on attachment 263203 [details] [review] Added conditional to grey-out/disable 'Open File/Link'; minor bugfix John committed this in r23563. Thank you for your patch.
Are there still things to be done for this bug or can it be closed now ?
I think it's safe to close this bug at this point, in my opinion. The functionality requested by the bug has been implemented. However, to put it on the record there were several enhancements pointed out that should be considered in the future, and perhaps opened as separate bugs: 1. Indication via the GUI if a transaction has an associated attachment. (e.g. a column with a link or paperclip icon or something to that effect.) 2. Consider offering users the choice to "Import/Store" the file chosen. (Similar to that of Shotwell). This could resolve future dead-link/file issues by storing a copy of the file in a consistent location. This would also provide the benefit to having a single directory structure for backup purposes. Lastly, for documentation sake I had also considered storing the files in the SQL backend. But I dismissed that option as I thought the database would grow too large for practicality. The first GUI issue should be fixable by a GUI Guru somewhere, but that person is not me. The latter is something I'm also not keen to tackle unless there is significant interest. Just my .02 FWIW.
As implemented in the 2.6.0 release, there does not seem to be a way to disassociate a file with a transaction. For example, if I attach a file to a transaction, I can use the context menu and the application menu options to open the file, but there is no way to remove it from the transaction. Associating a file and then associating another file later seems to remove the first association. What if I thought I wanted a file associated with a transaction and I later decide that in fact I want no file associated with it?
Is it possible to expand this feature to include transactions generated by bills/invoices from the business feature. When i try to associate a file to an transaction that are generated by a bill/invoice i get a message stating that the transaction is locked by the business..... and that i can try unpost the bill/invoice. If i unpost the bill there is no transaction to associate the file with. As i see it there are two approaches for solving this.Add a file associations field in the bill/invoice dialog that are written at the same time as the rest of the transaction.Or the file association function needs to be able to override the lock/unlock the transaction. I scan all my bills so that i can make backup to an online account and it would be nice if i could associate the images directly to the transactions generated by the bill.
In reply to comment 32, comment 33 and comment 34: can you please file these as new and separate enhancement requests ? They are all useful requests, but it's impossible to track the state of each of these enhancements in one big report. you can refer to this bug in your new requests. Thank you. The feature as originally requested as been implemented so I'll close this bug now.
A few of the suggestions above have been converted into enhancement requests: (In reply to Patrick from comment #32) > 1. Indication via the GUI if a transaction has an associated attachment. > (e.g. a column with a link or paperclip icon or something to that effect.) > See bug 744790 and on uservoice: https://gnucash.uservoice.com/admin/forums/101223-feature-request/suggestions/5951785-display-e-g-in-form-of-a-small-icon-if-a-file-l > 2. Consider offering users the choice to "Import/Store" the file chosen. > (Similar to that of Shotwell). This could resolve future dead-link/file > issues by storing a copy of the file in a consistent location. This would > also provide the benefit to having a single directory structure for backup > purposes. This is now on uservoice: http://gnucash.uservoice.com/forums/101223-feature-request/suggestions/8854033-copy-file-attachment-to-permanent-gnucash-locatio (In reply to Magnus Andersson from comment #34) > Is it possible to expand this feature to include transactions generated by > bills/invoices from the business feature. For the record, Magnus filed bug 735408 for this.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=336843. Please update any external references or bookmarks.