changes.mady.by.user Mazin Abubeker
Saved on Apr 20, 2021
...
<div id='sidebar-container-title' class='subtitle'> </div> <div id='sidebar-container-industry' class='title'> </div>
-
<script> //var data_fields = []; jQuery.ajax({ url: "/rest/scriptrunner/latest/custom/searchJiraTicketsPaginated", headers: { 'X-Atlassian-Token' : 'nocheck', 'Content-type' : 'application/json' }, type: "POST", dataType: 'json', data: JSON.stringify({ "jql": "project = PGH AND issue = " + new URLSearchParams(window.location.search).get('company'), "startAt": 0, "maxResults": 1 }), success: function(data){ let fields = ['customfield_10108', 'customfield_10641', 'customfield_10653', 'customfield_10224', 'customfield_10640']; //for(let i = 0; i < fields.length; i++){ // data_fields.push(data.issues[0]['fields'][fields[i]]); //} $('#sidebar-container-title')[0].innerHTML = data.issues[0]['fields']['customfield_10108']; $('#sidebar-container-title')[0].style.fontSize = "20px"; $('#sidebar-container-title')[0].style.marginBottom = "10px"; $('#sidebar-container-industry')[0].innerHTML = data.issues[0]['fields']['customfield_10641']; } }); </script>