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

Handle erroneously configured TreeView DynamicFields. #1531

Closed
svenoe opened this issue Jan 6, 2022 · 2 comments
Closed

Handle erroneously configured TreeView DynamicFields. #1531

svenoe opened this issue Jan 6, 2022 · 2 comments
Assignees
Labels
bug Something isn't working as intended enhancement New feature or request
Milestone

Comments

@svenoe
Copy link
Contributor

svenoe commented Jan 6, 2022

Select Fields in TreeView do not work if sub categories are set without the base category being present.
(E.g. plant::tree and plant::bush being used without plant being used. This is not always the case - see ov71 for an example.)

The nicest way to handle this, would probably be to add the node dynamically but disable its selection. Else at least a useful error message should appear somewhere.

@svenoe svenoe added bug Something isn't working as intended enhancement New feature or request labels Jan 6, 2022
@svenoe svenoe added this to the OTOBO 10.0 milestone Jan 6, 2022
@stefanhaerter
Copy link
Contributor

Besides the changes I already made, it seems to be necessary to alter the code in https://github.com/RotherOSS/otobo/blob/rel-10_1/Kernel/Output/HTML/Layout.pm#L5938 in the following way:

$Row->{Key} = '-'; to $Row->{Key} = substr $Row->{Key}, 0, (length($Row->{Key}) - length('_Disabled'));

because in Core.UI.TreeSelection.js the options are sorted alphabetically and the Key '-' causes the items to be displayed wrongly, as far as I see. However, I'm not entirely sure if the Key currently used is needed in any other place.

@stefanhaerter
Copy link
Contributor

Closed with merging #2529

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as intended enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants