# triggerIssue, lookupIssues and createdIssue: examples

URL: https://goingstellar.ro/reference/smart-values/triggerissue-lookupissues/

Inside a branch, {{issue}} changes to the related work item. {{triggerIssue}} always points back to the work item that started the rule. {{lookupIssues}} holds the results of a Lookup issues action, and {{createdIssue}} the work item made by a Create action.

## Syntax

```
{{triggerIssue.key}}
{{lookupIssues.first.key}}
{{createdIssue.key}}
```

## Works on

- Fields: every property available on {{issue}}
- Returns: a work item (a list for lookupIssues)

## Examples

```
{{triggerIssue.key}} / {{issue.key}}
```

Outside a branch both point to the same work item. Inside a branch the second one is the related work item.

Result:

```
WEB-48 / WEB-48
```

Run on Jira Cloud on 29 Nov 2026.

```
{{triggerIssue.summary}}
```

Quote the original summary from inside a branch.

Result:

```
Hello World!
```

Run on Jira Cloud on 29 Nov 2026.

```
{{triggerIssue.status.name}}
```

Read any property of the original work item, as with {{issue}}.

Result:

```
To Do
```

Run on Jira Cloud on 29 Nov 2026.

```
{{createdIssue.key}}
```

Empty until a Create action has run; after one, it names the new work item.

Run on Jira Cloud on 29 Nov 2026.

```
{{lookupIssues.size}}
```

Counts the lookup results. It is empty without a Lookup issues action before it.

Run on Jira Cloud on 29 Nov 2026.

## Pitfalls

- {{lookupIssues}} and {{createdIssue}} render empty when no Lookup or Create action ran before the line (checked on Jira Cloud, November 2026), so a test with a manual trigger cannot show real results for them.
- Do not use {{triggerIssue}} when you mean the work item the branch is on. After a branch into a parent or a linked work item, `{{issue}}` is that other work item.
- The documentation describes {{lookupIssues}} as a list, so treat it like one: loop over it or take the first item before you read a field.

## Related

- [{{issue.key}}, {{issue.summary}} and other issue fields](https://goingstellar.ro/reference/smart-values/issue-fields/)
- [{{issue.comments}}](https://goingstellar.ro/reference/smart-values/issue-comments/)
- [{{#list}}…{{/}} iteration](https://goingstellar.ro/reference/smart-values/list-iteration/)
- [first, last, get(), getFromEnd()](https://goingstellar.ro/reference/smart-values/list-first-last-get/)
- [size and isEmpty on lists](https://goingstellar.ro/reference/smart-values/list-size-isempty/)

## Sources

- [Jira smart values: issues (Atlassian Support)](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/)

