Skip to content

Conversation

@mpgxvii
Copy link
Member

@mpgxvii mpgxvii commented Dec 4, 2025

  • Currently, when a user gets created or updated, the task schedule for them gets automatically generated
  • This update will remove this and the separate /schedule endpoint can simply get called
  • This has also been causing delays in active app enrolment

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Dec 4, 2025
@dosubot
Copy link

dosubot bot commented Dec 4, 2025

Related Documentation

Checked 1 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@dosubot dosubot bot added the java Pull requests that update Java code label Dec 4, 2025
Copy link
Member

@this-Aditya this-Aditya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Pauline, please see the comments inline. Other than that, this PR looks good. Thanks.

I'll make sure to add this in the latest version as well

Comment on lines -199 to -203
if (!user.getAttributes().equals(userDto.getAttributes())
|| !user.getTimezone().equals(userDto.getTimezone())
|| !user.getEnrolmentDate().equals(userDto.getEnrolmentDate())
|| !user.getLanguage().equals(userDto.getLanguage()))
{
Copy link
Member

@this-Aditya this-Aditya Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not wrong, the /schedule endpoint will be called by the questionnaire app. Do we have checks in the app to ensure that this endpoint is only called when updating the user, and only if these properties don’t match?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes the user will be calling the update endpoint from the app anyway so they can just call the schedule endpoint afterwards. We can make the updates afterwards in a separate PR since we have not enabled the app server scheduling yet for users.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh okay, Thanks.

Comment on lines -168 to -169
// Generate schedule for user
this.scheduleService.generateScheduleForUser(savedUser);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any use of the schedulerService variable, this can be removed.

Copy link
Member

@this-Aditya this-Aditya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 4, 2025
@this-Aditya this-Aditya merged commit bb202f6 into dev Dec 4, 2025
8 of 9 checks passed
@this-Aditya this-Aditya deleted the fix/create-user branch December 4, 2025 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

java Pull requests that update Java code lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants