GnuCash
Contact   Instructions
Bug 797531 - Improve behaviour when following a hyperlink to a split that's filtered in the register
Summary: Improve behaviour when following a hyperlink to a split that's filtered in th...
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Reports (show other bugs)
Version: git-maint
Hardware: PC Linux
: Normal enhancement
Target Milestone: ---
Assignee: reports
QA Contact: reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-24 06:00 EST by Geert Janssens
Modified: 2020-06-10 08:42 EDT (History)
4 users (show)

See Also:


Attachments
target split is hidden (72.50 KB, image/png)
2020-06-03 09:51 EDT, Christopher Lam
no flags Details
Patch for jumping from reports (5.57 KB, patch)
2020-06-06 08:31 EDT, Bob
no flags Details
offer to remove filter from report (4.67 KB, patch)
2020-06-06 09:05 EDT, Christopher Lam
no flags Details
Patch for jumping from reports (9.02 KB, patch)
2020-06-07 08:18 EDT, Bob
no flags Details

Description Geert Janssens 2019-12-24 06:00:52 EST
The setup for this is as follows:
* open a register and apply a filter such that a number of splits get hidden (for example hide splits before a certain date)
* now go and open a transaction report, filter it to include the account of the above register and some of the splits that were hidden in the register itself (for example include the splits before the chosen date in the register filter)

The transaction report will properly show these splits and add hyperlinks to the register.

Clicking on a hyperlink to a split that's hidden in the register, that register will open, but the blank split will be selected.

While that's a reasonable thing to do (the target split is hidden after all) it is also a source of confusion.

Possible improvements would be to
1. inform the user the target split is hidden as the result of a filter and that's why the blank split was selected
2. ask the user to remove the filter to be able to show the target split anyway
Comment 1 Christopher Lam 2020-06-03 09:51:17 EDT
Created attachment 373707 [details]
target split is hidden

Here's a candidate patch.

modified   gnucash/gnome/gnc-split-reg.c
@@ -1795,6 +1795,9 @@ gnc_split_reg_jump_to_split(GNCSplitReg *gsr, Split *split)
 
     if (gnc_split_register_get_split_virt_loc(reg, split, &vcell_loc))
         gnucash_register_goto_virt_cell( gsr->reg, vcell_loc );
+    else
+        gnc_warning_dialog (GTK_WINDOW (gsr->window),
+                            "target split is currently hidden in this register");
 
     gnc_ledger_display_refresh( gsr->ledger );
 }
Comment 2 Geert Janssens 2020-06-04 16:57:25 EDT
How about offering the user to remove filters on the register to show the hidden split ?
Comment 3 Christopher Lam 2020-06-05 08:12:35 EDT
too difficult!

cannot find link from GNCSplitRegister to its owner GncPluginPageRegisterPrivate.
Comment 4 Bob 2020-06-06 08:31:38 EDT
Created attachment 373712 [details]
Patch for jumping from reports

Chris, give this a spin.
Comment 5 Christopher Lam 2020-06-06 09:05:06 EDT
Created attachment 373713 [details]
offer to remove filter from report

Some cleanup. Would also benefit from similar code with other uses of gnc_split_reg_jump_to_split, e.g. doubleclick from reconcile window. Not sure where to place these functions.
Comment 6 Bob 2020-06-07 08:18:00 EDT
Created attachment 373716 [details]
Patch for jumping from reports

Try this...
Comment 7 Christopher Lam 2020-06-07 08:38:15 EDT
Works well for me!
Comment 8 Bob 2020-06-10 08:42:50 EDT
I have pushed my fix to master so will be in the next version 4.0

Note You need to log in before you can comment on or make changes to this bug.