Skip to content

chore: sync main into develop (back-merge HR 'Applied for' hotfix)#3869

Open
rathorevaibhav wants to merge 5 commits into
developfrom
chore/sync-main-into-develop
Open

chore: sync main into develop (back-merge HR 'Applied for' hotfix)#3869
rathorevaibhav wants to merge 5 commits into
developfrom
chore/sync-main-into-develop

Conversation

@rathorevaibhav

@rathorevaibhav rathorevaibhav commented Jun 16, 2026

Copy link
Copy Markdown
Member

What

Back-merge of main into develop so develop is in sync with production. The only substantive change main had ahead of develop is the HR AI-evaluation copy hotfix from #3864 (bfe41718c — add "Applied for" job title to the AI-evaluation copy). The other main-only commits were past develop→main release merges.

Changes brought into develop

Additive only, merged cleanly with no conflicts:

  • resources/views/hr/application/copy-for-ai-evaluation.blade.php (+5)
  • Modules/HR/Tests/Feature/CopyForAiEvaluationTest.php (new test, +31)

Direction

This updates develop only. main is left untouched — the production-release PR (develop → main) will be done separately later.

🤖 Generated with Claude Code

rathorevaibhav and others added 5 commits June 2, 2026 15:58
Production deployment - Jun 2
Production deployment - Jun 4
The "Copy candidate details for AI evaluation" button copied the candidate
name, application date, graduation year, and application-form fields, but
omitted the job the candidate applied for. This adds an "Applied for: <job
title>" line (guarded with optional() so it is safe when no job is linked),
matching the order shown on the application details page.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-applied-for

fix: add "Applied for" job title to HR AI-evaluation copy
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The Blade template copy-for-ai-evaluation.blade.php now conditionally appends an "Applied for: <job title>" entry to the $clipboardLines array using optional() on $application->job. A new PHPUnit feature test creates an Applicant, Job, and Application via factories, renders the view, and asserts the output contains the expected string.

Changes

Job Title in AI Evaluation Clipboard

Layer / File(s) Summary
Blade clipboard logic and feature test
resources/views/hr/application/copy-for-ai-evaluation.blade.php, Modules/HR/Tests/Feature/CopyForAiEvaluationTest.php
Blade template conditionally appends "Applied for: ..." to $clipboardLines via optional($application->job); feature test wires up factories, renders the view, and asserts the "Applied for: <job title>" string appears in the HTML output.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🤖 The clipboard grows a little smarter today,
A job title slipped in without delay.
optional() guards against null's cruel bite,
And a factory test confirms it's right.
Small patch, big heart — the AI reads it clear! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes a back-merge from main into develop for an HR feature hotfix, clearly communicating the primary intent and scope of the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/sync-main-into-develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cypress

cypress Bot commented Jun 16, 2026

Copy link
Copy Markdown

Employee portal    Run #9101

