Following is my code:
HTML:
<p1>Please download the following document:</p1>
<br>
<a id="text" href="https://www.website">[YOUR DOWNLOADLINK WILL BE SHOWN HERE AFTER SELECTING A MODULE]</a>
<br>
<p2> and attach it to your issue.</p2>
JS:
if(JIBROK_MESSAGE_FIELD_CONTEXT == "CREATE_SD"){
require(['jquery'], function($) {
$('#customfield_10406').on('change', function(){
meineFunktion();
})
function meineFunktion(){
var v = document.getElementById("customfield_10406");
var strUser = v.options[v.selectedIndex].text;
var str = strUser.replace(" ", "_");
str = str.replace("/", "_");
$('#text').attr("href", "https://www.website/downloads/dokumente/" + str);
$('#text').text("https://www.website/downloads/dokumente/" + str);
}
})
} else if(JIBROK_MESSAGE_FIELD_CONTEXT == "VIEW_SD"){
} else {
}
As follows are the visual effects of the field:
Creating issue(the Downloadlink field):
This is when the screen loads:
This is when you change the input in "Modulauswahl":
So the Function is as wished to this point. The Problem occures in the "view issue screen" on the customer side:
Initially, there is only a subtle change in the spacing between the fields, where one could expect the messagefield:
But after anything is done to the issue (eg. commented or statuschange from the customer view screen, following happens, even though I tried specifying in the code, that nothing is to happen on the "view issue" screen:
else if(JIBROK_MESSAGE_FIELD_CONTEXT == "VIEW_SD"){
} else {
I tried it also just without the else, if in the code but it didn't change anything.