# Revert logic for entity.attribute['locale']['Tag Attribute'] to reflect deliverables coming from the Job that is currently running - https://ateliere.atlassian.net/browse/CD-11001
---
## Test plan
**Happy flows:**
Deliverable file properties (such as filename, locatorUrl or others) are referenced in metadata template (e.g. entity.attribute['locale']['tag_attribute'].locatorUrl)
***Note: Since `locatorUrl` should be unique, it can be a reliable property in order to validate if the correct files are being referenced in the metadata xml. Other properties can be used as well for tests, but they should be different from one deliverable to another, or between sources and deliverables, to make sure the right files are taken into consideration***
1. Title - Tag Attribute (media container, image) - populated -
Package template - File deliverables - input & deliverable tags added and are the same
Tagged source file available in title
--> deliverable files from the last job run (package) are referenced in xml
- [x] Char
- [x] Staging
2. Title - Tag Attribute (media container, image) - populated
Package template - File deliverables - input & deliverable tags added and are different
Tagged source file available in title
--> deliverable files from the last job run (package) are referenced in xml
- [x] Char
- [x] Staging
3. Title - Tag Attribute (media container, image) - populated
Package template - File deliverables - input & deliverable tags added and are the same
Tagged source file available in title
There are multiple deliverables having the same tag
--> deliverable files from the last job run (package) are referenced in xml
- [x] Char
- [x] Staging
4. Title - Tag Attribute (media container, image) - populated
Title - Tag Attribute - metadata type - populated
Package template - metadata deliverables - 1 general, 1 manifest (have also file deliverables) - the second metadata deliverable (manifest) should contain reference to first metadata deliverable (general)
--> manifest metadata is properly rendered
- [ ] Char
- [x] Staging
5. Package template with composition deliverable
- [ ] Char
- [x] Staging
6. Package template with timed text/thumbnail deliverables
- [ ] Char
- [x] Staging
7. {{entity.parent.attributes['global']['tag_attribute'].filename}} in metadata template
tag_attribute is available and populated on parent title
Package template - input & deliverable tags added
--> empty string
- [x] Char
- [x] Staging
**Validations/other checks:**
1. Title - Tag Attribute (media container or image) - Required & populated
Package template - File deliverables - no deliverable tag
Attribute available in template
--> invalid job with error (add error message here)
- [x] Char
- [x] Staging
2. Title - Tag Attribute (media container or image) - Not Required & populated
Package template - File deliverables - no deliverable tag
Tagged source file available in title
Attribute available in template
--> valid job with warning, xml empty
- [x] Char
- [x] Staging
3. Title - Tag Attribute (media container or image) - Required & empty
Package template - File deliverables - no deliverable tag
Tagged source file available in title
Attribute available in template
--> invalid job with error (add error message here)
- [x] Char
- [x] Staging
4. Title - Tag Attribute (media container or image) - Required & empty
Package template - File deliverables - no input & deliverable tags
There is no source file tagged with the required input tag (try also having only deliverable files tagged with required input tag in package template)
Attribute available in template
--> invalid job with error (the job is invalid if there is no source with the required tag)
- [x] Char
- [x] Staging