Knowledge Base Articles
Breadcrumbs

Errors when manually changing hierarchy in Structure

This article is for Structure Cloud.

Problem

When I move a work item, or when I try to create a new item or delete an existing item in my structure, I get one of these error messages:

Cannot move work items inside JQL query result.

Cannot add items to JQL query result.

Cannot remove work items from JQL query result.

Corresponding changes via Structure are not allowed.

Solution

If you’re seeing an error message as a result of changing the structure’s hierarchy - e.g. moving items around or deleting/adding items - then the structure is built with generators: https://help.tempo.io/structure/latest/generators and the change you’re trying to make contradicts the rules of the generators. To make the change possible, you should either adjust the generators to support the result of the action, or rebuild the structure in a different way to make the action unnecessary.

  • the ‘Cannot move work items inside JQL query result’ error:

This error can appear when you’re trying to reorder items added by an Insert generator. To change the sorting order of the items in the structure, you need to add a Sort generator: https://help.tempo.io/structure/latest/sort-generators

There are two ways of sorting available:

1. By an existing field’s values, which will cause the items to be sorted automatically based on their individual values in the field (i.e. the manual reordering of items in the structure will not supported, but the items will be ordered in a specific and needed way).
2. By using the Sort by Rank generator with enabled 'Moving items in the structure will update ranks' option in its configuration. This generator will automatically arrange items according to their Agile ranks in Jira, but it will also make it possible to manually move work items in the structure, and updating their ranks in Jira as a result.

  • The ‘Cannot add items to JQL query result' error:

This error can appear when you create a new work item or a flex item in the structure, or try to move a child item to a higher level of the structure. If an Insert generator adds work items to the structure, it is not possible to manually add any items to that list; only items that match the inserter’s query can be present.

If you want to add a flex items to the structure, you would need to create it outside of the scope of the Insert generator’s work items. For example, you can first click on any generator of the structure (above the work items), or on the very last work item on the list, and then create a flex item. The created item will be added underneath the selected row in the structure, and there will be no error as long as the flex item is added before or after the list of the JQL-matching work items.

If you want to create a new work item in the structure, then use the ‘Create’ button at the top of the screen instead of the ‘Add’ feature. This will create a work item in Jira without adding it to the structure. If the newly created work item matches the Insert generator’s query, it will be added to the structure automatically. Otherwise, you might need to adjust the inserter’s query to make it happen.

  • The ‘Cannot remove work items from JQL query result’ error:

This error can appear when you’re trying to delete an item that was added by an Insert generator to the structure. Inserters add items that match a given JQL query, i.e., work items that Jira returns, so deleting an item that matches; then the Insert generator will automatically stop adding it to the structure since the item no longer exists a given JQL query is not possible from the structure. The item should be deleted in Jira - then the Insert generator will automatically stop adding it to the structure since the item is no longer in the scope of the JQL-query.

  • The ‘Corresponding changes via Structure are not allowed’ error:

This error can appear if you move work items between different groups, or move child work items between their parents. In both cases, items appear in their dedicated places in the structure because they are added there by either a Group generator or by an Extend generator. To move such items elsewhere, you need to enable the relevant option in each type of the generators: ‘Moving items in the structure will update groups’ for groupers, ‘Moving an item in the structure will change its parent work item in Jira’ for the Child Work Items extender, and ‘Moving items in the structure will update links’ for the Linked Items extender.

When the relevant generator has the mentioned option enabled, it will become possible to move items between their parent groups/items, and as a result of it, the generator will update the moved item’s Jira data accordingly - either with a new parent/linked item, or with a new value in the corresponding field that the grouper is using.