It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Copy Values by Parent Portfolio link

If there some work solutions to copy field value using the portfolio "parent link".

1) Create a hierarchy , where some custom issue type under the epic.

2) Set some value to Higher custom issue

3) Automatically Copy this field value to epic, story subtasks.

 

If there some workaround somebody finds?

SIL? Scriptrunner? Automation for jira? Some listner?

 

 

1 answer

0 votes

Hello @Erick_Johanson ,

I'm happy to take a look and Breaking out your questions into sections to make sure I cover everything:

1) Create a hierarchy , where some custom issue type under the epic.

The Default Hierarchy in Jira is Epic > Story > Subtask, but the term Story is a little bit special as the story hierarchy is technically any standard issue type that is not an Epic or subtask.  So technically any Standard issue type that you create will be below the Epic and above the Subtask by default at the same level of the story, it just so happens that one of the default issue types is also called a Story but a bug is also a story as the hierarchy is concerned.

In Portfolio the Hierarchy is the same however, you can also set up Initiatives that are a custom Hierarchy level above Epic, and is converted from any standard hierarchy (story level)

But if you are looking to set up a new level between Epic and Story to rearrange the default hierarchy, this is not something that can be done natively but you could look into the add-on Structure for Jira that allows for defining custom hierarchies in various ways.

2) Set some value to Higher custom issue

As mentioned above to se up the levels above the Epic this is done by defining Initiatives, and the full details for setup and configuration can be seen in the documentation at:

3) Automatically Copy this field value to epic, story subtasks.

Copying field values to another issue is going to be a Jira workflow function and separate from Portfolio and even Jira directly as there is not a native function to trigger this action.  You would want to look into an add-on as discussed in more detail in the following threads that are offering up several add-ons and examples of the functionality avaliable in each:

Regards,
Earl

No i mean next hierarhy

1)Parent issue (by parent link from portfolio)

2)-Epic

3)--Story (task,bug etc)

4)---sub-task

 

how copy from epic to story(task) i know

i ask can we copy some value by parent link? 

 

Question copy from parent issue as custom issue that we set on hierarchy upper on the epic

Hey @Erick_Johanson ,

I was not able to find anything published on the documentation sites for the parent link, but I was able to reach out to a few members of the Adaptavist team (the vendors for the add-on ScriptRunner) and they offered the following snippet as a way to link Epic to the parent initiative through the Parent Link field to get you started in the right direction. 

The core of the code is below to get you started:

/**
*
* @param issue - Issue that triggered Listener
* @param fieldToCopy - CustomField Object for the field you want to update
*/
void pushUpdateToPortfolioLinkedIssues(Issue issue, CustomField fieldToCopy){ def log = Logger.getLogger(getClass())
log.setLevel(Level.DEBUG) String linkTypeName = "Parent-Child Link" def currentIssuesFieldValue = issue.getCustomFieldValue(fieldToCopy) if(currentIssuesFieldValue) { IssueLinkTypeManager issueLinkTypeManager = ComponentAccessor.getComponent(IssueLinkTypeManager)
IssueLinkManager issueLinkManager = ComponentAccessor.getIssueLinkManager()
IssueManager issueManager = ComponentAccessor.getIssueManager()
ApplicationUser user = ComponentAccessor.jiraAuthenticationContext.getLoggedInUser() def linkTypes = issueLinkTypeManager.getIssueLinkTypes(false)
Long parentChildPortfolioLinkID = linkTypes.find { linkType ->
linkType.name == linkTypeName
}?.id Collection<IssueLink> parentToChildLinks = issueLinkManager.getInwardLinks(issue.id)
Collection<IssueLink> childToParentLinks = issueLinkManager.getOutwardLinks(issue.id) //Process Children issues and push field update to child issues
parentToChildLinks.each { linkObject ->

Regards,
Earl

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you