Craftist icon indicating copy to clipboard operation
Craftist copied to clipboard

Support crosslinking in shared projects / spaces

Open FlohGro-dev opened this issue 3 years ago • 2 comments

Refer to the request in the forums: https://forum.developer.craft.do/t/craftist-a-todoist-extension-for-craft/249/10?u=flohgro

Do you know if I’m sharing a Workspace in Craft and also sharing a task list in Todoist, can others click the links between tasks/notes and have them navigate properly between applications?

FlohGro-dev avatar Jan 18 '22 09:01 FlohGro-dev

Results after doing some initial testing

  • t seems that both project_id and task_id are different between two todoist users
  • the url retrieved by the API for a project looks like this https://todoist.com/showProject?id=<project_id>&sync_id=<sync_id>
  • the sync_id is the base between both accounts and is identical in both accounts
  • ~~the web url retrieved by the API seems to open the correct project in the web for both accounts~~
    • unfortunately this was a wrong assumption
  • the mobile app url scheme only accepts the project_id as parameter and not the sync_id
  • it should be possible to find the correct project id in both accounts but this would not work with a simple link in the Craft Document - this link is different for each collaborator since everybody has a different project_id for the shared project
  • additionally creating a task is not trivial anymore, too - the sync_id can’t be used in the „Create a new Task“ API: https://developer.todoist.com/rest/v1/?javascript#create-a-new-task
    • whould require to use the sync_id and lookup in a dictionary of the projects in the current users account → this is possible but requires some extra work; the good thing is creating tasks is totally hidden inside the eXtension and just a button for the user
  • the current links created by the eXtension are just working for the user who created them
    • this also applies for the „Sync Task States“ feature
  • this requires special treatment of shared projects IF both users want to crosslink between a Craft document and the shared project
  • the hacky solution would be to have two links, each for one user in the document - at least for the project - for the crosslinked tasks this is even more complicated since it would require to duplicate them, too.
  • for me it is currently a limitation for the eXtension since this can’t be solved easily and will currently look ugly since it would require a lot of duplicates

FlohGro-dev avatar Jan 27 '22 20:01 FlohGro-dev

got feedback from the todoist support team:

The good news is that there's a new architecture already implemented, which is being gradually deployed at the moment. When this process will be completed, each shared task will have a single id, common for all collaborators.

so this should be much easier when the new architecture together with a new API is released.

FlohGro-dev avatar Feb 07 '22 15:02 FlohGro-dev