---
title: "How to use JQL to find issues to update"
canonical: "https://support.appfire.com/space/SUPPORT/89137215/How%20to%20use%20JQL%20to%20find%20issues%20to%20update"
format: markdown
---
# Summary

When transitioning an issue, you may need to update other issues with information from the issue being transitioned. Any issue(s) that can be found by a JQL query are easy to update. More than one issue can be updated with a single post function provided the update that is needed is the same for all issues, otherwise, multiple post functions would need to be used.

# Steps

> Macro (table-plus)
> 
> | **Step** | **Discussion** | **Examples** |
> | --- | --- | --- |
> | Add an [Update issues](https://appfire.atlassian.net/wiki/pages/createpage.action?spaceKey=support&title=Update%20issues&linkCreation=true&fromPageId=89137215) post function to the appropriate workflow transition | - Assumes you have installed the [Update on Transition for Jira](https://appfire.atlassian.net/wiki/spaces/CW) add-on |  |
> | Create a JQL query that retrieves the issues that need to be updated | - Test the JQL in the Issue Navigator first.
> - If you are using substitution variables, make sure values with blanks are quoted.
> - Use an ORDER BY clause if it is important to find only the first issue satisfying the query. | - **labels = cw order by key ** |
> | Put the working JQL query in the JQL Query field |  |  |
> | Add the JQL result to the **Issue entries to update** field | - Determine if you want all issues matching the JQL or just the first one.
> - Select the appropriate replacement JQL based replacement variable. | - **%jql_result%** - comma separated list of issue keys matching query
> - **%jql_result_1%** - first issue matching the query |
> | Set fields to be updated based on absolute values or [Substitution variables](https://appfire.atlassian.net/wiki/pages/createpage.action?spaceKey=support&title=Substitution%20variables&linkCreation=true&fromPageId=89137215) |  |  |
> | If necessary, add conditions | - See [How to use pattern matching conditioning](https://appfire.atlassian.net/wiki/display/CW/How+to+use+pattern+matching+conditioning) |  |
> | Save the post function |  |  |
> | Run a test scenario | - Use [How to get problem determination information](https://appfire.atlassian.net/wiki/display/CW/How+to+get+problem+determination+information) to debug your scenario if necessary.
> - JQL errors will be logged. Note: This is the most common cause for not getting the expected updates.
> - Remember, the JQL query runs under the user's permission unless you are using **Acting user** support. |  |