Examples of Event Handlers
How to map JIRA Issue Priority to MS Project Task Priority
It is not possible to map Issue Priority to Task Priority directly. However, Issue Priority can be mapped to a text field (e.g. Text3) and then converted to the Task Priority using a VBA sub that runs on the 'Sync task: After updating' and 'Import task: After creating' events after synchronisation and import respectively.
The macro should look as follows:
Sub OnSyncTaskAfterUpdate(Project As Project, Task As Task)
Select Case task.Text3
Case "Blocker"
task.Priority = 700
Case "Critical"
task.Priority = 700
Case "Major"
task.Priority = 500
Case "Minor"
task.Priority = 300
Case "Trivial"
task.Priority = 100
End Select
End Sub
How to Map Jira Field in Days to Work
Sub OnSyncTaskAfterUpdate(Project As Project, Task As Task)
Task.Work = Task.Number1 * 8 * 60
End Sub
The same code is used in this tutorial.