hi we have vwr project field in parent and we would like to create parent project field using script runner and it should inherit parent value.
please help
Hello @Aasha Kathamuthu ,
Copying field value to subtask via transition (as @Kathy Hart mentioned) is a good solution. However it has pros and cons. You have to add this post function to every transition, and also you have to consider when parent field changes.
Generally I recommend Enhancer Plugin's Parent Issue Field customfield which is documented here.
With this field you don't have to worry about transitions or changes. Subtasks automatically display the parent's field value.
I hope I was clear.
Tuncay
@Tuncay Senturk - I am looking for unpaid plug in.
What i have done is created a script runner field in jira
and i coding that field in script runner plug in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, you should clarify a bit more.
Share your code, and we can try to help. At this point it is a big black box for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"VWR Project" is a single select choice field.
We have created a field (script runner ) type field - (Parent Project Name)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Even I could not get the entire point, you can start with this code.
import com.atlassian.jira.issue.MutableIssue; // also add this import
def vwr = customfIeldManager.getCustomFieldObject("customfield_10xxx") //type your customfield id here
Issue parentIssue = issue.getParentObject();
def parentVwrValue = parentIssue.getCustomFieldValue(vwr);
def mIssue = (MutableIssue)issue;
mIssue.setCustomFieldValue(vwr, parentVwrValue);
Hope it helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you are trying to copy a field from a task level issue into a subtask you don't have to use script runner. It can be done on transition using a post function. "Copy Value from Other Field".
When you set it up, you select the option: "Copy from Parent"
I do not, however, believe this will work for Epics to Tasks or Stories, nor for any other levels of hierarchy Issues set up in Portfolio.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I understood correctly, upon creation of subtask, you require a certain custom field to inherit value from parent?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Gezim Shehu [Communardo] - yes you are correct.
"VWR Project" is a single select choice field.
We have created a field (script runner ) type field - (Parent Project Name)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.