-
Notifications
You must be signed in to change notification settings - Fork 438
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
The linkName in the @link
decorator doesn't assign the value on the correct property
#2819
Comments
@alexandrevryghem I'm unable to replicate the issue you're experiencing, or perhaps I'm misunderstanding your point. When I utilize the following code:
The Could you please provide more details or guide me to where I should be looking to reproduce the issue? |
@pcg-kk: I created bb13004 with proof of how it doesn't work with some logs. This time I tried renaming the |
Describe the bug
When you have an
@link
with alinkName
that differs from the property to which you added the decorator, the embedded data will not be linked to that property, but instead, it will be linked to a new property with the name defined inlinkName
.To Reproduce
Steps to reproduce the behavior:
item.model.ts
class, rename theaccessStatus
property to, for exampleaccessStatusValue
, and update the@link
to@link(ACCESS_STATUS, false, 'accessStatus')
.accessStatus
inAccessStatusBadgeComponent
, addaccessStatus
to the list ofBROWSE_LINKS_TO_FOLLOW
, and add a pipe with atake
and aconsole.log
to log the page of items inBrowseService#getBrowseItemsFor
./browse/dateissued
page and check your console. You will see that the value is not set on theaccessStatusValue
property, but onaccessStatus
.Expected behavior
The embedded data should be saved on the property to which you added the
@link
decorator.Related work
I discovered this bug during #2480. After implementing this fix, it will be important to check that these changes still work as expected. The current implementation now only checks if the property with the
linkName
has a value, but when this is fixed, this should be updated. Otherwise, somefollowLinks
will never be automatically invalidated when their parent is invalidated.The text was updated successfully, but these errors were encountered: