Hi,
I have following code and it works if i click on Create Issues while i look at an issue. If i click on Create Issue on the dashboard it does not work.
If i cancel the create dialog and click Create issue again i hang on the wheel of fortune. What am i doing wrong ?
<script type="text/javascript">
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) {
$('#summary').keyup(function() {
var text = $(this).val(),
count = encodeURIComponent(text).replace(/%[A-F\d]{2}/g, 'U').length;
switch (true)
{
case (count<50):
$('#count').text("Characters: " + count);
break;
case (count>50 && count<60):
$('#count').css("color","green");
$('#count').text("Seems like a good length of a summary!");
break;
case (count>60 && count<80):
$('#count').css("color","green");
$('#count').text("You done ?");
break;
case (count>80):
$('#count').css("color","red");
$('#count').text("Hey! You can use the description field, it's just below, use it!");
break;
}
});
});
</script>
<div id="count"></div>
Summary
/donnib