Project

General

Profile

Actions

Anomalie #1762

closed

Contribution start date overload

Added by Johan Cwiklinski 10 months ago. Updated 9 months ago.

Status:
Fermé
Priority:
Normal
Category:
Core
Target version:
Start date:
12/22/2023
Due date:
% Done:

100%

Estimated time:
Version utilisée:

Description

On 9.5.0, if a contribution finishes on 2023-12-22, a new one can begin on the same date. On 1.0.0, it must begin the day after.

I'm not sure that was not somehow expected; but that indeed move begin date forward in time.


Related issues 1 (0 open1 closed)

Related to Galette - Anomalie #1016: Cotisation par duréeFermé02/22/2017

Actions
Actions #1

Updated by Guillaume AGNIERAY 10 months ago

Actions #2

Updated by Guillaume AGNIERAY 10 months ago

  • Status changed from Nouveau to Commentaire

I think it is related to #1016, and I supposed at that time that existing data should be updated (#1016#note-2).

Actions #3

Updated by Johan Cwiklinski 10 months ago

Guillaume AGNIERAY a écrit (#note-2):

I think it is related to #1016, and I supposed at that time that existing data should be updated (#1016#note-2).

I have to admit I did not pay attention this change was requiring a database change...
And to be honest, I'm not sure it can be done safely; there are too many variables to take care of; I'm not OK to make changes in data if we're not 200% sure that won't have side effects.

I'll dig into that when I'll have time.

Actions #4

Updated by Johan Cwiklinski 9 months ago

I've added a test on next year contribution start date:
https://github.com/galette/galette/pull/394

To me, all is indeed currently OK from a code point of view. As said, I'm against a database migration that changes past end dates; this may cause many issues, and we cannot be 100% sure we're not changing new data; or expected manually entered dates.

Since the issue will only be present once, all will be OK expect for year of 1.0.0 update; therefore I'll close this one.

Actions #5

Updated by Johan Cwiklinski 9 months ago

  • Status changed from Commentaire to Nouveau

Johan Cwiklinski a écrit (#note-4):

Since the issue will only be present once, all will be OK expect for year of 1.0.0 update; therefore I'll close this one.

In fact my test is only OK if contribution has been created with 1.0.0... Otherwise, all will be +1D, and user cannot change that :(

#1016 has more impact that I've evaluated when accepting the change (that's also why I did not made this change myself). Current issue will certainly have a higher impact _

I currently do not see any good solution. Since updating database is not an option, I only see 2 possibilities right now:
- revert #1016. That will impact contributions created with 1.0.0; but with a begin date 1D user can change creating new contribution.
make overlap checking working with that specific case - but I'm afraid this will be a nightmare (and also not entirely sure how to detect this case).

Actions #6

Updated by Johan Cwiklinski 9 months ago

  • Status changed from Nouveau to In Progress
  • % Done changed from 0 to 100

Johan Cwiklinski a écrit (#note-5):

- make overlap checking working with that specific case - but I'm afraid this will be a nightmare (and also not entirely sure how to detect this case).

I've been able to add a failing test with a manually created contribution that should have been created on 0.9 or previous versions; and I've a fix proposal; see:
https://github.com/galette/galette/pull/394

I check if begin and end date of the found previous contribution have the same day and month, and I also check if found end date is the very same as new begin date. This should prevent expected overriding errors to appear (at least, we should always have only one day more).
I would have prefered to propose something temporary we can drop in a next release; but I've not been able to found a solution of that kind.

Actions #7

Updated by Johan Cwiklinski 9 months ago

  • Status changed from In Progress to Résolu
Actions #8

Updated by Johan Cwiklinski 9 months ago

  • Status changed from Résolu to Fermé
Actions

Also available in: Atom PDF