Skip to content

Conversation

@MrHinsh
Copy link
Member

@MrHinsh MrHinsh commented Jun 16, 2025

This pull request introduces a new FieldCalculationMap feature to the field mapping tool, enabling dynamic calculations for fields based on custom expressions and parameters. It also updates documentation and enhances code logic to support this feature.

Feature Implementation: FieldCalculationMap

  • Added a new field mapping type, FieldCalculationMap, in appsettings.json. This allows calculations like [effort] * [rate] using parameters (effort and rate) and maps the result to a target field (Custom.EstimatedCost). [1] [2]

Documentation Updates

  • Updated reference.fieldmaps.fieldcalculationmap.yaml and reference.tools.fieldmappingtool.yaml to include examples and samples for the FieldCalculationMap configuration. [1] [2] [3]
  • Revised reference.fieldmaps.fieldcalculationmap.md and reference.tools.fieldmappingtool.md to provide detailed code samples and descriptions for the new mapping type. [1] [2] [3]

Code Logic Enhancement

  • Enhanced ConvertSectionWithPathToJson in ClassDataLoader.cs to ensure ObjectName and OptionFor properties are added only if they are missing in the JSON object. This prevents redundant additions and ensures cleaner data handling.

MrHinsh added 2 commits June 16, 2025 13:21
…ew calculation map

Add a new `FieldCalculationMap` to calculate `Custom.EstimatedCost`
based on `Custom.EstimatedHours` and `Custom.HourlyRate`. This change
enables automatic cost estimation for work items of type "Bug" and
"Task", improving project management and budgeting capabilities. The
reordering of field maps ensures logical grouping and processing order.
…entation

Introduce a new FieldCalculationMap feature to the configuration,
allowing calculations based on field values. This enhances the
flexibility of field mapping by enabling dynamic calculations
for fields like Custom.EstimatedCost. The documentation is updated
to include examples and descriptions of the new feature, ensuring
users understand how to implement and utilize it effectively. The
removal of the redundant appsettings.json in the ConsoleDataGenerator
streamlines the configuration process.
@MrHinsh MrHinsh self-assigned this Jun 16, 2025
@MrHinsh MrHinsh enabled auto-merge June 16, 2025 12:23
@MrHinsh MrHinsh merged commit 9f7ae56 into main Jun 16, 2025
14 checks passed
@MrHinsh MrHinsh deleted the add-example-for-FieldCalculateionMap branch June 16, 2025 12:59
@nkdagility-actions-bot
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://blue-river-093197403-2750.westeurope.5.azurestaticapps.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants