Custom Field value entered while creating issue should appear while creating sub-task as non editable text.

Suppose there is a Custom field Business Demand, the value entered in this field should appear as a non editable text while creating its sub-task. EX: Business Demand abcd. Both, field and its value should appear while creating sub-task.

5 answers

This widget could not be displayed.


Look at the link, this way you can make it readonly,

Reg copying the value from parent to sub task you can try what Nic said or you can use Java script overall for copying and for making the field readonly.

Hope this helps.

Mizan Community Champion Dec 26, 2012

If I am not wrong this will make the customfield readonly on all the screens . The field should be readonly only while creating the subtask i.e Subtask creation screen.

Mizan you are correct, the link is just an example to educate people, how to achieve, and it is not a straight forward answer for his question, and slight coding changes has to be done, for his question.

Mizan Community Champion Dec 26, 2012

I am interested to know how parent customfield values can be retrieved from Javascript , can this be done via REST api ?

I will tell you in few mins, as I too have not tried this earlier.

This widget could not be displayed.

This does not quite make sense. If you are creating a new issue, then the field will have no value because you haven't entered one yet, so there's nothing to display in a read-only mode.

I suspect what you mean is that "Business Demand" is not actually a field that belongs to the sub-task, it applies only to the parent, and you want to display it on the create screen for the sub-task? If so, then you're going to need a plugin that provides that display. I used to use velocity fields in the Jira toolkit to do this, but they've been removed because of security concerned in recent versions of the plugin, so you may have to look at other options.

Secondly, you may want to inherit it from the parent - you'll need a "copy value from parent" post-function plugin to do that.

This widget could not be displayed.

I am wondering, can't this be achieved used our famous Script Runner with a Scripted Field if the requirement is to show the value from the parent field in the sub-task while viewing.

Rohan, can you explain the usecase a bit, why do you want to show the parent field in the sub-task during creation? Isn't sufficient to show in the sub-task while viewing?

While creating, not possible with this approach, it has to be REST api if needed, as Mizan said. Embed the javascript to retrieve the value (using REST using jQuery) in the description of text field (also make the field readonly) and set the value of the field.

(hope that there is some field in the create subtask screen which contains the issue id of the parent)

This widget could not be displayed.

I thank everyone for the help. I have partially succeded in this task as I am able to get the field and its value while creating sub-task, but the issue is it is appearing as an editable text. I just need to make it non-editable or read-only. I used Copy to sub-task plugin to achieve this. Please help me out.

This widget could not be displayed.

Did you try the Scripted field as mentioned in my last answer?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

37 views 0 1
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