Uploaded image for project: 'Jira Service Management Cloud'
  1. Jira Service Management Cloud
  2. JSDCLOUD-12831

Automation smart value math functions do not work on the Assets object and field Integer attributes

    • 2
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Summary

      Automation functions don't work on the Assets attributes.

      The math functions don't work on the Assets object and field Integer attributes:

      Steps to Reproduce

      1. Add an Integer attribute to one of the object types and set a value for an object
      2. Create an automation rule that multiplies the amount by 10

      Expected Results

      Able to use the math function multiply:

      {{issue.AssetsCustomFieldName.AttributeName.multiply(10)}}
      OR {{object.AttributeName.AttributeName.multiply(10)}}

      Actual Results

      The math functions don't work on the Assets Integer attributes. The below smart value is empty:

      {{issue.AssetsCustomFieldName.AttributeName.multiply(10)}}
      {{issue.AssetsCustomFieldName.AttributeName.asNumber}} 

      While the below smart value returns the date:

      {{issue.AssetsCustomFieldName.AttributeName}}

      Workaround

      The following knowledge base article details workarounds for this bug as well as other automation functions impacted in a similar way: Workaround for using smart value functions with Assets data in Automations

      An example use of the workaround mentioned in the article:

      1. Create a variable "amount" to store the amount value:
        {{issue.AssetsCustomFieldName.AttributeName}}
      2. Then use the below functions on the variable name:
        {{amount.asNumber.multiply(10)}}

            [JSDCLOUD-12831] Automation smart value math functions do not work on the Assets object and field Integer attributes

            Andreas Jagel added a comment - - edited

            I have a similar issue, just a different function.

            The smart value is defined as "object."End of Life".plusMonths(object."Renewal Cycle in Months")".
            The "End of Life" attribute is of type Default:Date and is set to 30. Sep 2023.
            The "Renewal Cycle in Months" attribute is of type Default:Integer and is set to 1.
            The result is printed as an empty string. If I exchange the 'object."Renewal Cycle in Months"' reference for a static 1, it evaluates as expected to 30. Oct 2023.

            I expect the above smart value to also evaluate to 30. Oct 2023 with the given object state.

            Luckily the workaround did work for me. 

            Andreas Jagel added a comment - - edited I have a similar issue, just a different function. The smart value is defined as " object."End of Life".plusMonths(object."Renewal Cycle in Months") ". The "End of Life" attribute is of type Default:Date and is set to 30. Sep 2023. The "Renewal Cycle in Months" attribute is of type Default:Integer and is set to 1. The result is printed as an empty string. If I exchange the 'object."Renewal Cycle in Months"' reference for a static 1, it evaluates as expected to 30. Oct 2023. I expect the above smart value to also evaluate to 30. Oct 2023 with the given object state. Luckily the workaround did work for me. 

              7260236ab89d Justin King
              skahol Swati Kahol
              Votes:
              10 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: