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

Chore: Roster Automation for next month #3922

Merged
merged 4 commits into from
Jan 13, 2025
Merged

Chore: Roster Automation for next month #3922

merged 4 commits into from
Jan 13, 2025

Conversation

yusuffGoodie
Copy link
Contributor

Is this a Feature, Chore or Bug?

  • [] Feature
  • Chore
  • [] Bug

Clearly and concisely describe the feature, chore or bug.

https://www.pivotaltracker.com/n/projects/2727932/stories/188752915

Analysis and design (optional)

Analyse and attach the design documentation

Solution description

Describe your code changes in detail for reviewers.

Is there a business logic within a doctype?

- [] Yes
- [x] No

Output screenshots (optional)

Post the output screenshots, if a UI is affected or added due to this feature.

Areas affected and ensured

List out the areas affected by your code changes.

Is there any existing behavior change of other features due to this code change?

Mention Yes or No. If Yes, provide the appropriate explanation.

Did you test with the following dataset?

  • Existing Data
  • [] New Data

Was child table created?

- [] is attachment required?
    did you test attachment

Did you delete custom field?

- [] Yes
- [x] No
    If yes, did you write a delete patch?

Is patch required?

  • [] Yes
  • No

    Was the patch test?

Which browser(s) did you use for testing?

  • Chrome
  • [] Safari
  • [] Firefox

@yusuffGoodie yusuffGoodie requested a review from ks093 January 8, 2025 16:29
@@ -1457,6 +1457,7 @@ def create_or_update_schedule_for_employee(employee, date, availability, operati
schedule_doc.end_datetime = end_datetime
schedule_doc.modified_by = owner
schedule_doc.modified = creation
schedule_doc.reload()
Copy link
Collaborator

Choose a reason for hiding this comment

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

@yusuffGoodie Any particular reason for doc.reload over here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used doc.reload() because when an employee schedule already exists, attempting to update it throws an error stating that the document already exists. By using doc.reload(), I ensure the document is refreshed with the latest state from the database, resolving conflicts before saving.

@ks093 ks093 merged commit a8639e7 into staging Jan 13, 2025
2 checks passed
@ks093 ks093 deleted the roster-automation branch January 13, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants