|
|
In models that integrate requirements, test cases or change requests as artefacts, it may be necessary to provide a link to view an artefact in the context of the application where it was created. This can be done in Squore by configuring the Source Code Viewer chart in the Dashboard to open links in an external applications. This section shows how you can configure external links using Jira as the target application.
Our model collects Jira issues and shows a minimal dashboard or the issue's status, assignee, priority, summary and description, as shown below:
The Jira issue shown above is an artefact of type NEW_FEATURE. In order to
make the Source Code Viewer chart open the Jira issue in a browser, you simply need to create
a properties file in the sources
folder of your configuration, whose name is the artefact type in
lower case.
<my_configuration_folder>/sources/new_feature.properties:
type=url pattern=https://issues.jenkins-ci.org/browse/{0} pattern.finding=https://issues.jenkins-ci.org/browse/{0}/activity?from={1} p0=INFO(ISSUE_ID) p1=INFO(ASSIGNEE)
The syntax of this properties file is as follows:
type is the type of link to create. Only url is currently supported.
pattern is the URL pattern used to generate a link for the Source Code Viewer chart in the Dashboard. You are free to insert parameters in the URL as needed, as long as you declare them in the properties file.
pattern.findings is the URL pattern used to generate a link for artefacts on the Findings tab. This pattern also supports parameters.
p0, p1... pn are parameters that accept a computation that will return a string for the artefact. In the example above, ISSUE_ID and ASSIGNEE are two text metrics that exist for the NEW_FEATURE artefact type.
You can use the following computations:
INFO(measureId) to retrieve textual information from the current artefact
ARTEFACT_LOCATION() to retrieve the current artefact path
FINDING_LOCATION() to retrieve the precise location of the finding in the current artefact