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 Missing task extension duration in action_text. #6046

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

Aadesh-Baral
Copy link
Contributor

@Aadesh-Baral Aadesh-Baral commented Sep 1, 2023

closes #6014

In the previous implementation, there was an issue where the duration of a task extension was not being recorded when a task was extended and then unlocked/stopped. Prior to the implementation of the task lock extension feature, the last recorded action for a task was always either "LOCKED_FOR_MAPPING" or "LOCKED_FOR_VALIDATION," which matched the task status. To update the duration, we used the current task status as the last action to filter the task history and update the last entry with the lock duration.

However, after the task extension feature was introduced, two additional last actions were possible: "EXTENDED_FOR_MAPPING" and "EXTENDED_FOR_VALIDATION." This introduced a discrepancy between the last recorded action and the task status. For example, the task status could still be "LOCKED_FOR_MAPPING" even when a user had extended the task. As a result, the entry with the action "EXTENDED_FOR_MAPPING" in the task history was not being updated with the correct duration.

To address this issue, this PR fixes the problem by retrieving the last task action and using it as the filter criteria for updating the task history, rather than relying on the task status as the last action.

Cases:

  • Task is stopped mapping/validating after extension. -> The entry with extension is updated with extension duration.
  • Task's state is changed after extension. -> The entry with extension is updated with duration and new entry with state changed is added.
  • Task's lock is extended multiple times. -> After each extension previous entry with extension is updated with the duration and new entry with extension is added.
  • Task is auto unlocked after extension. -> The entry with extension is updated with duration and name of the action is changed from "EXTENDED_FOR_MAPPING" to "AUTO_UNLOCKED_FOR_MAPPING".

------------------

In the previous implementation, there was an issue where the duration of a task extension was not being recorded when a task was extended and then unlocked/stopped. Prior to the implementation of the task lock extension feature, the last recorded action for a task was always either "LOCKED_FOR_MAPPING" or "LOCKED_FOR_VALIDATION," which matched the task status. To update the duration, we used the current task status as the last action to filter the task history and update the last entry with the lock duration.

However, after the task extension feature was introduced, two additional last actions were possible: "EXTENDED_FOR_MAPPING" and "EXTENDED_FOR_VALIDATION." This introduced a discrepancy between the last recorded action and the task status. For example, the task status could still be "LOCKED_FOR_MAPPING" even when a user had extended the task. As a result, the entry with the action "EXTENDED_FOR_MAPPING" in the task history was not being updated with the correct duration.

To address this issue, this commit fixed the problem by retrieving the last task action and using it as the filter criteria for updating the task history, rather than relying on the task status as the last action.
@Aadesh-Baral Aadesh-Baral force-pushed the fix/6014-lock-extension-duration branch from bc470a9 to 0f5b2eb Compare September 1, 2023 08:20
@Aadesh-Baral Aadesh-Baral marked this pull request as ready for review September 4, 2023 10:55
@Aadesh-Baral Aadesh-Baral force-pushed the fix/6014-lock-extension-duration branch from 9be84f2 to 4f9be01 Compare September 4, 2023 11:28
@sonarcloud
Copy link

sonarcloud bot commented Sep 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ramyaragupathy
Copy link
Member

@Aadesh-Baral - could you confirm if this is ready for review? cc @kaditya97 @prabinoid @manjitapandey

@Aadesh-Baral
Copy link
Contributor Author

@ramyaragupathy Sorry for late reply, Yes this is ready for review 😄

@ramyaragupathy
Copy link
Member

@Aadesh-Baral - would you be able to fix the merge conflicts so that we can get this on production? I think it will be of great value to the stats.

cc @prabinoid @manjitapandey @royallsilwallz

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