Tracker plugins configured to run in a program stage do not run when you configure your program to do “First stage appears in registration page”, meaning the program stage form is configured to show together with the enrollment page in the same form (typical scenario when your PS is a visit and you want the user to collect data on the first visit right after the enrollment). This happens in 2.41 and 2.42 so I think it was just a scenario that was never considered.
Hey @msilva - thanks for reporting this! You’re probably right, this was not part of the original implementation. I’ve created a ticket here, so feel free to add any further info or subscribe to see updates. I’m not working day-to-day on the tracker team, so it will be up to @Ameen & @Joakim to prioritise.
Regarding your use case here; I think it will be a fairly simple implementation if we assume that the plugin only needs access to the event data and metadata. If it also needs to read data from the enrollment, which is a fair use case as well, this will probably be a bit more difficult. Any thoughts on what you would need in this case?
Hi! Thanks for your prompt answer. My use case is not so much to be able to use enrollment and event variables. I understand how this can complicate things. My plugin is working only in the program stage context so the issue is way simpler: it works when I enter data for an event but when entering data for the first event after enrollment is done, the plugin does not show.
Also, another issue I found is that once you add a plugin to your program stage, any changes to the sections (adding a new section, removing or adding DEs to a section, etc…) are not reflected in Capture. Once a plugin is used in a program stage, its appearance and layout is locked, regardless what modifications you do in the maintenance app. The solution is to remove the plugin, change the program stage, and then recreate the plugin using the Tracker configurator.
The Jira ticket you shared talks about cloning metadata.
I can create a Jira for this, of course. The issue can be summarised: once a plugin is added to a program stage, any changes to the metadata of this PS (adding/removing DEs from section, creating a new section, etc…) are not reflected in Capture App. The plugin needs to be removed, changes done, then plugin can be added again.
Thank you for the feedback @msilva - will bring your thoughts into the discussion.
Regarding the second issue; yes, this is a known limitation of the current setup. The problem is that the metadata of the program is stored in the database, whilst the plugin / form configuration is stored in the datastore. If the underlying metadata change (sections, fields etc.), there is no way for the datastore to know about this. The only alternative is to open the plugin configurator app and manually update. The long term plan for plugins was to bring everything into the database, and for the data store to be a temporary solution. I created the plugin configurator app to make this process easier for the user whilst waiting for this to be brought into the data model, but it obviously has its limitations
Short term solution would be to add a warning to maintenance / capture app - long term would be to bring it into the database.
cc; @Karoline@Ameen@Stian
I totally understand. The top priority is to make the functionality accessible to users. Developing the Admin side of things always take more resources, so it makes sense to simplify the config storage for the sake of delivering a useful features to users. I think you did a great job and the capture plugins are awesome so keep it up and we will wait for the improvements whenever you and the team gets a chance to work on it.