File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 197197 var startDate = encodeURIComponent (new Date (calendar .view .activeStart ).toISOString ());
198198 var endDate = encodeURIComponent (new Date (calendar .view .activeEnd ).toISOString ());
199199 var searchInJira = document .getElementById (' search-in-jira' ).checked ;
200-
201- showLoading ();
202- return fetch (' /issues/user?start=' + startDate + ' &end=' + endDate + " &searchInJira=" + searchInJira + " &query=" + query)
203- .then ((res ) => res .json ())
204- .then (data => {
205- var options = [];
206- // Add options from the fetched data
207- data .forEach (issue => {
208- const option = {
209- value: issue .id ,
210- label: issue .key + ' - ' + issue .summary ,
211- key: issue .key
212- };
213- options .push (option);
214- });
215- hideLoading ();
216- return options;
217- })
218- .catch (error => {
219- // Handle errors
200+ if (searchInJira) {
201+ showLoading ();
202+ return fetch (' /issues/user?start=' + startDate + ' &end=' + endDate + " &searchInJira=" + searchInJira + " &query=" + query)
203+ .then ((res ) => res .json ())
204+ .then (data => {
205+ var options = [];
206+ // Add options from the fetched data
207+ data .forEach (issue => {
208+ const option = {
209+ value: issue .id ,
210+ label: issue .key + ' - ' + issue .summary ,
211+ key: issue .key
212+ };
213+ options .push (option);
214+ });
220215 hideLoading ();
221- handleError (error);
222- });
216+ return options;
217+ })
218+ .catch (error => {
219+ // Handle errors
220+ hideLoading ();
221+ handleError (error);
222+ });
223+ }
224+
223225 }
224226 </script >
225227{% endmacro %}
You can’t perform that action at this time.
0 commit comments