Page MenuHomePhabricator

Re-implement tracking tools logic
Closed, ResolvedPublic3 Estimated Story Points

Description

NOTE: This ticket makes it possible to deal with dashboards within the application. Once this work is complete, we can implement UI support for the organizer specifying the dashboard instance when enabling registration.

Once the schema from T316409 is in place, we would create the following:

  • A TrackingTool interface (we may create more base interfaces in the future)
  • A class for each tracking tool type (e.g., P&E dashboard); these classes would implement the TrackingTool interface. These classes would have platform-specific knowledge, e.g., how to build a dashboard URL starting from a base URL and a dashboard identifier.
  • A factory/registry that:
    • Has a constant with the following structure:
[
  tracking_tool_unique_id_integer => [
    'name' => display_name_of_the_tool,
    'base_url' => base_url_of_dashboards
  ],
  ...
]

note that we may need to add more information (e.g., base URL of the API endpoint). Also, the constant could be moved to config in the future, letting sysadmins add more tools.

    • Can map a database record (in particular the tracking tool ID) to an element in the map described above
    • Can consequently determine which class it should instantiate
  • There should be a concrete implementation for the P&E dashboard in the system above, but it doesn't have to be functional

Event Timeline

According to the v1 release checklist, we will split this task into two:

  1. [MUST HAVE FOR DS] One task for database
  2. [MUST HAVE FOR GA] One task for code

According to the v1 release checklist, we will split this task into two:

  1. [MUST HAVE FOR DS] One task for database
  2. [MUST HAVE FOR GA] One task for code

Good point, thanks @ldelench_wmf. I've created T316409 for the schema part, moved it to the darkship column and made it high priority. This one is now for the code only. I will also update these two tasks with more information.

ifried renamed this task from Re-implement tracking tools logic to If we need something to work on this sprint: Re-implement tracking tools logic.Sep 7 2022, 5:12 PM
ifried renamed this task from If we need something to work on this sprint: Re-implement tracking tools logic to Re-implement tracking tools logic.Sep 7 2022, 7:02 PM

Change 832346 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] Implement basic logic for tracking tools

https://gerrit.wikimedia.org/r/832346

Change 832346 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Implement basic logic for tracking tools

https://gerrit.wikimedia.org/r/832346

I'm closing this task because the logic is not exposed anywhere and it can't be tested.