Here is the script.
<script>
var dnUrl ="https://test.southindia.cloudapp.azure.com:2504";
var redirectUrlForCef= AJS.$("#customfield_11700-val a").text();
redirectUrlForCef = redirectUrlForCef.replace("https://dn.placeholder.com:1111",dnUrl);
var incidentId = AJS.$("#key-val").text();
AJS.$("#customfield_11700-val a").text("Details");
AJS.$("#customfield_11700-val a").attr('target','_blank');
var changeDivRedirect = AJS.$("#customfield_11700-val a").attr('href',redirectUrlForCef+"?incidentId="+incidentId);
AJS.$("#customfield_11700-val").html(changeDivRedirect);
</script>