Problem/Motivation
The field labels "Declared date", "Start date" and "End date" are confusing on cancellations.
This is especially obvious with "End date", where it's the date the cancellation ends not the date the collecting of Gift Aid ends. Yes, the description clarifies, but labels matter more.
Proposed resolution
Let's use different field labels. Perhaps:
Declared date => Cancellation notified
Start date => Cancelled from
End date => Cancelled until
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork gift_aid-3568005
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
jonathanshawA related issue is that RecordInterface documents the methods in a way that is right for declarations. But the method names and descriptions are inaccurate/confusing for cancellations.
I think probably RecordInterface and RecordBase should be smaller, and more of this needs moving into DeclarationInterface and CancellationInterface.
If we need a single method that's used by both declaration and cancellation, let's give it a suitable name. So we could have
getReceivedDate() on RecordInterface and RecordBase
getDeclaredDate on DeclarationInterface and DeclarationBase
both wrapping the declared_date field.
Or maybe what this is really pointing to is that the field name itself should change. Ouch.
Comment #3
adamps commentedWe already have the required mechanism in place:
Cancellation::baseFieldDefinitions()makes the necessary corrections. You are asking for some extra cases which will be easy.Regarding #2, you use a plural method names, however I don't see any other problem cases beyond the specific example that you gave. I prefer a simple solution: we choose a verb that applies in both cases. Personally speaking I'm less bothered by the idea that someone would declare a cancellation - it does at least make sense grammatically - however I can see some potential for confusion, so I'm happy to change it. You used "notified" in the IS and "received" in #2; I slightly prefer the latter, however up to you. So we can have field
received_date, functiongetReceivedDate(), label "Received date", description "The date the XXX was received from the donor".How does that sound?
We also need to fix some comments on RecordInterface that refer to declarations.
Comment #4
jonathanshawSounds good, and I agree that received is better than notified. received_date, getReceivedDate() all make sense.
Beyond that I agree that any slight eccentricity of naming is much less of an issue in the API than it is in the UI, so we can mostly be happy with tweaking the UI names.
Comment #5
jonathanshawComment #7
adamps commentedThanks