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

Enable updateDescription to override the Description #345

Closed

Conversation

ishannz
Copy link

@ishannz ishannz commented Nov 6, 2024

Description

We are upgrading from version 3 to 4.0.7, and we have a custom field called "Description" under the Link dataobject.
After the upgrade to version 4.0.7, the Description field does not return the correct value.

This fix will allow users to override the Description value if needed.

Please make sure to support CMS version 5.2 by creating the right tag.

Manual testing steps

Issues

Pull request checklist

  • The target branch is correct
  • All commits are relevant to the purpose of the PR (e.g. no debug statements, unrelated refactoring, or arbitrary linting)
    • Small amounts of additional linting are usually okay, but if it makes it hard to concentrate on the relevant changes, ask for the unrelated changes to be reverted, and submitted as a separate PR.
  • The commit messages follow our commit message guidelines
  • The PR follows our contribution guidelines
  • Code changes follow our coding conventions
  • This change is covered with tests (or tests aren't necessary for this change)
  • Any relevant User Help/Developer documentation is updated; for impactful changes, information is added to the changelog for the intended release
  • CI is green

Copy link
Contributor

@michalkleiner michalkleiner left a comment

Choose a reason for hiding this comment

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

This makes sense from my perspective ✅

@GuySartorelli
Copy link
Member

Please create an issue and link to it, and include any manual testing steps, and tick all the boxes that apply in the PR description. If you're unsure about any of the boxes after reading the linked documentation, please ask.

we have a custom field called "Description" under the Link dataobject

What is the purpose of that field? And what is the intended use case for updating the description which gets returned by getDescription()?

@GuySartorelli
Copy link
Member

Please make sure to support CMS version 5.2 by creating the right tag.

New extension hooks are typically added in minor releases, not in patch releases.

@ishannz
Copy link
Author

ishannz commented Nov 14, 2024

What is the purpose of that field? And what is the intended use case for updating the description which gets returned by getDescription()?

It's a custom field in the project used for link description, which was an existing field before the upgrade.

@GuySartorelli
Copy link
Member

Right, so what does the extension hook do for you? You shouldn't use it to return your pre-existing field value because getDescription is used for a specific purpose in the link field.

@GuySartorelli
Copy link
Member

It sounds like for the current major release line you will probably need to rename your field, and perhaps open an issue to change the name of getDescription to something less generic in a future major release.

@ishannz
Copy link
Author

ishannz commented Nov 14, 2024

I changed the name to LinkDescription and migrated the data.

@GuySartorelli
Copy link
Member

Sounds like you don't need this change anymore, so I'm going to close it.
Feel free to open an issue about changing getDescription to something more generic in CMS 6.

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

Successfully merging this pull request may close these issues.

3 participants