Skip to content

fix: Lock duration in extension task history action text and test cas…#7214

Merged
ramyaragupathy merged 1 commit into
developfrom
fix/extension-duration
Apr 20, 2026
Merged

fix: Lock duration in extension task history action text and test cas…#7214
ramyaragupathy merged 1 commit into
developfrom
fix/extension-duration

Conversation

@prabinoid
Copy link
Copy Markdown
Collaborator

…es refactor/fix

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation
  • 🧑‍💻 Refactor
  • ✅ Test
  • 🤖 Build or CI
  • ❓ Other (please specify)

Related Issue

Fixes #6014

Describe this PR

Refactor of #7044

The action text was missing in EXTEND_FOR_MAPPING and EXTEND_FOR_VALIDATION actions which were later introduced.

Previously, all the Task actions and status were same so the based on the current task status the actions were being patched in the action text accordingly. However, in case of extending mapping or validation, the equivalent status weren't there due to which no tasks were being fetched and hence the timestamps was not being patched.

The task is always relocked when the session is expired for mapping or validation. This causes redundant entries for extension in the history table. These redundant entries are recursively deleted and only one entry is patched with the total extended time.
This recursive deletion function is legacy code which was introduced due to race condition creating multiple entries. This handles the multiple redundant entries for extension currently though this relock mechanism needs to be handled.

Ideal scenario for multiple extension of task duration would be, everytime the task is relocked, the extended session is patched and then again the task is locked and extended for the next phase of extension.

The test cases are refactored too as previously, the test cases didn't check the last entry of the task history but instead just checked the task status. Now when it tried to fetch the last entry, the tests that directly updated the status with sql, now didn't find the history entry and hence were refactored accordingly.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 3, 2026

@ramyaragupathy
Copy link
Copy Markdown
Member

Test by @manjitapandey in Naxa' dev setup. Merging it to develop branch for further testing

@ramyaragupathy ramyaragupathy merged commit 5a2c363 into develop Apr 20, 2026
15 checks passed
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.

[BUG] Missing Task Lock Extension Duration in Action Text Column

2 participants