---
title: "admAddGroupsToGroup"
canonical: "https://support.appfire.com/space/PSJ/15489822/admAddGroupsToGroup"
format: markdown
---
> Macro (aura-html)


|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | addGroupsToGroup(groupsToJoin, childNames) | **Package** | adm |
| **Alias** | addGroupsToGroup | **Pkg Usage** | addGroupsToGroup(groupsToJoin, childNames) |

## Description

> Macro (excerpt)
> 
> Add the provided groups to the specified groups if they are not already added.

Add the provided groups to the specified groups if they are not already added.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| Groups to join | Array of strings | Yes | Group names that the child group should be added to. |
| Child names | Array of strings | Yes | Child names that identifies the child groups to be added to the groups. |

## Return Type

**Boolean**

Returns "true" if operation succeeded.

## Examples

### Example 1

```
addGroupsToGroup("ParentGroup", "ChildGroup");
```

Result: The "ChildGroup" will be added as child to the "ParentGroup".

### Example 2

```
addGroupsToGroup({"Group1","Group2","Group3"}, {"Child1","Child2"});
```

Result: "Child1", "Child2" will be added as child groups for "Group1","Group2","Group3".

> ⚠️ In order to allow Jira to handle nested groups you would need first to enable or disable support for nested groups on each directory individually. Select **User Directories** from the JIRA administration menu, **edit** the directory and select **Enable Nested Groups** See [Configuring user directories](https://confluence.atlassian.com/adminjiraserver073/configuring-user-directories-861253197.html).

## See also

> Macro (contentbylabel)