Indicate whether an attachment is active or has been removed
- Dominant language
- Clojure
- Stars
- 66
- Forks
- 28
- Avg merge
- 7d 4h
- Merged PRs (30d)
- 2
Description
**Is your feature request related to a problem? Please describe.**
When reading applications from `GET /api/applications/{id}` all attachments added to the application can be seen in `{"application/attachments": []}`.
When an application is returned to the applicant, if the applicant removes an attachment and submits the application again, the attachment is removed from the form field, but it is still in the attachments list.
**Describe the solution you'd like**
It would be useful if the attachment list would indicate whether an attachment is still active on the form or if it has been removed, so that it doesn't have to be parsed from the events or the form fields.
e.g.
```
"application/attachments": [
{
"attachment/id": 1,
"attachment/filename": "liite.txt",
"attachment/type": "text/plain",
"attachment/user": {
"userid": "user",
"name": "User Name",
"email": null,
"notification-email": "user.name@email.org"
},
"attachment/can-redact": false,
"active": false # <-- new field
},
```
Doesn't have to be exactly this, can be any way to tell if an attachment has been removed, e.g. `active: false`, `removed: true`.
**Describe alternatives you've considered**
Current alternative for me is to take the attachment id and parse the form fields to see if the attachment id is found from an attachment field.
**Additional context**
Contributor guide
Assessment
This issue has not been assessed yet.