Run Properties:  status check passed Passed #9101  •  git commit 54f8c97e71 ℹ️: Merge a29e4e7d1865897315c768ad85c7f88930a76651 into f156130b25b0e39758b869f59795...
Project Employee portal
Branch Review refs/pull/3869/merge
Run status status check passed Passed #9101
Run duration 00m 25s
Commit git commit 54f8c97e71 ℹ️: Merge a29e4e7d1865897315c768ad85c7f88930a76651 into f156130b25b0e39758b869f59795...
Committer Vaibhav Rathore
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4
View all changes introduced in this branch ↗︎

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Modules/HR/Tests/Feature/CopyForAiEvaluationTest.php`:
- Around line 15-30: Add a complementary test method to cover the null job
scenario that the existing test does not address. Create a new test method in
the CopyForAiEvaluationTest class that creates an Application with hr_job_id set
to null (similar to the existing
test_clipboard_text_includes_applied_for_job_title method), passes the required
view variables including applicant and application to the view render call, and
then verifies using assertStringNotContainsString that the "Applied for:" text
does not appear in the rendered HTML output when no job is associated with the
application.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 291919c5-e20a-49e8-8dc3-c75181a4376c

📥 Commits

Reviewing files that changed from the base of the PR and between f156130 and a29e4e7.

📒 Files selected for processing (2)
  • Modules/HR/Tests/Feature/CopyForAiEvaluationTest.php
  • resources/views/hr/application/copy-for-ai-evaluation.blade.php

Comment on lines +15 to +30
public function test_clipboard_text_includes_applied_for_job_title()
{
$applicant = Applicant::factory()->create(['name' => 'Jane Doe']);
$job = Job::factory()->create(['title' => 'Senior Laravel Developer']);
$application = Application::factory()->create([
'hr_applicant_id' => $applicant->id,
'hr_job_id' => $job->id,
]);

$html = view('hr.application.copy-for-ai-evaluation', [
'applicant' => $applicant,
'application' => $application,
])->render();

$this->assertStringContainsString('Applied for: ' . $job->title, $html);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Test should also verify behavior when job is null.

The test verifies the happy path (job title present), but does not test the guard logic (optional() on line 6 of the template). A second test case should verify that the 'Applied for:' line does not appear when $application->job is null.

Consider adding a complementary test:

public function test_clipboard_text_omits_applied_for_when_no_job()
{
    $applicant = Applicant::factory()->create(['name' => 'John Doe']);
    $application = Application::factory()->create([
        'hr_applicant_id' => $applicant->id,
        'hr_job_id' => null,
    ]);

    $html = view('hr.application.copy-for-ai-evaluation', [
        'applicant' => $applicant,
        'application' => $application,
        'applicationFormDetails' => null, // Add missing variable
    ])->render();

    $this->assertStringNotContainsString('Applied for:', $html);
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Modules/HR/Tests/Feature/CopyForAiEvaluationTest.php` around lines 15 - 30,
Add a complementary test method to cover the null job scenario that the existing
test does not address. Create a new test method in the CopyForAiEvaluationTest
class that creates an Application with hr_job_id set to null (similar to the
existing test_clipboard_text_includes_applied_for_job_title method), passes the
required view variables including applicant and application to the view render
call, and then verifies using assertStringNotContainsString that the "Applied
for:" text does not appear in the rendered HTML output when no job is associated
with the application.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report for commit: a29e4e7
File: coverage.xml

Cover ┌─────────────────────────┐ Freq.
   0% │ ███████████████████████ │ 72.7%
  10% │ █░░░░░░░░░░░░░░░░░░░░░░ │  1.6%
  20% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.6%
  30% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.3%
  40% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.6%
  50% │ ██░░░░░░░░░░░░░░░░░░░░░ │  4.7%
  60% │ █░░░░░░░░░░░░░░░░░░░░░░ │  1.2%
  70% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.9%
  80% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.9%
  90% │ ██░░░░░░░░░░░░░░░░░░░░░ │  3.4%
 100% │ █████░░░░░░░░░░░░░░░░░░ │ 13.0%
      └─────────────────────────┘
 *Legend:* █ = Current Distribution 
Summary - Lines: 10.64% | Methods: 11.26%
FilesLinesMethodsBranches
Modules/HR/Console
   JobExpiredEmailToHr.php--100.00%
   QuarterlyReviewSystemForEmployee.php--100.00%
Modules/HR/Console/Recruitment
   ApplicationNoShow.php--100.00%
   DailyMessage.php--100.00%
   MappingOfJobsAndHrRounds.php--100.00%
   MarkApplicationForFollowUp.php--100.00%
   ResetIsLatestApplicationRound.php45.45%66.67%100.00%
   SendFollowUpThresholdMail.php--100.00%
   SendInterviewReminders.php--100.00%
Modules/HR/Contracts
   ApplicationServiceContract.php100.00%100.00%100.00%
   EvaluationServiceContract.php100.00%100.00%100.00%
   UniversityServiceContract.php100.00%100.00%100.00%
Modules/HR/Database/Factories
   HrApplicantsFactory.php100.00%100.00%100.00%
   HrApplicationEvaluationFactory.php--100.00%
   HrApplicationMetaFactory.php--100.00%
   HrApplicationRejectionFactory.php--100.00%
   HrApplicationRoundReviewFactory.php--100.00%
   HrApplicationSegmentFactory.php--100.00%
   HrApplicationsFactory.php90.91%-100.00%
   HrEmployeeFactory.php--100.00%
   HrFollowUpFactory.php--100.00%
   HrJobsFactory.php100.00%100.00%100.00%
   HrResourcesCategoriesFactory.php--100.00%
   HrResourcesFactory.php--100.00%
   HrUniversitiesContactsFactory.php100.00%100.00%100.00%
   HrUniversitiesFactory.php100.00%100.00%100.00%
   HrUniversityAliasesFactory.php100.00%100.00%100.00%
