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

Add descriptionFrom support for nested properties #1128

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

AIC-BV
Copy link
Contributor

@AIC-BV AIC-BV commented May 16, 2024

Adds support for JSON columns
descriptionFrom: name
descriptionFrom: json.name
descriptionFrom: json[name]

Adds support for JSON columns
descriptionFrom: name
descriptionFrom: json.name
descriptionFrom: json[name]
@LukeTowers
Copy link
Member

@AIC-BV could you add a unit test for this?

@AIC-BV
Copy link
Contributor Author

AIC-BV commented Sep 19, 2024

I don't know how to do this 😬

$this->descriptionFrom = str_replace(['[', ']'], ['.', ''], $this->descriptionFrom);
}

return data_get($this->relationModel, $this->descriptionFrom);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaxwilko @bennothommo any thoughts on assigning the modified value back to the local property instead of using a scoped variable at this point? I'm slightly concerned that this current approach causes getDescriptionValue() to have a secondary effect of modifying the value of $this->descriptionFrom in some cases.

@bennothommo bennothommo added maintenance PRs that fix bugs, are translation changes or make only minor changes needs test case Issues/PRs that need a test case to be implemented labels Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance PRs that fix bugs, are translation changes or make only minor changes needs test case Issues/PRs that need a test case to be implemented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants