Uploaded image for project: 'old - Metadata for JIRA'
  1. JM-48

How to Copy Calc. Metadata Field to custom field using POST Function

    Details

    • Type: Support Request
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: None
    • Fix versions: None
    • Components: None
    • Labels:
      None
    • Sprint:

      Description

      Hi Andreas!
      We are struggling using the calc. metadata field for project wide information which we want to copy into a customfield on the "CREATE" trigger in our workflow.

      background: we have a metadata variable "crmid" which we want to copy to a certain customfield on creation of the ticket (but only if this customfield was not set by our helpdesk team).

      I created a calc. metadata customfield (helper.crmid) which is:
      #set( $tcrmid = $metadataService.getMetadataValue($issue.projectObject, 'crmid') ) $tcrmid

      and when I display it on the default screen it works and display the respective crmid which is set of the issue's project.

      But when we create a post function on "Create" in our workflow and copy the value from field helper.crmid to certain customfield, we end up with the exact code of the helperfield in our customfield (see above) and not the awaited calculated result (e.g.=2).

      How can we get this working?

        Attachments

          Activity

            People

            • Assignee:
              aspall Andreas Spall (evolu.software)
              Reporter:
              removed6 Former user (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: