So, I would say this is a bug, now the question is how to workaround this and have my code executed.
In complement to my previous intervention, I have just found how a workaround to my issue:
I thought the .live would be sufficient, but the rest of the code provided by John Burns is still required: the call to .toInit and .bind handles the case when the create popup opens with the CF already shown, and the call to .live handles the case when the project/issue type needs to be changed to display the CF
Not sure how this can be used to do something else than adding handlers to specific elements, though
I think it should be enough, as the description I entered does appear inside the Create/Edit screen, it is updated when I modify it but it does not contain the script part `<script>...</script>`. Which, by the way is included in the list of custom fields in the admin. I think this is related to the fact that in new jira (5.x), the Create/Edit screens are created from JSON instead of being rendered on the server side.
John's answer worked for my case (Jira 5.0.7, trying to set onclick actions for a CF), thank you very much John !
Still there is a case when it is not enough: my CF is only available for one issue type (New feature). When the Create popup opens with another issue type selected and I change it to New Feature, the script seems not to run. Not a real problem for my case, I'll eventually try to find a workaround
In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to have–in order to produce a reliable long-term roadmap. We're tur...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs