Hi Team,
We have decided to hide the edit button for closed tickets. For that I've put one javascript code in announcement banner below and it's not working well. Could you please assist the right code to hide the edit button based on status.
<script type="text/javascript">
(function($) {
AJS.toInit(function(){
// init on load
project = AJS.Meta.get("issue-key").substr(0, AJS.Meta.get("issue-key").indexOf('-'));
if (project == "xxx") {
AJS.$("a#edit-issue").hide();
console.log("HIDE");
}
else {
AJS.$("a#edit-issue").show();
console.log("VISIBLE");
}
});
})(AJS.$);
</script>
Thanks,
Tej