Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement]: Classification Store and double (useless) "Title? #16936

Open
ITspirit opened this issue Apr 16, 2024 · 1 comment
Open

[Improvement]: Classification Store and double (useless) "Title? #16936

ITspirit opened this issue Apr 16, 2024 · 1 comment

Comments

@ITspirit
Copy link
Contributor

Improvement description

In Classification Store we have a "Title" Column for the Keys:

image

This can be set (so my assumption) by

$keyConfig = new \Pimcore\Model\DataObject\Classificationstore\KeyConfig();
$keyConfig->setTitle($title);

But, it doesn´t work that way. There is used(shown) the Title from the Field Definition:
image

If you change it on GUI from Table View - the Field Definition open.

If you change it via PHP API - it didn´t work in both ways.

You have to adjust manual the "Definition" instead of the "Title":

                    $keyConfig = \Pimcore\Model\DataObject\Classificationstore\KeyConfig::getById($keyId());
                    if ($keyConfig !== null) {
                        $definition = json_decode($keyConfig->getDefinition());
                        if (property_exists($definition,'title')) {
                            $definition->title = $title;
                            $keyConfig->setDefinition(json_encode($definition));
                        }
                        $keyConfig->save();
                    }

I would expect that php $keyConfig->setTitle($title); would do the same, but it doesn´t.

It leads to a missundertanding too, because - in GUI it looks "flipped":

image

As "HTML-Title" the "Name" appear.

And - furthermore and last but not least - the "Title" isn´t possible to fetch via GraphQL, only the "Name". Which shows that there must be something not finally thought till the end.

Not sure what the Solution could be. My suggestions:

  • "->setTitle()" update the Definition too
  • Genereal Option as Config if "Title" or "Name" should be shown as "Label"
  • support "title" in GraphQL for ClassificationStore KeyConfigs
Copy link

github-actions bot commented May 7, 2024

Thanks a lot for reporting the issue. We did not consider the issue as "Pimcore:Priority", "Pimcore:ToDo" or "Pimcore:Backlog", so we're not going to work on that anytime soon. Please create a pull request to fix the issue if this is a bug report. We'll then review it as quickly as possible. If you're interested in contributing a feature, please contact us first here before creating a pull request. We'll then decide whether we'd accept it or not. Thanks for your understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant