# capitalize() in Jira Automation: syntax and examples

URL: https://goingstellar.ro/reference/smart-values/capitalize/

capitalize() turns the first character of a text value into a capital letter and leaves everything after it unchanged. Use it to tidy labels, status names or pasted titles before you put them in a message.

## Syntax

```
{{text.capitalize()}}
```

## Works on

- Fields: any text value, such as a summary, a label or the result of split().
- Returns: the same text with a capital first letter.

## Examples

```
{{issue.labels.first.capitalize()}}
```

Show the first label with a capital letter in a comment.

Result:

```
Checkout
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.summary.toLowerCase().capitalize()}}
```

Normalise a shouting or mixed-case title to sentence case.

Result:

```
Hello world!
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.status.name.toLowerCase().capitalize()}}
```

Write the status name in sentence case.

Result:

```
To do
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.summary.split(" ").last.toLowerCase().capitalize()}}
```

Take the last word of the summary and clean up its capitals.

Result:

```
World!
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.description.toLowerCase().capitalize()}}
```

A long text goes to lower case first, so only the first letter is a capital. Later sentences stay lower case.

Result:

```
Checkout page redesign. customer reported the total is wrong.
```

Run on Jira Cloud on 29 Nov 2026.

## Where the documentation differs

- `{{issue.summary.capitalize()}}`: run on Jira Cloud, 29 Nov 2026: the documentation says `Hello world!`, the actual result is `Hello World!`.

## Pitfalls

- capitalize() does not lower the rest of the text. On `Hello World!` it returns `Hello World!`, where the Atlassian page shows `Hello world!` (checked on Jira Cloud, November 2026). Add `toLowerCase()` before it for sentence case.
- It changes the first character of the whole value only. It does not capitalise each word or the start of each sentence.
- Words after the first keep their case. In the sentence example, `customer` in the second sentence stays lower case.

## Related

- [toLowerCase() and toUpperCase()](https://goingstellar.ro/reference/smart-values/tolowercase-touppercase/)
- [replace(), replaceAll() and remove()](https://goingstellar.ro/reference/smart-values/replace/)
- [split()](https://goingstellar.ro/reference/smart-values/split/)
- [trim()](https://goingstellar.ro/reference/smart-values/trim/)
- [concat()](https://goingstellar.ro/reference/smart-values/concat/)

## Sources

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

