Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:[CORE-1836] fix for invalid age return for closed violations in /… #2092

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

raviteja-mandala
Copy link
Contributor

…issues api (#1683)

Description

  1. Age for closed violations is calculated as current date - created date. I updated age as closeddate - createddate.
  2. In violation details screen, age of the violation is calculated in FE as (currentdate - violation creation date). This is because age field is not passed in /policyViolationDetails api response.
    In this PR, 'age' field is added to the api response and it should be used to display age in UI instead of calculating at FE.

ce-age-for-closed-violations
ce-policy-violation-details-age

Please include a summary of the changes and the related issues. Please also include relevant motivation and context. List
any dependencies that are required for this change.

Problem

Solution

Fixes # (issue if any)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Chore (no code changes)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also
list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • My code follows the style guidelines of this project
  • My commit message/PR follows the contribution guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Other Information:

List any documentation updates that are needed for the Wiki

Copy link

sonarqubecloud bot commented Feb 6, 2024

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

Successfully merging this pull request may close these issues.

3 participants