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

[FAU-434] Include campo keys from all related terms to degree program data #17

Merged
merged 4 commits into from
Sep 4, 2024

Conversation

zhyian
Copy link
Collaborator

@zhyian zhyian commented Sep 4, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature

What is the current behavior? (You can also link to an open issue here)
https://inpsyde.atlassian.net/browse/FAU-434

  1. If a degree program has multiple terms with different campo keys, we only pass the keys from the last term(code).

  2. if the specified campo keys don't match any terms, the tax_query is omitted entirely, causing the query to return all posts, which is unintended.

What is the new behavior (if this is a feature change)?

  1. All related term campo keys are now included in the degree program data.
  2. Instead of omitting the tax_query, we now pass 0 as required term ID, which ensures no posts are returned, as there is no term with ID 0.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No

Other information:
RRZE-Webteam/FAU-Studium-Embed#42

Copy link
Collaborator

@tyrann0us tyrann0us left a comment

Choose a reason for hiding this comment

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

Thank you for working on this! Code-wise LGTM. 💪🏽
Please forgive the silly question, but since we change the schema, does this require migration of existing data?

@zhyian
Copy link
Collaborator Author

zhyian commented Sep 4, 2024

Thanks for the question. I believe all that we need it's just to invalidate cache on the providing website.

@amiut
Copy link
Collaborator

amiut commented Sep 4, 2024

I think we need to update again the changes made in this PR RRZE-Webteam/FAU-Studium#144, now that the campo keys format is updated, right?

src/Domain/CampoKeys.php Outdated Show resolved Hide resolved
@shvlv shvlv changed the base branch from dev to main September 4, 2024 10:23
Copy link
Collaborator

@amiut amiut left a comment

Choose a reason for hiding this comment

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

LGTM, thanks a lot

Copy link
Collaborator

@shvlv shvlv left a comment

Choose a reason for hiding this comment

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

Thanks!

@zhyian zhyian merged commit 2314da1 into main Sep 4, 2024
8 checks passed
@zhyian zhyian deleted the FAU-434 branch September 4, 2024 13:20
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.

4 participants