Problem/Motivation

Our evidence types are a little tricky to get right. Unfortunately IEF only shows the bundle name when the user chooses which one, not the description, so a lot rides on the name.

Currently we have Image, Document and Recording, soon to add Email.

I think Email and Recording are fine, staff would understand what they mean, they're unambiguous.

Document (accepts pdf only) and Image (any image file) are trickier. In most people's mind a document means a piece of paper. Digitised that could be an image file or a pdf.

Image needs to be a seperate field and so probably a seperate bundle, because core has good image formatters but no good pdf previewers etc.

Proposed resolution

Keep Image as is.
Rename the 'Document' evidence type to 'file' and label it 'Other file'. Be promiscuous about what we allow to upload there: pdf, doc, eml, txt, anything else you can think of.

Then we will have:
Email
Image
Other file
Recording

The alphabetical sort order is unfortunate, but not disastrous. Reordering isn't trivial, it would require either (a) our bundles to have a weight, and #3568030: Use ConfigEntityBase::sort() to sort bundles selection choice be fixed, or (b) a quick-n-dirty IEF form alter.

Remaining tasks

Decide on the right approach. I'm not convinced by what I'm saying here and welcome thoughts.

User interface changes

API changes

Data model changes

Issue fork gift_aid-3568031

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.

adamps’s picture

Assigned: Unassigned » jonathanshaw
Status: Active » Needs review

Be promiscuous about what we allow to upload there: pdf, doc, eml, txt, anything else you can think of.

If it were my site, I wouldn't do that. 'doc' probably represents some Microsoft format: there are several variants; it's not openable on all devices and it can contain viruses. 'eml' seems confusing if we also have an email bundle.

Changing the default evidence types is time-consuming because it involves making GUI changes, finding all the affected config entries, serialising them to files, cutting out the parts that aren't wanted then commiting. In the end the bundles are only a default, and anyone can change or delete it on their site. Changing the field name will be disruptive. Changing the label or description is cheap.

I could set the label to "PDF Document" of "PDF file"??

For efficiency, let's combine the MR into #3568019: Add an email declaration & evidence type

adamps’s picture

PS Changing the field name here is substantially easier than #3568019: Add an email declaration & evidence type, in case allowing eml files here would cover the need for email support.

Allowing txt files here seems less useful as normally I would expect a text field would be a better option.

jonathanshaw’s picture

Can we change the evidence type label and machine name from Document / document to PDF file / pdf ?
If we could do that as a search and replace it'd seem worthwhile.

jonathanshaw’s picture

I think the challenges of previewing different files, and the advantages of giving clear options to staff, make it best to not combine this with email.

jonathanshaw’s picture

I keep going round and round on this! Hold off until I settle down :)

jonathanshaw’s picture

Let's do #4

jonathanshaw’s picture

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

adamps’s picture

Status: Needs work » Fixed

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 afe1d600 on 1.x
    Task: #3568031 Modify 'Document' evidence type
    

Status: Fixed » Closed (fixed)

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