I am developing jira and using variables in velocity, which are exposed as public getters in java plugin code. Everything seems good, I am getting my java code results in output.vm inside velocity template after processing excel file but I would like to add progressbar which is coded in pure javascript, so I have some js files and I would like to get velocity variables like current number of processed issue, and
how many issues are there to calculate progress. I can't bring solution because when
I am attaching <script>
inside velocity .vm and alerting after timeouted function
the variable issueNumber is not changing at all, its 0. issueNumber is public instance variable in java.
<script>
function test() {
var get = $issueNumber;
alert(get);
}
setTimeout(test, 5000);
test();
</script>
My public variable issueNumber can be rendered in velocity as result after iterating in output velocity file, but can't be used as indicator in javascript where current progress is. Basically I need runtime variable not render time variable.