Problem/Motivation

This module is incorrectly using a YAML anchor for config schema instead of reusable types, which means other modules cannot opt-in to scheduling easily.

# Use the saved alias to repeat the schema for Media entity type.
media.type.*.third_party.scheduler: *third_party_settings_alias

# Repeat the schema for Commerce Product entity type.
commerce_product.commerce_product_type.*.third_party.scheduler: *third_party_settings_alias

# Repeat the schema for Taxonomy Terms
taxonomy.vocabulary.*.third_party.scheduler: *third_party_settings_alias

This should be type: scheduler_third_party_settings

Steps to reproduce

see https://git.drupalcode.org/project/ai_context/-/blob/e1a359c3a525de75c4d...

to support a new entity type, the schema has to be copied which will lead to bugs

Proposed resolution

Setup a proper type so it's reusable

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork scheduler-3585333

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

mglaman created an issue. See original summary.

mglaman’s picture

Status: Active » Needs review
kristen pol’s picture

Thanks, Matt. This would make this easier:

#3577429: Move scheduler feature to submodule or progressive enhancement

To be clear, no upgrade path is required because all the original config still remains, so this only adds additional support.

kristen pol’s picture

Matt, did you mean to link to the schema file under "steps to reproduce"?

I wouldn't consider that steps to reproduce ;)

We should have something more detailed and step-by-step.

mglaman’s picture

Issue summary: View changes

I did, to show the problem. That ai_context has to copy it verbatim which is a bug

kristen pol’s picture

Thanks for adding the clarifying text

jonathan1055 made their first commit to this issue’s fork.

jonathan1055’s picture

This looks helpful, thank you. I think I made those original anchors without knowing too much about yaml syntax. You solution is much better.

I've just re-based the MR, and can merge this soon if it will help with your work on #3355087: Support for non-bundle entity types

mglaman’s picture

Thanks! I think it'll help there since I duplicated it, I believe. Mobile so haven't double checked. This way it's a nice succinct fix outside of that issue

mglaman’s picture

Back on computer; yes, this will help out over there!

jonathan1055’s picture

Status: Needs review » Reviewed & tested by the community

Tested locally and works fine. Also I think each of these settings is covered by one or other of the phpunit tests, and they all pass green. RTBC and I have set a Merge Train running.

mglaman’s picture

Status: Reviewed & tested by the community » Fixed

The commit is in! Thank you

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.

jonathan1055’s picture

and thank you too. I've just updated the credit record.

Status: Fixed » Closed (fixed)

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