I have use javascript code in issue tab panel vm file.
It works only when page reload.
Community moderators have prevented the ability to post new answers.
You will need to listen on JIRA JavaScript event: JIRA.Events.ISSUE_REFRESHED. You can search through sources for some samples but the entry point will look like:
JIRA.bind(JIRA.Events.ISSUE_REFRESHED, function() { // your code });
My practical advise is to avoid relying on JavaScript. It's very unreliable and I encourage you to think if you can redesign your addon.
Hey dear,
Thanks
then tell me one query Is it possible to show other vm after select change event is fired on Issue tab panel.
Actually i have different multiple fields to show on select change event. so how to do that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> I have different multiple fields to show on select change event
Not sure what kind of fields do you mean but if you mean your own custom fields then they should have a vm view and should be re-loaded by JIRA JS framework.
> Is it possible to show other vm after select change event is fired on Issue tab panel.
Again not clear what do you want to achieve but you can listen on JIRA.Events.ISSUE_REFRESHED and do AJAX call to the server and there render vm to reposnse (see here).
Anyway do NOT do any hacks! Hacks is a kamikaze way and even if you make it work in your JIRA, it will not work in other installations or/and other versions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Question 1:
I will tell you step by step what I did
1) I created one issue tab panel (VM file):
there is one select box and other related custom fields
2) then I called servlet action from that page(redirecting to same page)
here is my business logic
3) I wanted to hide some custom fields on select change event.
the code which u have given is not working for me.I don't know why.
Can you please send me example code
JIRA.bind(JIRA.Events.ISSUE_REFRESHED, function() {
// your code
});
for this function
Question 2:
How to separate javascript code from vm file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
please suggest me any idea that how can load it at first time
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.