Hi,
I'm trying to write a scriot in the Summary field edt option. This script suppose to set the value of the Summary field to the word "Implement" only if the issue type is "Duv Sub-Task".
I wrote the following script (with the help of some of the discussions here):
<script type="text/javascript">
if (issue.get("issuetype").name == "Dev Sub-Task") {if (document.getElementById("summary").value == "") {
document.getElementById("summary").value = "<Implement>\n";}}
</script>
It's working unless i remove the issue type function and then it works for all issue types.
What do i need to change in my script so it sets only in in the issue type i want ?
Thanks
It is a bad practice to use JavaScript in your code. Better use Live Fields in Power Scripts or Behaviours in ScriptRunner plugins. You will not have such problems.
Stay away from JS based customizations it's toxic! You can use Behaviour module in the Script runner plugin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.