From e158e4ad83f62e8ae5dd9bf4506f0f859fa09862 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 14:47:28 +0530 Subject: [PATCH 1/3] chore: remove mergify from release notes (backport #1783) (#1786) (cherry picked from commit 1a2ece2968612c1c036a135f8ebcf6916057bf5d) Co-authored-by: Rucha Mahabal --- .github/workflows/release_notes.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release_notes.yml b/.github/workflows/release_notes.yml index 77e6470dea..0c730444cf 100644 --- a/.github/workflows/release_notes.yml +++ b/.github/workflows/release_notes.yml @@ -29,7 +29,11 @@ jobs: steps: - name: Update notes run: | - NEW_NOTES=$(gh api --method POST -H "Accept: application/vnd.github+json" /repos/frappe/hrms/releases/generate-notes -f tag_name=$RELEASE_TAG | jq -r '.body' | sed -E '/^\* (chore|ci|test|docs|style)/d' ) + NEW_NOTES=$(gh api --method POST -H "Accept: application/vnd.github+json" /repos/frappe/hrms/releases/generate-notes -f tag_name=$RELEASE_TAG \ + | jq -r '.body' \ + | sed -E '/^\* (chore|ci|test|docs|style)/d' \ + | sed -E 's/by @mergify //' + ) RELEASE_ID=$(gh api -H "Accept: application/vnd.github+json" /repos/frappe/hrms/releases/tags/$RELEASE_TAG | jq -r '.id') gh api --method PATCH -H "Accept: application/vnd.github+json" /repos/frappe/hrms/releases/$RELEASE_ID -f body="$NEW_NOTES" From 05ed0048a8a688bb796d4d7f541d79c7b22ed3df Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 16 May 2024 14:44:55 +0530 Subject: [PATCH 2/3] fix: added missing args (cherry picked from commit 5a644d0be13e1cd0e82be6fff3cf49ae813445bc) --- hrms/overrides/employee_payment_entry.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/hrms/overrides/employee_payment_entry.py b/hrms/overrides/employee_payment_entry.py index 59bace8da9..5d86d329c7 100644 --- a/hrms/overrides/employee_payment_entry.py +++ b/hrms/overrides/employee_payment_entry.py @@ -41,7 +41,11 @@ def set_missing_ref_details( continue ref_details = get_payment_reference_details( - d.reference_doctype, d.reference_name, self.party_account_currency + d.reference_doctype, + d.reference_name, + self.party_account_currency, + self.party_type, + self.party, ) # Only update exchange rate when the reference is Journal Entry @@ -201,11 +205,15 @@ def get_paid_amount_and_received_amount( @frappe.whitelist() -def get_payment_reference_details(reference_doctype, reference_name, party_account_currency): +def get_payment_reference_details( + reference_doctype, reference_name, party_account_currency, party_type=None, party=None +): if reference_doctype in ("Expense Claim", "Employee Advance", "Gratuity"): return get_reference_details_for_employee(reference_doctype, reference_name, party_account_currency) else: - return get_reference_details(reference_doctype, reference_name, party_account_currency) + return get_reference_details( + reference_doctype, reference_name, party_account_currency, party_type, party + ) @frappe.whitelist() From cef40bd8e9016e2b507bfd29f8c99b8e91e87aec Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 12:21:40 +0530 Subject: [PATCH 3/3] fix(Interview Feedback): type cast user input for "rating" field to float (backport #1799) (#1801) (cherry picked from commit cb8ac7e28c18c57d16ceee11feffd97707fdaa7a) Co-authored-by: Viny Selopal <52369157+vinyselopal@users.noreply.github.com> --- hrms/hr/doctype/interview_feedback/interview_feedback.py | 2 +- hrms/hr/doctype/interview_feedback/test_interview_feedback.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hrms/hr/doctype/interview_feedback/interview_feedback.py b/hrms/hr/doctype/interview_feedback/interview_feedback.py index 1c1c2f8458..ed80f9a5c8 100644 --- a/hrms/hr/doctype/interview_feedback/interview_feedback.py +++ b/hrms/hr/doctype/interview_feedback/interview_feedback.py @@ -58,7 +58,7 @@ def calculate_average_rating(self): total_rating = 0 for d in self.skill_assessment: if d.rating: - total_rating += d.rating + total_rating += flt(d.rating) self.average_rating = flt( total_rating / len(self.skill_assessment) if len(self.skill_assessment) else 0 diff --git a/hrms/hr/doctype/interview_feedback/test_interview_feedback.py b/hrms/hr/doctype/interview_feedback/test_interview_feedback.py index 6e9642a0e6..e9b9222669 100644 --- a/hrms/hr/doctype/interview_feedback/test_interview_feedback.py +++ b/hrms/hr/doctype/interview_feedback/test_interview_feedback.py @@ -49,7 +49,7 @@ def test_average_ratings_on_feedback_submission_and_cancellation(self): total_rating = 0 for d in feedback_1.skill_assessment: if d.rating: - total_rating += d.rating + total_rating += flt(d.rating) avg_rating = flt( total_rating / len(feedback_1.skill_assessment) if len(feedback_1.skill_assessment) else 0