Modules/HR/Database/Migrations
   2020_07_15_110611_create_hr_application_segments_table.php91.67%50.00%100.00%
   2020_07_15_142215_rename_next_interview_comments_column.php50.00%50.00%100.00%
   2020_07_25_202622_update_segment_table_with_segment_parent.php61.54%50.00%100.00%
   2020_09_04_234639_update_application_round_with_calendar_meeting_id.php66.67%50.00%100.00%
   2020_09_06_234443_update_hr_application_round_table_with_is_latest.php50.00%50.00%100.00%
   2020_09_07_171154_create_hr_follow_ups_table.php92.31%50.00%100.00%
   2020_09_08_073438_create_hr_universities_table.php87.50%50.00%100.00%
   2020_09_08_073538_create_hr_universities_contacts_table.php90.00%50.00%100.00%
   2020_09_08_073651_add_hr_university_id_to_hr_applicants_table.php42.86%50.00%100.00%
   2020_11_24_141131_create_hr_university_aliases_table.php85.71%50.00%100.00%
   2020_12_31_112259_alter_posted_by_in_hr_jobs_table.php50.00%50.00%100.00%
   2021_01_01_113149_add_status_to_hr_jobs_table.php50.00%50.00%100.00%
   2021_01_01_123714_add_soft_deletes_to_hr_jobs_table.php50.00%50.00%100.00%
   2022_03_08_064931_update_hr_jobs_table.php50.00%50.00%100.00%
   2022_06_15_141424_add_parameter_slug_column_in_evaluation_parameter_table.php50.00%50.00%100.00%
   2022_07_04_165601_add_verification_status_to_application.php50.00%50.00%100.00%
   2022_07_07_075310_create_hr_job_domains_table.php85.71%50.00%100.00%
   2022_07_15_115016_create_hr_channels_table.php85.71%50.00%100.00%
   2022_07_15_115134_update_hr_applications_with_hr_channels_table.php50.00%50.00%100.00%
   2022_09_01_230847_create_job_requisition_table.php57.14%50.00%100.00%
   2022_09_06_232653_add_status_to_job_requisition.php50.00%50.00%100.00%
   2022_09_12_140344_create_hr_applicant_meta_table.php76.92%50.00%100.00%
   2022_09_19_160414_create_hr_job_designation_table.php85.71%50.00%100.00%
   2022_09_21_145858_create_batch_members_table.php57.14%50.00%100.00%
   2022_09_21_151304_create_batches_table.php83.33%50.00%100.00%
   2022_09_26_134702_alter_column_for_application_meta_value.php50.00%50.00%100.00%
   2024_03_20_161855_add_commencement_date_column_to_employee_salary_table.php50.00%50.00%100.00%
Modules/HR/Database/Seeders
   AddPreparatoryRoundsSeeder.php--100.00%
   ApplicationEvaluationTableSeeder.php--100.00%
   DomainTableSeeder.php--100.00%
   HRDatabaseSeeder.php--100.00%
   HRJobsSeederTableSeeder.php--100.00%
   HRPermissionsTableSeeder.php--100.00%
   HRRoundsTableSeeder.php--100.00%
   HrApplicantsTableSeeder.php--100.00%
   HrApplicationEvaluationSegmentTableSeeder.php--100.00%
   HrApplicationMetaTableSeeder.php--100.00%
   HrApplicationRejectionReasonTableSeeder.php--100.00%
   HrApplicationRoundReviewTableSeeder.php--100.00%
   HrApplicationRoundTableSeeder.php--100.00%
   HrApplicationSegmentTableSeeder.php--100.00%
   HrApplicationsTableSeeder.php--100.00%
   HrChannelsTableSeeder.php--100.00%
   HrDesignationTableSeeder.php100.00%100.00%100.00%
   HrDomainTableSeeder.php100.00%100.00%100.00%
   HrFollowUpTableSeeder.php--100.00%
   HrResourcesCategoriesTableSeeder.php--100.00%
   HrResourcesTableSeeder.php--100.00%
   HrUniversitiesContactsTableSeeder.php--100.00%
   HrUniversitiesTableSeeder.php--100.00%
   HrUniversityAliasesTableSeeder.php--100.00%
   ResumeScreeningEvaluationSeeder.php--100.00%
   SettingsTableSeeder.php--100.00%
   TagTableSeeder.php--100.00%
