Context Resolution Algorithm

Context Resolution Algorithm

There may be multiple contexts applicable to an issue. The best-matching context is selected for each issue to determine the email template or notification rules that apply to that issue.

Contexts are resolved from the strongest to the weakest match. Here are the steps performed:

  1. Find all Contexts that are configured with a project and an issue type, and iterate through each of them in the order of the Order attribute (see above):

    1. if the Context that is being evaluated has a JQL filter, check if the Issue matches it. If so, we stop processing and use the Context.

    2. If the Context that is being evaluated does not have a JQL filter, we stop processing and use the Context.

  2. If no Context has been found in the previous step, find all Contexts that are configured with an Issue Type but not with a Project, and iterate through each of them in the order of the Order attribute (see above):

    1. if the Context that is being evaluated has a JQL filter, check if the Issue matches it. If so, we stop processing and use the Context.

    2. If the Context that is being evaluated does not have a JQL filter, we stop processing and use the Context.

  3. If no Context has been found in the previous step, find all Contexts that are configured with a Project but not with an Issue Type, and iterate through each of them in the order of the Order attribute (see above):

    1. if the Context that is being evaluated has a JQL filter, check if the Issue matches it. If so, we stop processing and use the Context.

    2. If the Context that is being evaluated does not have a JQL filter, we stop processing and use the Context.

  4. If no Context has been found in the previous step, find all Contexts that are not configured with an Issue Type or a Project, and iterate through each of them in the order of the Order attribute (see above):

    1. if the Context that is being evaluated has a JQL filter, check if the Issue matches it. If so, we stop processing and use the Context.

    2. If the Context that is being evaluated does not have a JQL filter, we stop processing and use the Context.

  5. If no Context has been found in the previous steps, use an implicit default Context.

Examples

This is how contexts are evaluated based on how well they match an issue:

Some examples of contexts are evaluated for an issue:

Last updated