@@ -80,6 +80,23 @@ class TestJiraBot(BotTestCase, DefaultTests):
80
80
81
81
---
82
82
83
+ **jql**
84
+
85
+ `jql` takes in a jql search string and returns matching issues. For example,
86
+
87
+ you:
88
+
89
+ > @**Jira Bot** jql "issuetype = Engagement ORDER BY created DESC"
90
+
91
+ Jira Bot:
92
+
93
+ > **Search results for *"issuetype = Engagement ORDER BY created DESC"*:**
94
+ >
95
+ > - ***BOTS-1:*** External Website Test **[In Progress]**
96
+ > - ***BOTS-3:*** Network Vulnerability Scan **[Draft]**
97
+
98
+ ---
99
+
83
100
**create**
84
101
85
102
`create` creates an issue using its
@@ -137,6 +154,7 @@ class TestJiraBot(BotTestCase, DefaultTests):
137
154
MOCK_SEARCH_RESPONSE = '**Search results for "TEST"**\n \n *Found 2 results*\n \n \n - TEST-1: [summary test 1](https://example.atlassian.net/browse/TEST-1) **[To Do]**\n - TEST-2: [summary test 2](https://example.atlassian.net/browse/TEST-2) **[To Do]**'
138
155
MOCK_SEARCH_RESPONSE_URL = '**Search results for "TEST"**\n \n *Found 2 results*\n \n \n - TEST-1: [summary test 1](http://test.com/browse/TEST-1) **[To Do]**\n - TEST-2: [summary test 2](http://test.com/browse/TEST-2) **[To Do]**'
139
156
MOCK_SEARCH_RESPONSE_SCHEME = '**Search results for "TEST"**\n \n *Found 2 results*\n \n \n - TEST-1: [summary test 1](http://example.atlassian.net/browse/TEST-1) **[To Do]**\n - TEST-2: [summary test 2](http://example.atlassian.net/browse/TEST-2) **[To Do]**'
157
+ MOCK_JQL_RESPONSE = '**Search results for "summary ~ TEST"**\n \n *Found 2 results*\n \n \n - TEST-1: [summary test 1](https://example.atlassian.net/browse/TEST-1) **[To Do]**\n - TEST-2: [summary test 2](https://example.atlassian.net/browse/TEST-2) **[To Do]**'
140
158
141
159
def _test_invalid_config (self , invalid_config , error_message ) -> None :
142
160
with self .mock_config_info (invalid_config ), \
@@ -212,6 +230,11 @@ def test_search(self) -> None:
212
230
self .mock_http_conversation ('test_search' ):
213
231
self .verify_reply ('search "TEST"' , self .MOCK_SEARCH_RESPONSE )
214
232
233
+ def test_jql (self ) -> None :
234
+ with self .mock_config_info (self .MOCK_CONFIG_INFO ), \
235
+ self .mock_http_conversation ('test_search' ):
236
+ self .verify_reply ('jql "summary ~ TEST"' , self .MOCK_JQL_RESPONSE )
237
+
215
238
def test_search_url (self ) -> None :
216
239
with self .mock_config_info (self .MOCK_DISPLAY_CONFIG_INFO ), \
217
240
self .mock_http_conversation ('test_search' ):
0 commit comments