Skip to content

feat: make DOI optional for manual entry in citation form#1373

Merged
NishaSharma14 merged 6 commits intodevelopmentfrom
issue#1369
Mar 25, 2026
Merged

feat: make DOI optional for manual entry in citation form#1373
NishaSharma14 merged 6 commits intodevelopmentfrom
issue#1369

Conversation

@NishaSharma14
Copy link
Copy Markdown
Contributor

@NishaSharma14 NishaSharma14 commented Mar 20, 2026

image

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@NishaSharma14 NishaSharma14 linked an issue Mar 20, 2026 that may be closed by this pull request
@NishaSharma14 NishaSharma14 changed the base branch from main to development March 23, 2026 12:33
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 23, 2026

Codecov Report

❌ Patch coverage is 96.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.57%. Comparing base (ad1b83d) to head (91022a6).
⚠️ Report is 1 commits behind head on development.

Files with missing lines Patch % Lines
app/Actions/Citation/SyncCitations.php 95.00% 2 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##             development    #1373      +/-   ##
=================================================
+ Coverage          71.45%   71.57%   +0.12%     
- Complexity          2417     2435      +18     
=================================================
  Files                210      210              
  Lines               9324     9371      +47     
=================================================
+ Hits                6662     6707      +45     
- Misses              2662     2664       +2     
Flag Coverage Δ
unittests 71.57% <96.66%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 7 changed files in this pull request and generated 4 comments.

Comment on lines +270 to +279
// Set overall citations validation status and store detailed report
if ($citationsStatus) {
$report['project']['citations'] = 'true|required';
} else {
$report['project']['citations'] = 'false|required';
$status = false; // Propagate to project status
}

// Store detailed citations validation data separately
$report['project']['citations_detail'] = $citationsValidation;
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

This block overwrites $report['project']['citations'] that was already set earlier from the schema rules (e.g. array|min:1). That loses the original validation result and can also mark citations as true|required when the project has zero citations (empty loop keeps $citationsStatus true). Consider using a separate key (e.g. citations_doi / citations_doi_detail) or extending the existing project/citation rules without clobbering the earlier report values, and ensure the empty-citations case is handled consistently.

Suggested change
// Set overall citations validation status and store detailed report
if ($citationsStatus) {
$report['project']['citations'] = 'true|required';
} else {
$report['project']['citations'] = 'false|required';
$status = false; // Propagate to project status
}
// Store detailed citations validation data separately
$report['project']['citations_detail'] = $citationsValidation;
// Set overall DOI-specific citations validation status without overwriting base citations validation
if (count($citations) === 0) {
$report['project']['citations_doi'] = 'false|required';
$status = false;
} else {
if ($citationsStatus) {
$report['project']['citations_doi'] = 'true|required';
} else {
$report['project']['citations_doi'] = 'false|required';
$status = false; // Propagate to project status
}
}
// Store detailed DOI-specific citations validation data separately
$report['project']['citations_doi_detail'] = $citationsValidation;

Copilot uses AI. Check for mistakes.
@NishaSharma14 NishaSharma14 merged commit b73bf3a into development Mar 25, 2026
6 of 7 checks passed
@NishaSharma14 NishaSharma14 deleted the issue#1369 branch March 25, 2026 14:00
@NishaSharma14 NishaSharma14 self-assigned this Mar 30, 2026
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.

Make DOI optional in the manual "add citation form"

3 participants