Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,300,161
Community Members
 
Community Events
165
Community Groups

How to find the full hierarchical folder path to an issue

Hello, 

I am doing some integration between Jira structure and an inhouse tool and need to determine the full structure folder path to an issue.

Say I have a structure that looks like this:

Fol1

    Fol2

          Issue1

Then for Issue1, I want to find the list {Fol1, Fol2} or some similar string. I would then store this string in the issue for later use.

Any help or ideas would be appreciated, thanks.

Alan

1 answer

1 accepted

2 votes
Answer accepted

Hello @Alan Wakeford ,

Dionathan from ALM Works here. Welcome to the Community!

We should be able to accomplish your goal by first adding a Formulas column. How we build the formula is going to depend on what the hierarchy is comprised of. 

For example: Lets consider a hierarchy with 4 levels: Folder 1 > Folder 2 > Epic > Story

By using formulas, you could use a CONCAT that joins together the text strings, and the PARENT function which will extract the value from the parent row or from an ancestor row by a specified level, as below:

 

CONCAT(PARENT#LEVEL=-3{SUMMARY}, "/", PARENT#LEVEL=-2{SUMMARY}, "/", PARENT{SUMMARY}, "/", THIS.SUMMARY)

You should see something like the below example:

image-2022-06-14-15-03-44-552.png

Finally, you could use Effectors to write the value from the Formula column to the needed custom field.

Please let me know if it does help, or if you have any other questions.

Best Regards,
Dionathan

Thanks Dionathan,

I was actually able to figure out another way using the aggregate JOIN function. i.e.

     JOIN{Summary}

Note the curly braces denoting that this is an aggregate function.

JOIN, and the rest of the aggregate functions are actually pretty badly documented as these seem to be very powerful but there are few examples of their use. JOIN in particular is confusing as it is an aggregate function and also part of the regular EXPR functions. 

The documentation can be found under:

Structure for Jira->Structure User's Guide->Formulas->Formula Reference Documentation->Aggregate Function Reference

and states that JOIN:

    "by default it joins all parent string values from root to the self value"

Which is exactly what I want in this case.

Thanks again,

Alan

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