Uploaded image for project: 'Fluid Infusion'
  1. Fluid Infusion
  2. FLUID-5891

Update the valuemapper to support new semantics

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      As can be seen from the notes here (https://pad.gpii.net/mypads/?/mypads/group/technical-discussions-4g920a3/pad/view/valuemapper-transformer-fixup-5na2088) , we will update the valueMapper to support the semantics described in the below. Most important is that the `options` block will be renamed to `match`, we will allow for a top-level `noMatch` key that will be used (if present) if nothing matches in the `match` directive. We will no longer support `defaultInputValue` and `undefinedInputValue`.

      For full details on the new format, refer to these notes: https://pad.gpii.net/mypads/?/mypads/group/technical-discussions-4g920a3/pad/view/valuemapper-transformer-fixup-5na2088 (and the documentation once this JIRA is complete)

      An example of the format is given here:

      {
          type: "fluid.transforms.valueMapper",
          inputPath/input: <path of value to map against>,
          defaultOutputPath: <outputPath to use if none is provided at the match/noMatch level>,
          defaultOutputValue: <outputValue to use if none is provided at the match/noMatch level>,
          match: [{
              partialMatches: <If true, this will allowing matching the inputValue partially>,
              outputUndefinedValue: <If true, the outputValue will be `undefined` -- TRUMPS outputValue>,
              inputValue: <the value to match against>,
              outputValue: <value to output if inputValue is matched. If outputUndefinedValue is given, outputValue will not be used>,
              outputPath: <path to output to>
          }],
          noMatch: {
              outputUndefinedValue: <If true, the outputValue will be `undefined` -- TRUMPS outputValue>,
              outputValue: <value to output if inputValue is matched. If outputUndefinedValue is given, outputValue will not be used>,
              outputPath: <path to output to>
          }
      };
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kaspermarkus Kasper Galschiot Markus
              Reporter:
              kaspermarkus Kasper Galschiot Markus
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: