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

Relationship Field Sync Taxonomy: Checkbox & Unblock Sync #7336

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

pdclark
Copy link
Collaborator

@pdclark pdclark commented Aug 15, 2024

Description

  • Change taxonomy sync option from text to boolean.
  • Change bidirectional relationship check from preventing taxonomy sync feature from running due to early return

Related GitHub issue(s)

#7334

Changelog text for these changes

Bug: Relationship Field Taxonomy Sync now works correctly and presents as checkbox. User Interface for taxonomies using this feature should be hidden in taxonomy Admin UI settings to avoid confusion, as changes relationship field will update core taxonomy, but core taxonomy user interfaces will not update relationship field. @pdclark

PR checklist

pods-framework#7334

Signed-off-by: Paul Clark <pdclark@pdclark.com>
Copy link

what-the-diff bot commented Aug 15, 2024

PR Summary

  • Enriched the 'pick' Class
    A new 'type' attribute was added to the 'pick' class that categorizes it as 'boolean'. This means it will now accommodate only true or false values.

  • Added Default Value Handling
    A 'default' attribute was introduced into the 'pick' class which now defaults to '0'. Wherever there's no provided value for 'type', it will now default to '0'.

  • Enhanced Conditional Logic in 'if' Statement
    The logic inside an existing 'if' statement has been refined. Now, it has an additional check for whether certain options within the class are empty or not.

  • Code Re-arrangement for Efficiency
    Some pieces of code have been relocated within a conditional block. This likely ensures that these code pieces are only executed when necessary, increasing efficiency.

@pdclark
Copy link
Collaborator Author

pdclark commented Aug 16, 2024

@sc0ttkclark The change might have unexpected behavior for odd combinations of bidirectional fields AND taxonomy sync. Something to look at before editing further or committing the change. Perhaps would be easier to verify if the taxonomy sync and bidirectional sync logic were split into two new methods with necessary sanity checks at the start of each method.

@@ -449,6 +449,8 @@ public function options() {
'^taxonomy-.*$',
],
],
'type' => 'boolean',
Copy link
Member

Choose a reason for hiding this comment

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

🎉

sc0ttkclark
sc0ttkclark previously approved these changes Aug 28, 2024
@sc0ttkclark
Copy link
Member

More tweaks coming post merge

@sc0ttkclark sc0ttkclark changed the base branch from main to release/3.2.7 August 28, 2024 19:20
@sc0ttkclark sc0ttkclark dismissed their stale review August 28, 2024 19:20

The base branch was changed.

@sc0ttkclark sc0ttkclark merged commit 8b2b87c into pods-framework:release/3.2.7 Aug 28, 2024
11 of 13 checks passed
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.

2 participants