Bug 479854 - The tool "Align sub-operation date..." don't update an operation
Summary: The tool "Align sub-operation date..." don't update an operation
Status: ASSIGNED
Alias: None
Product: skrooge
Classification: Applications
Component: general (show other bugs)
Version: 2.27.0
Platform: Kubuntu Linux
: NOR normal
Target Milestone: 25.1.0
Assignee: Stephane MANKOWSKI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-15 16:03 UTC by vicnet
Modified: 2024-01-26 22:35 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Sample file (351.02 KB, application/x-skgc)
2024-01-17 20:40 UTC, Stephane MANKOWSKI
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vicnet 2024-01-15 16:03:30 UTC
SUMMARY
The tool "Align sub-operation date..." don't update one selected operation (the last, ones with different dates in sub-operation), in an account view.

STEPS TO REPRODUCE
1. Open an account view
2. Select manually multiple operations that contain some suboperation unaligned
3. Activate the "Align suboperation date..." tool

OBSERVED RESULT
One operation is not updates: suboperation has still unaligned date.

EXPECTED RESULT
All operations should be modified.

ADDITIONAL INFORMATION
The problem occurs on the last selected operation (in date, not in the selection).
I try again after open a special view with the non-aligned date operations , and this operation was updated correctly...
This operation has also 3 sub-operation, 2 non aligned and one with the correct date (the last one).

Suggestions:
- pb on account view only, on the last selected operation 
- pb because partially aligned
- pb because the last in date
...
Comment 1 Stephane MANKOWSKI 2024-01-17 20:40:42 UTC
Created attachment 164990 [details]
Sample file

Hi,

I tried to reproduce your issue on this sample file but with success.
Could you help me to reproduce it ?
Comment 2 Stephane MANKOWSKI 2024-01-17 20:41:25 UTC
I'm waiting your help to reproduce the issue.
Comment 3 vicnet 2024-01-17 21:41:42 UTC
I found: the dates of sub-operation stand in the future ! Or only one.
The operation is from the 01/01/2024 and sub-operation are:
- 01/09/2024
- 01/09/2024
- 01/12/2024

I copy this operation (my appointement with gov tax in sub-operation)  from month to month so there are always non aligned dates.
Some time, I re-align the date.

I pretty sure that I never enter 01/09/2024 but for this operation from the 1/1/24, I add one sub-operation, the last one. And I could enter a future date just entered the day and month ?!?

Remark; this op does'nt appear in non-aligned view too !
Comment 4 Stephane MANKOWSKI 2024-01-19 19:58:51 UTC
Hi Vicnet,

This is not a bug, this is a feature ;-) .

For example, when you pay your subscription for your favorite club of sport for one year, you could like to split this payment by month.
This is why, this is possible to have different dates on sub operation than on the operation.
You must know that if you change the date on an operation, the dates of suboperations will be modified by applying the same detla.
Example: If your operation is like this:
Date 01/12/2023 and sub-operation are:
- 01/12/2023
- 02/12/2023
- 03/12/2023

And if you change the date of the operation by 01/01/2024, the sub operations will be:
- 01/01/2024
- 02/01/2024
- 03/01/2024

So, this could explain why you have 01/09/2024 and you never entered it.

My advice: take care of the copied operation and its suboperations.

The check in "Advice" and corresponding "Align sub-operation date..." is ONLY for operation with only one suboperation.
Comment 5 vicnet 2024-01-20 12:03:15 UTC
Thank you for the explanation on the date modification in sub-operations. It is clearer.

> The check in "Advice" and corresponding "Align sub-operation date..." is ONLY for operation with only one suboperation.

Euh, strange remark or I don't understand.
Sub-operations are useful when a operation is composed with multiple bub-operations.
Otherwise it is the same (from user point of view) and it is a standard operation.

Nevertheless, this does not resolve the bug that if I apply the tool 'align subop' on any operation (even with future dates in sub(operation), it should do the job, or at least it should signal the pb in a warning (orange msg).
Comment 6 Stephane MANKOWSKI 2024-01-26 17:24:05 UTC
(In reply to vicnet from comment #5)
> Thank you for the explanation on the date modification in sub-operations. It
> is clearer.
> 
> > The check in "Advice" and corresponding "Align sub-operation date..." is ONLY for operation with only one suboperation.
> 
> Euh, strange remark or I don't understand.
> Sub-operations are useful when a operation is composed with multiple
> bub-operations.
> Otherwise it is the same (from user point of view) and it is a standard
> operation.
From a user point of view, you are right.
In skrooge and operation is a set of suboperation.
A standard operation has only one suboperation.
A split operation has more than one operations.
> 
> Nevertheless, this does not resolve the bug that if I apply the tool 'align
> subop' on any operation (even with future dates in sub(operation), it should
> do the job, or at least it should signal the pb in a warning (orange msg).

The tool "Align subop" is working only for standard operations because this doesn't make sens to have different date on operation and suboperation.
This tool doesn't work on split operation because misalignment is not a "bug", this is a feature.

But I can understand your remark and do this proposal:
- The advice is done only on standard operations to detect them because this doesn't make sens.
- Tool "Align subop" is done on detected standard operations when called from the advice.
- Tool "Align subop" is done on all selected operations (standard or spli) when called from a selection.

Do you validate this proposal ?
Comment 7 Stephane MANKOWSKI 2024-01-26 17:24:32 UTC
-
Comment 8 vicnet 2024-01-26 18:32:41 UTC
Perfect.
Thank you for this proposal.
Comment 9 Stephane MANKOWSKI 2024-01-26 22:35:47 UTC
OK. I will do it.