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

Command icon 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

jonathanshaw created an issue. See original summary.

jonathanshaw’s picture

A 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.

adamps’s picture

Assigned: Unassigned » jonathanshaw
Status: Active » Needs review

We 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, function getReceivedDate(), 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.

jonathanshaw’s picture

Sounds 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.

jonathanshaw’s picture

Assigned: jonathanshaw » adamps
Status: Needs review » Needs work

adamps’s picture

Assigned: adamps » Unassigned
Status: Needs work » Fixed

Thanks

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • adamps committed b3d9c33c on 1.x
    Bug: #3568005 Cancellation field names are confusing
    
    By: jonathanshaw...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.