Modules/HR/Emails
   AppointmentSlotSelectionMail.php--100.00%
   SendHiringMail.php--100.00%
   SendJobExpiredMail.php--100.00%
   SendPayrollListMail.php--100.00%
   SendThreshholdFollowUp.php--100.00%
Modules/HR/Emails/Recruitment/Applicant
   ApplicantCreateAutoResponder.php--100.00%
   NoShow.php--100.00%
   OnHold.php--100.00%
   RoundReviewed.php--100.00%
   ScheduledInterviewReminder.php--100.00%
Modules/HR/Emails/Recruitment/Application
   ApplicationHandover.php--100.00%
   CustomApplicationMail.php--100.00%
   JobChanged.php--100.00%
   RoundNotConducted.php--100.00%
Modules/HR/Emails/Recruitment
   InterviewerScheduledRoundsReminder.php--100.00%
   SendForApproval.php--100.00%
   SendOfferLetter.php--100.00%
Modules/HR/Entities
   Applicant.php1.49%10.00%100.00%
   ApplicantMeta.php--100.00%
   Application.php13.88%12.50%100.00%
   ApplicationEvaluationSegment.php--100.00%
   ApplicationMeta.php--100.00%
   ApplicationRound.php0.36%4.00%100.00%
   ApplicationRoundReview.php--100.00%
   Assessment.php--100.00%
   Employee.php1.39%4.35%100.00%
   FollowUp.php--100.00%
   HRJobsRounds.php100.00%100.00%100.00%
   HRRejectionReason.php--100.00%
   HRRequisitionHiredBatch.php--100.00%
   HRRequisitionHiredBatchMembers.php--100.00%
   HrChannel.php100.00%100.00%100.00%
   HrJobDesignation.php--100.00%
   HrJobDomain.php--100.00%
   IndividualAssessment.php--100.00%
   Job.php50.00%38.89%100.00%
   JobRequisition.php--100.00%
   Round.php--100.00%
   University.php33.33%33.33%100.00%
   UniversityAlias.php100.00%100.00%100.00%
   UniversityContact.php100.00%100.00%100.00%
Modules/HR/Entities/Evaluation
   ApplicationEvaluation.php--100.00%
   Parameter.php--100.00%
   ParameterOption.php--100.00%
   Segment.php--100.00%
Modules/HR/Events
   ApplicationMovedToNewRound.php--100.00%
   CustomMailTriggeredForApplication.php--100.00%
   FollowUpEvent.php--100.00%
   InterviewCommunicationEmailSent.php--100.00%
Modules/HR/Events/Recruitment
   ApplicantEmailVerified.php--100.00%
   ApplicationCreated.php--100.00%
   JobUpdated.php66.67%50.00%100.00%
Modules/HR/Exports
   ContractorFeeExport.php--100.00%
   EmployeePayrollExport.php--100.00%
Modules/HR/Helpers
   TemplateHelper.php--100.00%
Modules/HR/Http/Controllers
   EmployeeController.php--100.00%
   EvaluationController.php--100.00%
   HiringController.php--100.00%
   HrChannelController.php--100.00%
   HrJobDesignationController.php--100.00%
   RequisitionController.php--100.00%
   ResourcesController.php--100.00%
   TagsController.php--100.00%
Modules/HR/Http/Controllers/Recruitment
   ApplicantController.php--100.00%
   ApplicationController.php38.22%7.14%100.00%
   ApplicationRoundController.php--100.00%
   CampaignsController.php--100.00%
   InternshipApplicationController.php--100.00%
   JobApplicationController.php100.00%100.00%100.00%
   JobController.php13.13%25.00%100.00%
   RecruitmentOpportunityController.php--100.00%
Table truncated to fit comment

🤖 comment via lucassabreu/comment-coverage-clover

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 10.95%. Comparing base (f8cf27e) to head (a29e4e7).
⚠️ Report is 3 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #3869      +/-   ##
=============================================
+ Coverage      10.77%   10.95%   +0.18%     
  Complexity      1600     1600              
=============================================
  Files            305      305              
  Lines           7092     7092              
=============================================
+ Hits             764      777      +13     
+ Misses          6328     6315      -13     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant