-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFilterIssuesByProject.txt
More file actions
99 lines (95 loc) · 5.54 KB
/
FilterIssuesByProject.txt
File metadata and controls
99 lines (95 loc) · 5.54 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#
# Bir tane function alanı kopyaladıktan sonra "Subflows" sağ tıklayarak yapıştırabilirsiniz. Toplu bir şekilde function kopyalayıp, yapıştırmayabilir.
#
FUNCTION Main_copy GLOBAL
# Main_Copy'den Main'e kopyalayın (CTRL+A ile hepsini seçin ve sürükleyin ya da CTRL+X ve CTRL+V kullanın).
# Ya da yalnızca function içerisini kopyalayın. Main'e direkt yapıştırabilirsiniz.
CALL 'Jira - Filtre Yöntemiyle Issues Kayıtları Getir.'
SET RowIndex TO 0
LOOP WHILE (IssuesObject['total']) > (RowIndex)
SET IssueKey TO IssuesObject['issues'][RowIndex]['key']
SET Raporlayan TO IssuesObject['issues'][RowIndex]['fields']['creator']['displayName']
SET Parametre TO IssuesObject['issues'][RowIndex]['fields']['customfield_11100']
CALL 'SQL İşlemleri'
CALL 'Jira - Sonuçlandır'
Variables.IncreaseVariable Value: RowIndex IncrementValue: 1
END
END FUNCTION
FUNCTION 'Jira - Filtre Yöntemiyle Issues Kayıtları Getir.' GLOBAL
Web.InvokeWebService.InvokeWebServiceUseAuth Url: $'''https://domain.atlassian.net/rest/api/3/filter/1011''' Method: Web.Method.Get Accept: $'''application/json''' ContentType: $'''application/json''' ConnectionTimeout: 30 FollowRedirection: True ClearCookies: False FailOnErrorStatus: False EncodeRequestBody: False UserAgent: $'''Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20100312 Firefox/3.6''' Encoding: Web.Encoding.AutoDetect AcceptUntrustedCertificates: False Username: $'''usernam@domain.com''' Password: $'''Password''' TrimRequestBody: True Response=> FilterResponse
Variables.ConvertJsonToCustomObject Json: FilterResponse CustomObject=> FilterObject
Web.InvokeWebService.InvokeWebServiceUseAuth Url: FilterObject['searchUrl'] Method: Web.Method.Get Accept: $'''application/json''' ContentType: $'''application/json''' ConnectionTimeout: 30 FollowRedirection: True ClearCookies: False FailOnErrorStatus: False EncodeRequestBody: False UserAgent: $'''Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20100312 Firefox/3.6''' Encoding: Web.Encoding.AutoDetect AcceptUntrustedCertificates: False Username: $'''username@domain.com''' Password: $'''Password''' TrimRequestBody: True Response=> GetAllIssueResponse
Variables.ConvertJsonToCustomObject Json: GetAllIssueResponse CustomObject=> IssuesObject
END FUNCTION
FUNCTION 'SQL İşlemleri' GLOBAL
Database.Connect ConnectionString: $'''Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=BLOG;Data Source=.\\SQLEXPRESS''' Connection=> SQLConnection
@@copilotGeneratedAction: 'False'
Database.ExecuteSqlStatement.Execute Connection: SQLConnection Statement: $'''DECLARE @Ad NVARCHAR(150)= \'%Raporlayan%\'
SELECT @Ad , \'kac%%\', 1+1''' Timeout: 30 Result=> SqlSonuc
Database.Close Connection: SQLConnection
END FUNCTION
FUNCTION 'Jira - Sonuçlandır' GLOBAL
Web.InvokeWebService.InvokeWebServiceUseAuth Url: $'''https://domain.net/rest/api/3/issue/%IssueKey%/transitions''' Method: Web.Method.Post Accept: $'''application/json''' ContentType: $'''application/json''' CustomHeaders: $'''X-Atlassian-Token: nocheck
User-Agent: PowerAutomateDesktop''' RequestBody: $'''{
\"update\": {
\"comment\": [
{
\"add\": {
\"body\": {
\"version\": 1,
\"type\": \"doc\",
\"content\": [
{
\"content\": [
{
\"text\": \"Merhaba, İşlem Yapıldı\",
\"type\": \"text\"
}
],
\"type\": \"paragraph\"
}
]
},
\"visibility\": {
\"type\": \"role\",
\"value\": \"Administrators\"
}
}
}
]
},
\"transition\": {
\"id\": \"761\"
},
\"fields\": {
\"resolution\": {
\"name\": \"Done\"
}
}
}''' ConnectionTimeout: 30 FollowRedirection: True ClearCookies: False FailOnErrorStatus: False EncodeRequestBody: False UserAgent: $'''Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20100312 Firefox/3.6''' Encoding: Web.Encoding.AutoDetect AcceptUntrustedCertificates: False Username: $'''username@domain''' Password: $'''Password''' TrimRequestBody: True Response=> TransitionResponse StatusCode=> TransitionStatus
IF TransitionStatus <> 204 THEN
Web.InvokeWebService.InvokeWebServiceUseAuth Url: $'''https://domain.net//rest/api/3/issue/%IssueKey%/comment''' Method: Web.Method.Post Accept: $'''application/json''' ContentType: $'''application/json''' CustomHeaders: $'''X-Atlassian-Token: nocheck
User-Agent: PowerAutomateDesktop''' RequestBody: $'''{
\"body\": {
\"content\": [
{
\"content\": [
{
\"text\": \"Bir hata oluştu: \",
\"type\": \"text\"
}
],
\"type\": \"paragraph\"
}
],
\"type\": \"doc\",
\"version\": 1
}
}''' ConnectionTimeout: 30 FollowRedirection: True ClearCookies: False FailOnErrorStatus: False EncodeRequestBody: False UserAgent: $'''Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20100312 Firefox/3.6''' Encoding: Web.Encoding.utf_7 AcceptUntrustedCertificates: False Username: $'''username@domain''' Password: $'''password''' TrimRequestBody: True Response=> CommentResponse StatusCode=> CommentStatusCode
# Jira, Otomatik olarak "Waiting For Customer" adıma günceller. Filtre bölümüzde "Waiting For Support" yakalamaktadır.
IF (CommentStatusCode = '400' OR Contains(CommentStatusCode, '404')) = $'''true''' THEN
EXIT LOOP
END
END
SET Parametre TO $'''%''%'''
END FUNCTION