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

2 votes
Accepted answer

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>

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.

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
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,023 views 4 9
Read article

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