-
Notifications
You must be signed in to change notification settings - Fork 656
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #686 from frappe/version-14-hotfix
- Loading branch information
Showing
9 changed files
with
262 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# This action: | ||
# | ||
# 1. Generates release notes using github API. | ||
# 2. Strips unnecessary info like chore/style etc from notes. | ||
# 3. Updates release info. | ||
|
||
# This action needs to be maintained on all branches that do releases. | ||
|
||
name: 'Release Notes' | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag_name: | ||
description: 'Tag of release like v13.0.0' | ||
required: true | ||
type: string | ||
release: | ||
types: [released] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
regen-notes: | ||
name: 'Regenerate release notes' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Update notes | ||
run: | | ||
NEW_NOTES=$(gh api --method POST -H "Accept: application/vnd.github+json" /repos/frappe/frappe/releases/generate-notes -f tag_name=$RELEASE_TAG | jq -r '.body' | sed -E '/^\* (chore|ci|test|docs|style)/d' ) | ||
RELEASE_ID=$(gh api -H "Accept: application/vnd.github+json" /repos/frappe/frappe/releases/tags/$RELEASE_TAG | jq -r '.id') | ||
gh api --method PATCH -H "Accept: application/vnd.github+json" /repos/frappe/frappe/releases/$RELEASE_ID -f body="$NEW_NOTES" | ||
env: | ||
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
RELEASE_TAG: ${{ github.event.inputs.tag_name || github.event.release.tag_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -331,7 +331,7 @@ def test_skip_marking_absent_on_a_holiday(self): | |
) | ||
self.assertIsNone(attendance) | ||
|
||
def test_skip_marking_absent_for_a_fallback_default_shift(self): | ||
def test_skip_absent_marking_for_a_fallback_default_shift(self): | ||
""" | ||
Tests if an employee is not marked absent for default shift | ||
when they have a valid shift assignment of another type. | ||
|
@@ -366,6 +366,21 @@ def test_skip_marking_absent_for_a_fallback_default_shift(self): | |
) | ||
self.assertEqual(attendance, "Present") | ||
|
||
def test_skip_absent_marking_for_inactive_employee(self): | ||
from hrms.hr.doctype.employee_checkin.test_employee_checkin import make_checkin | ||
|
||
shift = setup_shift_type() | ||
employee = make_employee("[email protected]", company="_Test Company") | ||
date = getdate() | ||
make_shift_assignment(shift.name, employee, date) | ||
|
||
# mark employee as Inactive | ||
frappe.db.set_value("Employee", employee, "status", "Inactive") | ||
|
||
shift.process_auto_attendance() | ||
attendance = frappe.db.get_value("Attendance", {"employee": employee}, "status") | ||
self.assertIsNone(attendance) | ||
|
||
def test_get_start_and_end_dates(self): | ||
date = getdate() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.