Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add managed entities for "automation" and "configure_xcm" navigation menu items #104

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

jensschuppe
Copy link
Collaborator

The menu item with the link to the XCM configuration form is inside a sub-menu called Automation which is being used by other extensions as well (e. g. systopia/de.systopia.sqltasks, systopia/hiorg), the latter of which uses Managed Entities for adding the menu item, trying to match existing entries by name and parent_id, which apparently does not work in tandem with the old-style hook implementations via hook_civicrm_navigationMenu(). Currently, this results in each definition of the automation menu item creating a new one, duplicating it in the menu.

Defining all of those through Managed Entities seems to resolve this issue.

I'm thus adding the configuration menu item and its parent Automation menu item as managed entities, removing their definition from the hook implementation.

@jensschuppe jensschuppe added enhancement status:needs review Code needs review and testing labels Jul 28, 2023
@jensschuppe jensschuppe added this to the 1.11 milestone Jul 28, 2023
@jensschuppe jensschuppe force-pushed the navigationManagedEntities branch 2 times, most recently from a37b292 to 7ed059d Compare July 28, 2023 12:25
@jensschuppe
Copy link
Collaborator Author

jensschuppe commented Jul 28, 2023

This doesn't seem to work correctly. Every definition of the Automation menu item causes a new one and previously added sub-items seem to vanish 😞 I think I'll have to do some more testing.

Seems that multiple Managed entities may not reference the same entity.

@jensschuppe jensschuppe force-pushed the navigationManagedEntities branch from 7ed059d to 5248c70 Compare July 31, 2023 13:17
@jensschuppe jensschuppe added status:reviewed and tested Code has received thorough review and test and is ready to be committed/merged and removed status:needs review Code needs review and testing labels Jul 31, 2023
@jensschuppe jensschuppe merged commit c3b90c4 into master Sep 11, 2023
@jensschuppe jensschuppe added status:fixed The issue has been resolved (usually by committing/merging code) and removed status:reviewed and tested Code has received thorough review and test and is ready to be committed/merged labels Sep 11, 2023
@jensschuppe jensschuppe deleted the navigationManagedEntities branch September 21, 2023 08:38
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement status:fixed The issue has been resolved (usually by committing/merging code)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants