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

Fix dynamic field set value rendering #2814

Closed
stefanhaerter opened this issue Jan 11, 2024 · 7 comments
Closed

Fix dynamic field set value rendering #2814

stefanhaerter opened this issue Jan 11, 2024 · 7 comments
Assignees
Labels
bug Something isn't working as intended
Milestone

Comments

@stefanhaerter
Copy link
Contributor

There are a few known bugs when rendering a dynamic field set with stored values.

Also, using a dynamic field which is based on BasedEntity in a set causes problems.

@stefanhaerter stefanhaerter added the bug Something isn't working as intended label Jan 11, 2024
@stefanhaerter stefanhaerter added this to the OTOBO 11.0 milestone Jan 11, 2024
@stefanhaerter stefanhaerter self-assigned this Jan 11, 2024
stefanhaerter added a commit that referenced this issue Jan 11, 2024
…sing it to correctly retrieve BaseEntity values when used in set fields.
stefanhaerter added a commit that referenced this issue Jan 11, 2024
stefanhaerter added a commit that referenced this issue Jan 11, 2024
…sing it to correctly retrieve BaseEntity values when used in set fields.
stefanhaerter added a commit that referenced this issue Jan 11, 2024
stefanhaerter added a commit that referenced this issue Jan 11, 2024
stefanhaerter added a commit that referenced this issue Jan 12, 2024
…sing it to correctly retrieve BaseEntity values when used in set fields.
stefanhaerter added a commit that referenced this issue Jan 12, 2024
stefanhaerter added a commit that referenced this issue Jan 12, 2024
svenoe pushed a commit that referenced this issue Jan 15, 2024
@stefanhaerter
Copy link
Contributor Author

Closed with 4030748 and fea5c67

@bschmalhofer
Copy link
Contributor

bschmalhofer commented Jan 20, 2024

Reopening because there is a test failure in scripts/test/DynamicField/ValueSetGet.t which might be related to this issue. Specifically 4030748 .The case in question is the SetOfAgentsAndTexts, test number 85, test case. My hunch is that the test script needs to be updated.

@bschmalhofer bschmalhofer reopened this Jan 20, 2024
@stefanhaerter
Copy link
Contributor Author

I'll have a look on monday - thank you for testing =)

@stefanhaerter
Copy link
Contributor Author

I just encountered the test failure myself and this certainly has something to do with changed behavior of one of the field drivers:

bin/otobo.Console.pl Dev::UnitTest::Run --test ValueSetGet
[13:52:20] /opt/otobo/scripts/test/DynamicField/ValueSetGet.t .. # RandomID is test7946602794100002
[13:52:20] /opt/otobo/scripts/test/DynamicField/ValueSetGet.t .. 36/? 
# Failed test 'SetOfAgentsAndTexts'
# at /opt/otobo/scripts/test/DynamicField/ValueSetGet.t line 1223.
# Caught exception in subtest: Can't use string ("3") as an ARRAY ref while "strict refs" in use at /opt/otobo/Kernel/System/DynamicField/Driver/BaseEntity.pm line 129.
# Seeded srand with seed '20240122' from local date.
[13:52:20] /opt/otobo/scripts/test/DynamicField/ValueSetGet.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/101 subtests

At line 129 in Kernel/System/DynamicField/Driver/BaseEntity.pm is a special behavior for single-value entity fields in sets, which I had to include. Most likely, this needs to be adapted again.

@stefanhaerter
Copy link
Contributor Author

I was wrong - unit test needed indeed to be adapted.

@stefanhaerter
Copy link
Contributor Author

@bschmalhofer PR with fix is merged - can you run the tests again to verify that the fix is correct?

@bschmalhofer
Copy link
Contributor

The failure in ValueSetGet.t is gone now. Closing this issue again.

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
Projects
None yet
Development

No branches or pull requests

2 participants