Project

General

Profile

Actions

Bug #85334

closed

Ext. filemetadata: missing workflow for field status

Added by Markus Dübbert about 6 years ago. Updated 19 days ago.

Status:
Resolved
Priority:
Could have
Assignee:
-
Category:
Documentation
Start date:
2018-06-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.2
Tags:
filemetadata, status field, mandatory field
Complexity:
Is Regression:
Sprint Focus:

Description

Is there a documentation for using the status field?
How to use this?
See attached screen.

Another question concerning filemetadata:

If i need a special field in filemetadata mandatory, how to realize this?
If i define this in tca like:

$GLOBALS['TCA']['sys_file_metadata']['columns']['copyright']['config']['eval'] = 'required';

the user can upload a file and reference it without filling out the mandatory field.
Only if he opens or edits file meta data, the mandatory validation or message works.


Files

filemetadata.jpg (81.9 KB) filemetadata.jpg Markus Dübbert, 2018-06-21 19:38
Actions #1

Updated by Frans Saris about 6 years ago

The status field is only a meta field that you can give your own meaning. It doesn't has any workflow or whatever connected.

It's (currently) not possible to set a field required before a file can be used. You can only set the require for the fields when the form is opened like you mentioned.

But this would be a great feature to have. Having the file picker only show files where all required metadata is filled. And some mark in the file list to easily find the files that have some metadata missing.

Actions #2

Updated by Susanne Moog almost 6 years ago

  • Target version changed from 8.7.19 to Candidate for patchlevel
Actions #3

Updated by Garvin Hicking 19 days ago

  • Status changed from New to Resolved

It's been some time ;)

I've now created a PR for the docs https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-CoreApi/pull/4524

The "status" field actually can also be used to indicate fetching metadata updates would be required, and can be put to custom workflows.

About required fields - the TYPO3 core uses a metadata reference as optional when being created. All metadata should be treated as "optional" also because other extensions may populate it automatically.

If you really want to enforce specific attributes on file uploads I would recommend to enhance the 'sys_file' database table with your own fields and TCA to mark the data in there as required fields. You might also be able to use new PSR-event hooks to react on missing data and revealing it with custom validation.

I will close this issue for now, if you feel this is a mistake or have additional feedback, please get in touch. You can also create a follow-up issue.

Actions

Also available in: Atom PDF