Need to Copy drop down value to summary in create screen using javascript?

Raju KC
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 26, 2013

Need to Copy drop down value to summary in create screen using javascript?

2 answers

1 accepted

0 votes
Answer accepted
RambanamP
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 26, 2013

try with this

<script type="text/javascript">
jQuery(document).ready(function($) {	
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e, context) {	
	addSummary();
});
addSummary();
function addSummary(){		
				
		$('#customfield_11327').change(function() {
				AJS.$('#summary').val($('input[name=customfield_11327]:checked + label').text());
		});
				AJS.$('#summary').val($('input[name=customfield_11327]:checked + label').text());
}
	
});
</script>

Raju KC
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 26, 2013

I want to get value from select list.

RambanamP
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 26, 2013

if you get select list value then it will return ID of selected option, for this simply you can use

$('#customfield_11327').val();

if you want selected option text then you can use code inmy answer

don't forget to load javascript as webresource in module

0 votes
Bharadwaj Jannu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 26, 2013

Suggest an answer

Log in or Sign up to answer