How to copy one field to anther while performing edit operation?

How to copy one field to anther while performing edit operation?

3 answers

1 accepted

Accepted Answer
2 votes
Mizan Community Champion May 06, 2013

You will need to add javascript in the field description which will check if it is the edit screen then copy the value from one field to another .

My way of checking the editing screen is as below (JIRA 5.1.x)

<script type="text/javascript">
AJS.$(document).ready(function() {
	AJS.$(document).bind('dialogContentReady',   function(event, dialog) {
		if(AJS.$(".aui-popup-heading").text().trim()=='Configure FieldsEdit Issue'){
			// Your Script
		}
	});
});
</script>

Hey Mizan,

I want to display "A" field in edit screen as "B". But not works. Can you test in yours

<script type="text/javascript">
AJS.$(document).ready(function() {
AJS.$(document).bind('dialogContentReady', function(event, dialog) {
if(AJS.$(".aui-popup-heading").text().trim()=='Configure FieldsEdit Issue'){

AJS.$("#customfield_11125").text("B");
}
});
});
</script>

Mizan Community Champion May 06, 2013

You need val() .. AJS.$("#customfield_11125").val("B");

This works for me . I hope your customfield is a text field / text area field

I mean I want to change label, not field value.

Mizan Community Champion May 06, 2013

This was a tough one ... hope you will vote up my posts :D

AJS.$('label[for="customfield_11125"]').text("B")

JJupin Live Fields can certainly help you with that. Give it a try: https://marketplace.atlassian.com/plugins/com.keplerrominfo.jira.plugins.jjupin

0 votes
Daryl Chuah Atlassian Team May 06, 2013

It is not possible to copy one field to another while you are editing an issue. However, you can clone an issue in JIRA.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 25, 2018 in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

454 views 7 5
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you