Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Rohan Kulkarni December 26, 2012

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

1 vote
Nitram
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.
December 26, 2012

Hi,

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

https://answers.atlassian.com/questions/115917/setting-custom-field-read-only-with-javascript?page=1#116708

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
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.
December 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.

Nitram
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.
December 26, 2012

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
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.
December 26, 2012

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

Nitram
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.
December 26, 2012

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

0 votes
Renjith Pillai
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.
January 11, 2013

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

0 votes
Rohan Kulkarni January 10, 2013

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.

0 votes
Renjith Pillai
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.
December 26, 2012

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)

0 votes
Nic Brough -Adaptavist-
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.
December 26, 2012

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events