Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Use case

An Advanced Link field Invoice is used to link invoice issues to an issue representing the vended service. In issue view Advanced Link field is displayed in style Table and a sum of the Paid Amount field from linked invoices is displayed as well.

Requirement

Retrieve the sum of values from the field Paid Amount in linked issues and copy the sum into a custom field with the same name but within the current issue.

image-20240806-143853.png

Solution

An automation rule can be configured to retrieve the linked issues → sum up the values within a specific field → insert the value into a new custom field:

  1. Send a web request to get linked issues (see REST API ).
    (warning) Mark the checkbox to delay execution of subsequent rule actions until automation has received a response for the web request.

    image-20240806-144721.png

  2. Create a variable for the following smart value:
    {{webResponse.body."Deal/Service - Invoice"."Invoiced via".linkedissues}},
    where "Deal/Service - Invoice is the name of the Advanced Link configuration, and "Invoiced via" is the name of the Advanced link (inward/outward).

    image-20240806-144951.png

  3. Look up retrieved issues:

    image-20240806-145308.png
  4. Create a variable for the value of the custom field (in our case, Paid Amount) {{#lookupIssues}},{{customfield_id}} {{/}} :

    image-20240806-145418.png
  5. Summarize the field values with a formula {{sum.substring(1).split(",").sum}}:

    image-20240806-150106.png
  6. Copy the summed-up values into a required field:

    image-20240806-150142.png

  • No labels