dosubot[bot] commented on issue #7886: URL: https://github.com/apache/incubator-devlake/issues/7886#issuecomment-2285658199
<!-- Greeting --> Hello @SushmitaMahapatra23! I'm here to assist you with any bugs, questions, or contributions you may have for the DevLake repository. I'm a bot designed to help you while you wait for a human maintainer. <!-- Answer --> The `timeAfter` parameter in the DevLake sync API is not functioning as expected and instead using the time range configured in the config-ui because the synchronization policy set in the Config UI takes precedence over API parameters. The Config UI allows users to specify the sync frequency, time range, and other options, which are then used during the data collection process. According to the DevLake documentation, the synchronization policy includes a "Time Filter" that allows users to select the desired time range for syncing data. This configuration is applied when the data collection process is initiated, overriding any `timeAfter` parameter passed directly to the API <sup>[[1]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.21/Configuration/Tutorial.md)</sup><sup>[[2]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.19/Configuration/Tutorial.md)</sup><sup>[[3]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.18/Configuration/Tutorial.md)</sup><sup>[[4]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.20/Configuration/Tutorial.md)</sup>. Additionally, the UI components such as `DatePicker` and quick selection `Tag` elements update the `timeAfter` value based on user interactions, which further ensures that the time range configured in the UI is used during synchronization <sup>[[5]](https://github.com/apache/incubator-devlake/blob/main/config-ui/src/routes/blueprint/detail/components/sync-policy/index.tsx)</sup>. For debugging, you can refer to the test cases in `TestSubtaskStateManager`, which verify the behavior of the `timeAfter` parameter under various conditions. These test cases can help trace the handling of the `timeAfter` parameter during a sync request <sup>[[6]](https://github.com/apache/incubator-devlake/blob/main/backend/helpers/pluginhelper/api/collector_state_manager_test.go)</sup><sup>[[7]](https://github.com/apache/incubator-devlake/blob/main/backend/helpers/pluginhelper/api/subtask_state_manager_test.go)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
