diff --git a/.github/workflows/prlinked.yml b/.github/workflows/prlinked.yml deleted file mode 100644 index 84037c8..0000000 --- a/.github/workflows/prlinked.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Move Linked Issues - -on: - pull_request: - types: - - opened - - synchronize - - reopened - -jobs: - get-date: - runs-on: ubuntu-latest - outputs: - project_name_prefix: ${{ steps.format_date.outputs.formatted_date }} - steps: - - name: Get PR creation date - id: format_date - run: | - # Extract the month and year from the PR creation date - PR_DATE="${{ github.event.pull_request.created_at }}" - FORMATTED_DATE=$(date -d "$PR_DATE" "+%B %Y") # Format to Month Year - - # Debugging: print out the formatted date - echo "Formatted Date: ${FORMATTED_DATE} Sprint" - - # Set output using the Environment File method - echo "formatted_date=${FORMATTED_DATE} Sprint" >> $GITHUB_OUTPUT # Set the output for later jobs - - debug-date: - needs: get-date - runs-on: ubuntu-latest - steps: - - name: Debug the outputs - run: | - echo "PR Number: ${{ github.event.pull_request.number }}" - echo "Project Column Name: Review" - echo "Project Name Prefix (from get-date job output): ${{ needs.get-date.outputs.project_name_prefix }}" # Access the output correctly - - move-issues: - needs: get-date - uses: TransactionProcessing/org-ci-workflows/.github/workflows/move-linked-issue.yml@main - with: - pr_number: ${{ github.event.pull_request.number }} - project_column_name: "Review" - project_name_prefix: ${{ needs.get-date.outputs.project_name_prefix }} # Access the output from get-date job - secrets: - gh_token: ${{ secrets.GH_TOKEN }} diff --git a/EstateReportingAPI.BusinessLogic/ReportingManager.cs b/EstateReportingAPI.BusinessLogic/ReportingManager.cs index 0ff7b0e..0cfcca3 100644 --- a/EstateReportingAPI.BusinessLogic/ReportingManager.cs +++ b/EstateReportingAPI.BusinessLogic/ReportingManager.cs @@ -1157,7 +1157,7 @@ public async Task> GetProductPerformanceRepor using ResolvedDbContext? resolvedContext = this.Resolver.Resolve(EstateManagementDatabaseName, request.EstateId.ToString()); await using EstateManagementContext context = resolvedContext.Context; - var grandTotalAmountQuery = (from t in context.Transactions where t.TransactionType == "Sale" && t.TransactionDate >= new DateTime(2025, 12, 21) && t.TransactionDate <= new DateTime(2025, 12, 25) select t.TransactionAmount); + var grandTotalAmountQuery = (from t in context.Transactions where t.TransactionType == "Sale" && t.TransactionDate >= request.StartDate && t.TransactionDate <= request.EndDate select t.TransactionAmount); var grandTotalAmountResult = await ExecuteQuerySafeSum(grandTotalAmountQuery, cancellationToken); if (grandTotalAmountResult.IsFailed) return ResultHelpers.CreateFailure(grandTotalAmountResult); diff --git a/EstateReportingAPI.IntegrationTests/TransactionsEndpointTests.cs b/EstateReportingAPI.IntegrationTests/TransactionsEndpointTests.cs index 914a1a9..b2848ae 100644 --- a/EstateReportingAPI.IntegrationTests/TransactionsEndpointTests.cs +++ b/EstateReportingAPI.IntegrationTests/TransactionsEndpointTests.cs @@ -938,6 +938,7 @@ public async Task TransactionsEndpoint_ProductPerformanceReport_SummaryDataRetur productPerformanceResponseDetail.ShouldNotBeNull(); productPerformanceResponseDetail.TransactionCount.ShouldBe(transactions.Count(t => t.ContractProductId == product.productId)); productPerformanceResponseDetail.TransactionValue.ShouldBe(transactions.Where(t => t.ContractProductId == product.productId).Sum(t => t.TransactionAmount)); + productPerformanceResponseDetail.PercentageOfTotal.ShouldNotBe(0); } }