Hey there,
While building our first Rovo integration for Barcelona, I stumbled across missing pieces of information in the context of a function invoked from an action module.
Overall Context Availability
It appears the context
value is only available when Rovo is invoked from a few specific places in Jira. When the action is invoked from an Issue View, the following context is available:
"context": {
"jira": {
"url": "https://hello.atlassian.net/browse/C2-16",
"resourceType": "issue",
"issueKey": "C2-16",
"issueId": "18427",
"issueType": "Task",
"issueTypeId": "10005",
"projectName": "c2",
"projectKey": "C2",
"projectId": "10008"
}
}
This is not the case when the action is invoked from the board view, project settings, list view, and so on, even though those views can clearly be associated with a projectId. In our first simple use case, we want to allow the user to find project, issue, or board templates via Rovo. We’d like to prioritize more useful search results, which is why the projectId would be helpful.
Overall Documentation and Typing
As soon as Atlassian is sure what types of context are available for the different scenarios, better documentation of which fields to expect where would be appreciated. The same goes for proper typing in the corresponding @forge packages.
cloudId / siteUrl
We want to provide the user with links that direct them to the right place within our app. Therefore, we need to build a fully qualified URL, which we construct from the appId, the environmentId, and the siteUrl. Luckily, getAppContext() works in the action, but it does not contain the siteUrl. I believe siteUrl and cloudId should be part of every invocation, as they should always be defined and would important use cases like the one outlined above.
Workaround
For the siteUrl, it sometimes helps if the siteUrl is part of the input populated via the LLM, which looks like this in our case:
inputs:
siteUrl:
title: The site url of the Jira instance
type: string
required: true
description: The site url of the Jira instance.
This feels shaky, as the URL is not always provided. With the projectId or projectKey, it doesn’t work at all. I suggest that Atlassian extend the context to enable more powerful use cases.
Best,
Julian