[GNC-dev] Online ID matching for OFX import

Christian Stimming christian at cstimming.de
Sun Jan 5 17:01:09 EST 2020


Am Sonntag, 5. Januar 2020, 22:39:58 CET schrieb Mike Alexander:
> I agree that running the search twice is probably ok.  However, John
> raises another point which seems relevant.  What if there is more than
> one partial match?  Right now it returns the first one.  It would seem
> better to punt if there is no full match and more than one partial
> match.

Oh well. I don't think we should complicate this a lot more. If there is a 
wrong match, currently we don't have any GUI possibility for the user to fix 
this anyway. We point the user to editing the XML file, unfortunately.

Hence, the case with multiple matches, either by complete match or by partial, 
is unsolved anyway currently. Just take the first and that's it... The real 
solution would be to have a dialog window showing all online_ids, with 
sorting, searching, editing and so on. As long as nobody volunteers to add 
such a thing, just use the first match.

Regards,

Christian


> 
>            Mike
> 
> On 5 Jan 2020, at 15:47, Christian Stimming wrote:
> > I think two passes is fine. We have a O(n) complexity anyway, and
> > O(2n) is not
> > worse than that. So I think running one pass looking for exact match,
> > then (if
> > none was found) looking for the partial match, is fine overall.
> > 
> > Caching partial matches in an extra list with element creation and
> > such IMHO
> > introduces a whole lot of extra complexity that isn't really needed.
> > Just
> > running the search twice should be fine.






More information about the gnucash-devel mailing list