Creating a SysML – JIRA Reference Connection
The object of this tutorial is to create reference connections between a SysML element and one or more existing JIRA issues. We will use the provided MagicDraw project JIRA Tutorial.mdzip. We also assume that the student has access to a JIRA repository and has the ability to create and edit issues within a JIRA project. For this demonstration, we have created three sample issues labeled as SDB-17, SDB-18 and SDB-19 within our Syndeia Demo Box project, but you may use any existing issues in your JIRA repository, instead.
Open the JIRA Tutorial project in MagicDraw. Right-click the JIRA Tutorial package and select Syndeia → Dashboard.
In the Repository Manager tab, create a link to the JIRA repository if one has not already been set up. Right-click on JIRA and select Add…. In the JIRA window that pops up, give the repository and identifying name and add url, user name and password for the repository to which you have access. Click OK.
If the connection is successful, the Syndeia dashboard should look similar to Figure 177.
Figure 177 Syndeia Dashboard, Repository Manager tab
To create a reference connection between a SysML element and a JIRA issue, go to the Connection Manager tab on the Syndeia dashboard, as in Figure 178.
Expand the SysML model in the left pane to show the JIRA Test Block.
Select Reference under Connection Type in the middle pane.
Expand the Issues folder in the right pane to show the issues to be connected.
Drag and drop JIRA Test Block from the left pane on top of an issue in the right pane to connect them. Repeat to connect additional issues.
Figure 178 Syndeia Dashboard, Connection Manager tab
To see the reference connections that have been created, go to the Connection Summary tab on the Syndeia dashboard and click the Refresh button (see Figure 179)
Figure 179 Syndeia Dashboard, Connection Summary tab
The reference connections can be used in a number of ways by Syndeia. Close the Syndeia dashboard. To open a JIRA issue directly from MagicDraw, right-click on JIRA Test Block in the containment browser and select Syndeia → Open Connected Artifacts. Because there are three connected issues, a small window with three check boxes appears. Check one and the JIRA issues will be opened in the default web browser (see Figure 180). Note: your JIRA interface may appear different depending on your configuration settings.
Figure 180 JIRA web interface
Alternatively, the reference connections may be used to display a summary of all the connected issues. Right-click on JIRA Test Block in the containment browser and select Syndeia → Summarize Connected Artifacts. A window similar to Figure 181 should appear.
Figure 181 JIRA Connected Issues Summary
Creating a SysML Block from a JIRA Issue
- In some applications, it may be useful to have a SysML element in the MagicDraw model as a direct proxy for a JIRA issue and displaying many of the same attributes. If this SysML element is connected to the JIRA issues through a Syndeia Data Map connection, the default values of these attributes may be compared and updated as the system evolves.
- We begin with the JIRA Tutorial Model as it was at the completion of the last exercise (see Figure 178).
Figure 182 Syndeia dashboard, Connection Manager tab, after dragging SDB-19 into JIRA Tutorial package using a Data Map Connection
- In the Syndeia dashboard, Connection Manager tab, select Data Map under Connection Type in the central pane. Drag one of the JIRA issues from the right pane onto the JIRA Tutorial package in the left pane (the SysML model). We use SDB-19 in this example. Click Yes to confirm. A new block appears in the left pane under the JIRA Tutorial package named SDB-19 as shown in Figure 182. Go to the Connection Summary tab and click Refresh. A new connection of type BLOCK_JIRA_ISSUE_DATAMAP_CONNECTION appears as in Figure 183.
Figure 183 Syndeia dashboard, Connection Summary tab, showing new connection
Figure 184 MagicDraw BDD
- Return to MagicDraw. Create a new block definition diagram under the JIRA Tutorial package and drag the new block (e.g. SDB-19) into the diagram (see Figure 184). Note that an applied stereotype of <<JIRA_Issue>> is displayed along with <<block>>. The default values of the value properties are determined by the contents of the corresponding JIRA properties.
- Change one of the default values in the SysML block. In our example, we changed the status to Open.
- In the Syndeia dashboard, Connection Browser tab, right-click the SDB-19 row and select Compare SysML & Target. A difference table will be displayed automatically in the Comparison Result tab (Figure 185) showing the discrepancy between the SysML block and JIRA issue.
- In the Syndeia dashboard, Connection Browser tab, right-click the SDB-19 row and select Sync Target → SysML. The default value of the status property of the SysML block will be reset to its value in JIRA, Resolved
Note: In most cases, updating in the opposite direction is not possible. JIRA does not allow these values to be set through the API, only through the regular JIRA interface.
Figure 185 Syndeia dashboard, Comparison result tab, after modifying SysML model
Creating a JIRA Issue Structure from SysML
Figure 186 UAV Project activity
- One use case supported by the Syndeia JIRA interface is to take a multi-level SysML structure, which could be activities, blocks or requirements, and use it to create a corresponding multi-level issue structure in JIRA, each SysML element connected to its corresponding JIRA issue. Using these connections, each SysML element can access the corresponding JIRA issue, including people assigned and time to completion.
- In the JIRA Tutorial MagicDraw project, in the JIRA Activity Structure package, a multi-level activity structure has been created. The model as it appears in the containment browser is shown in Figure 186. In the two activity diagrams in Figure 187, we can see that the top-level activity, UAV Project, is decomposed into three actions typed by the activities Task 1, Task 2 and Task 3. Task 1 is further decomposed into three actions typed by Subtask 1A, Subtask 1B and Subtask 1C.
Figure 187 SysML Activity Model
- In the Syndeia dashboard, Settings tab, set Default Issue Type under the JIRA tab to Task. This will result in new issues being created as Tasks.
- In the Syndeia dashboard, Connection Manager tab,
- select the JIRA repository in which the new task structure will be created.
- Expand the Projects list.
- Set the Connection Type to Reference
- Drag the top-level activity UAV Project (in the SysML model shown in the left pane) on to the JIRA project in which the Tasks are to be created.
- In the options window that appears (Figure 188), select Generate issue(s) and create reference connection(s).
- Click OK.
Figure 188 Creating an Issue Structure with Reference Connections in JIRA
- The new reference connections are shown in Figure 189. Note that each activity used in UAV Project is now connected to a corresponding JIRA task issue.
Figure 189 Viewing new Reference Connections between SysML Activities and JIRA issues
- Close the Syndeia dashboard. From the MagicDraw containment browser, right-clickthe activity Task 1 and select Syndeia → Open Connected Artifacts. The corresponding JIRA issue opens in the JIRA interface (see Figure 190).
Figure 190 JIRA interface, Task 1 issue (SDB-21)
- Note at the bottom of Figure 190, this issue is shown as linked to the issue for the higher level activity UAV Project and the three lower-level activities, Subtask 1A, Subtask 1B and Subtask 1C. While JIRA does not support an "issue hierarchy" exactly like the activity structure in SysML, Syndeia uses the "relates to" issue link to create a corresponding network of connections.
- This process just demonstrated creates reference connections from SysML to JIRA for activity, block or requirements structures. A more powerful set of connections can be made if the SysML block structure is composed of blocks with the applied stereotype <<JIRA_Issue>> and the Model Transform connection type is used for the drag and drop action. In this case, the connection created between each block and its corresponding issue are of the same type as in Section 2.17.2, where attributes such as status, assignee, and so forth can be compared and updated between SysML and JIRA. In this use case, the SysML block structure and connected issues can act as a Work Breakdown Structure within the SysML model for project management purposes.