After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728103 - Invoice opened does not contain the Job under circumstances
Invoice opened does not contain the Job under circumstances
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: General
2.6.3
Other Linux
: Normal minor
: ---
Assigned To: gnucash-general-maint
gnucash-general-maint
Depends on:
Blocks:
 
 
Reported: 2014-04-13 06:12 UTC by Michalis
Modified: 2018-06-29 23:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Modify function gnc_invoice_save_page (1.73 KB, patch)
2014-05-04 19:31 UTC, Michalis
committed Details | Review

Description Michalis 2014-04-13 06:12:58 UTC
Steps to reproduce:
Open Gnucash
Open an Invoice (which has a Job) for View/Edit
Notice the Job is there
Close GnuCash
Open GnuCash again
The Invoice is still open. Job field is empty.

Tested on 2.6.3 (Windows and Linux), and 2.6.2 (Linux).
Comment 1 Mike Evans 2014-04-15 09:15:33 UTC
Confirmed for git master in Fedora18.  

To restore the job, it's not enough to edit the invoice and re-select the job.  I have to first select a different job, then re-edit and select the correct job.  It's gone again after another save, close, open cycle though.  

It looks as if the job is still applied to the invoice but the text box isn't being updated.  Adding a new entry to the invoice causes the job to reappear, as does deleting an entry.
Comment 2 Michalis 2014-05-04 19:30:48 UTC
The problem is in saving the page as a state for Gnucash. The function did not check for job, so it always saved the customer or the vendor as the owner, instead of the job. 
The patch resolves the problem (tested in linux - master, with vendor bills with and without jobs, and invoices).
Comment 3 Michalis 2014-05-04 19:31:18 UTC
Created attachment 275845 [details] [review]
Modify function gnc_invoice_save_page
Comment 4 Mike Evans 2014-05-10 09:51:25 UTC
Tested in maint and master branch on Linux FC18.  

Old invoices on opening still don't show the job name, but on re-saving then re-opening the job is displayed correctly.  This is as I'd expect with this patch, so looks good to me..
Comment 5 Geert Janssens 2014-05-20 12:19:54 UTC
If I understand the state saving code correctly it wasn't even necessary to re-save. Just closing and opening the book would be sufficient.

I have applied the patch to the stable branch. Thank you very much !
Comment 6 John Ralls 2018-06-29 23:29:32 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=728103. Please update any external references or bookmarks.