Skip to main content

Hi everyone,

I'm developing a custom card extension and I want to implement dependency linking between cards, much like the functionality seen in the native Jira integration.

I've noticed properties in the LucidCardIntegration parent class, specifically importDependencies and showDependencyMapping, which strongly suggest this is possible for custom extensions. However, I'm unable to find any documentation or examples that explain how to properly implement this feature. I've already checked the lucid-samples GitHub repository but couldn't find a relevant example.

I would be grateful if someone could provide some clarity on the following points:

My Specific Questions:

  1. How are dependencies defined in the data source? When importing card data, how do I structure the data to tell Lucid that one card depends on another? Do I need a specific column or property that contains a unique ID of the parent card?

  2. What is the implementation mechanism? Beyond setting importDependencies = true;, what else is required in the extension's code to make the dependency linking work? How does Lucid identify the correct parent card to link to?

  3. Is there any documentation or an example implementation? Could you point me to any developer documentation, tutorials, or a working code example that demonstrates how to set up card dependencies?

  4. Are cross-extension dependencies possible? Can dependencies be created between cards from different custom extensions? For example, could a 'GitLab Issue' card from one extension be linked to a 'GitHub PR' card from a second, separate extension?

Any help, code snippets, or pointers in the right direction would be greatly appreciated!

Thanks in advance.

 

Hey ​@mmuenker. Thanks for raising this question. It’s exciting to see someone external to Lucid building dependency mapping! To answer your questions.

  1. How are dependencies defined in the data source? 

    Dependencies are defined in this way. First  SourceForeignKeys need to be built for the extension as a whole. This will need to be done any time you are making updates to the data source storing the cards. (i.e. whenever you are building a DataSourceRequest object). These define the different types of relationships (blocksclones, etc...), the labels that will be associated with the connection, and importantly the sourceFields that the relationship will draw from. The sourceFields define the key for the data of each card from which that relationship is built. For example, I may have a SourceForeignKey definition structured like

    { 
    'id': '1', (just any unique identifier here is fine)
    'sourceFields': 'linkedCards1'],
    'outwardLabel': "Blocks",
    'inwardLabel': "Is Blocked By"
    }

    Then on each card a field with the key linkedCards1 defined by an array of ids of other items in the collection that are linked by that relationship will need to be filled in. Something like

    "linkedCards1": d"someCardsId1", "someCardsId2", etc...]
  2. What is the implementation mechanism? 
    Implementing something that fills in the data structures like I defined above for each card and the extension as a whole when your cards are imported/updated should be sufficient with that flag you provided.
  3. Is there any documentation or an example implementation? 
    Unfortunately at this time we do not have any documentation for this. I’ll bring it back to our teams that there is a desire for documentation and a sample extension. No guarantees on if or when it will be done though.
  4. Are cross-extension dependencies possible?
    No this is not supported by the extension API. I can bring this back to our teams as well. Is there a specific use case you had it mind that this would be leveraged by? 

Thanks again for the question! Please let me know if you run into any issues with any of the above or have any more questions.