forked from mrts/ask-jira
-
Notifications
You must be signed in to change notification settings - Fork 0
/
exportimportconfig-sample.py
76 lines (65 loc) · 1.9 KB
/
exportimportconfig-sample.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
from collections import namedtuple
JIRA2 = {
"server": "https://example.com/jira2/",
"user": "user2",
"password": "password2"
"project": "PROJECTKEY",
}
PRIORITY_MAP = {
'Blocker': 'Blocker',
'Critical': 'Critical',
'Major': 'Major',
'Minor': 'Minor',
'Trivial': 'Trivial',
}
ISSUETYPE_MAP = {
'Epic': 'Epic',
'Story': 'Story',
'Improvement': 'Story',
'New Feature': 'Story',
'Change request': 'Story',
'Task': 'Task',
'Bug': 'Bug',
'Sub-task': 'Sub-task',
'Development': 'Sub-task',
'Design': 'Sub-task',
'Technical task': 'Sub-task',
}
ASSIGNEE_MAP = {
'usera': 'user1',
'userb': 'user2',
}
REPORTER_MAP = ASSIGNEE_MAP
SOURCE_EPIC_LINK_FIELD_ID = 'customfield_10251'
SOURCE_EPIC_NAME_FIELD_ID = 'customfield_10252'
TARGET_EPIC_NAME_FIELD_ID = 'customfield_10009'
WithResolution = namedtuple('WithResolution', 'transition_name')
RESOLUTION_MAP = {
"Fixed": "Fixed",
"Won't Fix": "Won't Fix",
"Later": "Won't Fix'",
"Duplicate": "Duplicate",
"Incomplete": "Incomplete",
"Cannot Reproduce": "Cannot Reproduce",
"Fixed as is": "Fixed",
"Fixed with minor changes": "Fixed",
"Fixed with changes": "Fixed",
"Fixed quite differently": "Fixed",
"Released": "Done",
"Resolved": "Done",
"Verified": "Done",
"Unresolved": "Won't Fix",
"Done": "Done",
}
STATUS_TRANSITIONS = {
'Open': None,
'Reopened': None,
'In Progress': ('Start work',),
'In Testing': ('Start work', 'Work done', 'Review passed'),
'Resolved': ('Start work', 'Work done', 'Review passed',
WithResolution('Testing passed')),
'Closed': ('Start work', 'Work done', 'Review passed',
WithResolution('Testing passed')),
}
ADD_COMMENT_TO_OLD_ISSUE = True
CUSTOM_FIELD = ('customfield_11086', {'value': 'Custom value'})