[GNC] [devel question] instanceCount in schedxaction
John Ralls
jralls at ceridwen.us
Wed Jul 17 20:38:13 EDT 2024
Your email to gnucash-devel went through, https://lists.gnucash.org/pipermail/gnucash-devel/2024-July/046944.html
Regards,
John Ralls
> On Jul 16, 2024, at 21:42, Kevin Buckley via gnucash-user <gnucash-user at gnucash.org> wrote:
>
> I've tried posting the following to the -devel list, to which I thought
> I was subscribed, but even after trying to subscribe, I haven't seen
> anything back, nor has the post passed moderation there.
>
> As it's possible that some non-devel folk might have some insight here,
> and so as to alert any devel folk on here to the question, I thought I'd
> try posting it here.
>
> Here's hoping,
> Kevin
>
>
> First up: need to point out that I'm running a modified 2.6.21a,
> but few gnucash-devs would recognise the source tree its built
> from as being such, as it's been rolled forwards a few versions
> past the directory layout changes!
>
> Secondly, the potential inconsistency I'm seeing doesn't affect
> the functionality of the application.
>
>
> Had been thinking about taking the XML stanzas for the schedxaction
> entries in my dot-xac GnuCash files and mangling them into generic
> calendar (VCal) entries that I could then use external to GnuCash.
>
> For the schedxaction I have first looked at, I have noted
> (some info replaced/truncated)
>
> <gnc:schedxaction version="2.0.0">
> <sx:id type="guid">e468...</sx:id>
> <sx:name>SX Name</sx:name>
> <sx:enabled>y</sx:enabled>
> <sx:autoCreate>n</sx:autoCreate>
> <sx:autoCreateNotify>n</sx:autoCreateNotify>
> <sx:advanceCreateDays>0</sx:advanceCreateDays>
> <sx:advanceRemindDays>0</sx:advanceRemindDays>
> <sx:instanceCount>24</sx:instanceCount>
> <sx:start>
> <gdate>2023-08-30</gdate>
> </sx:start>
> <sx:last>
> <gdate>2024-07-03</gdate>
> </sx:last>
> <sx:templ-acct type="guid">548e...</sx:templ-acct>
> <sx:schedule>
> <gnc:recurrence version="1.0.0">
> <recurrence:mult>2</recurrence:mult>
> <recurrence:period_type>week</recurrence:period_type>
> <recurrence:start>
> <gdate>2023-08-30</gdate>
> </recurrence:start>
> </gnc:recurrence>
> </sx:schedule>
> </gnc:schedxaction>
>
>
> By my reckoning, the dates for that schedxaction
> (Every 2nd Week on a Weds since StartDate,
> with no End, Date nor Number) are
>
> 1 2023-08-30 start
> 2 2023-09-13
> ...
> 22 2024-06-19
> 23 2024-07-03 last But 23 not 24 as in the instanceCount above ?
> 24 2024-07-17
> ...
>
> so I was wondering why the "instanceCount" was stored as 24 and not 23 ?
>
> If it's correct, then I'm thinking it'd just be some logic within the
> code that would be what requires it to be stored as a "nextInstance",
> but I just thought to ask about it, in case something I'd been doing
> had caused that potential inconsistency?
>
> I could see that a schedxaction without an end could be computed
> from the last date, plus the recurrence data, so wouldn't need
> to "know" the count, anyway, in which case you'ld only be storing
> an instanceCount so as to aid modifying the schedxaction via the
> dialog: so perhaps that's it?
>
> I'm sure someone will know ?
>
>
>
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
More information about the gnucash-user
mailing list