Forums

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

Structure formula grouping bug

zephyrus.mckinnon January 24, 2024

I need to group people based on discipline, but cannot use any grouping that is already in structure, so I must use a custom group formula. After a ton of trial and error, I believe I have found a bug.

These seem to be the only 2 ways I can get group formula to work. Which sucks because it would help a ton if Arrays could be used, but structure does not seem to allow that. 

IF(SEARCH("John", assignee) > 0 OR SEARCH("Jason", assignee) > 0 OR SEARCH("Jessica", assignee) > 0, "Designers",
   IF(SEARCH("Frank", assignee) > 0 OR SEARCH("OtherName", assignee) > 0 OR SEARCH("AnotherName", assignee) > 0, "Artists",
      IF(SEARCH("SomeName", assignee) > 0 OR SEARCH("AnotherName", assignee) > 0 OR SEARCH("AnotherName", assignee) > 0, "Engineers", "")
   )
)

OR

IF(assignee = "John", "Designers",
   IF(assignee = "Jason", "Designers",
      IF(assignee = "Jessica", "Designers",
         IF(assignee = "Frank", "Artists",
            IF(assignee = "OtherName", "Artists",
               IF(assignee = "AnotherName", "Artists",
                  IF(assignee = "SomeName", "Engineers",
                     IF(assignee = "AnotherName", "Engineers",
                        IF(assignee = "AnotherName", "Engineers", "")
                     )
                  )
               )
            )
         )
      )
   )
)

 For reference - the array codes I have tried are here and they will not compile without issues.

ARRAY1 = [assignee = "John", assignee = "Jason", assignee = "Jessica"]
ARRAY2 = [assignee = "Frank", assignee = "OtherName", assignee = "AnotherName"]
ARRAY3 = [assignee = "SomeName", assignee = "AnotherName", assignee = "AnotherName"]
IF(SEARCH("Designers", ARRAY1), "Designers", SEARCH("Artists", ARRAY2), "Artists", SEARCH("Engineers", ARRAY3), "Engineers")

And

var designers = ["John", "Jason"];
var artists = ["Frank", "OtherName", "AnotherName"];
var engineers = ["SomeName", "AnotherName", "AnotherName"];

IF(ARRAY_CONTAINS(designers, assignee), "Designers",
   IF(ARRAY_CONTAINS(artists, assignee), "Artists",
      IF(ARRAY_CONTAINS(engineers, assignee), "Engineers", "")
   )
)

And

...
IF(ARRAY_CONTAINS(ARRAY("John", "Jason")
...

All array stuff seems to be out the window. So I have to use IF/OR statements or Nested IFs

THE ISSUE/BUG
With the first 2 blocks that actually compile and display the folder structure I want, it will only choose some people to group in the list:
Example (Both are designers):
Jon - 10 issues
Jason - 12 issues

Run code, and use group - display =
{Folder} - Designers
 --> Jason - 12 issues

Jon will not be listed at all, not matter where they are in the code block. Even if they are set as a different discipline. If I remove Jason, the folder will be empty. Structure or Jira will not acknowledge that Jon even exists as a resource to group, but I can assign anything to them and even use other ways to group, like by release or issue count.

It is not always the case that 1 person displays - for instance in an art folder it will show 2 people rather than the 13 I list. So the code I have works, there is just something happening in Jira or in the structure that is bugged that will block resources from actually being grouped. 

 I have already tried "Consider other groups" or "Allow changes via Structure", both on and off in all configurations. There are no other transformations that are happening at the same time, and nothing is filtering them - the only thing that is telling the structure what to group is the formula, which only half works. I have also tried to use other grouping along with the formula and it does not work correctly to group how it is told to. 
The Automation query I have is 

Project = projectName AND Component in (componentName) AND status not in (Closed, Backlogged)

I have also tried without any query and different queries. This is not the issue. 

 

This really seems like a bug with structure or jira, or even group formula in general, because the code it self works, it just will not forcefully pull everyone that is named into the structure group.

Can anyone help here? Would love any feedback

1 answer

1 vote
Stepan Kholodov _Tempo_
Community Champion
January 24, 2024

Hello @zephyrus.mckinnon 

Grouping by Formula is not yet available in Structure Cloud. At this time, you can use the Formula to mark issues with roles according to the users they are assigned to and if needed, you can sort by the Formula column. And you can achieve grouping through the usage of folders - a folder can represent a role and issues of particular assignee or assignees of that role can be added to that folder with an insert generator.

As for using arrays in formulas - this is possible, you can find out more about it in our Formula column documentation.

I hope this helps. If you need further assistance - please reach out to us directly at our support portal and we'll get back to you shortly.

Best regards,
Stepan
Tempo (the Structure app vendor)

zephyrus.mckinnon January 25, 2024

@Stepan Kholodov _Tempo_

How would this solve the issue? This would make it manual would it not? 

Also you didn't explain how I would approach that solve?

zephyrus.mckinnon January 26, 2024

To be able to use manual folders with an insert generator, you cannot use automation generation... meaning that everything will not be automatically populated into folders correctly. This is a nightmare. 

Is there another way, outside of structure, somewhere in Jira, I can achieve the results I am looking for?

zephyrus.mckinnon January 26, 2024

Is there a way to automatically do any of this? Or is a manual input the only way?

Suggest an answer

Log in or Sign up to answer