Skip to content

Commit

Permalink
pkp#10759 Remove orcidReviewPutCode from User schema, and fix invalid…
Browse files Browse the repository at this point in the history
… header reference in DepositOrcidSubmission
  • Loading branch information
taslangraham committed Jan 7, 2025
1 parent b2fdd66 commit 2538149
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 15 deletions.
6 changes: 3 additions & 3 deletions classes/migration/install/ReviewAssignmentSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ class ReviewAssignmentSettings extends Migration
public function up(): void
{
Schema::create('review_assignment_settings', function (Blueprint $table) {
$table->bigIncrements('review_assignment_settings_id')->primary()->comment('Prikmary key.');
$table->bigInteger('review_id')->comment('Foreign key refrencing record in review_assignments table');
$table->bigIncrements('review_assignment_settings_id')->primary()->comment('Primary key.');
$table->bigInteger('review_id')->comment('Foreign key referencing record in review_assignments table');
$table->string('locale', 28)->nullable()->comment('Locale key.');
$table->string('setting_name', 255)->comment('Name of settings record.');
$table->mediumText('setting_value')->nullable()->comment('Settings value.');

$table->unique(['review_id', 'locale', 'setting_name'], 'review_assignment_settings_unique');
$table->foreign('review_id')->references('review_id')->on('review_assignments')->onDelete('cascade');
$table->foreign('review_id')->references('review_id')->on('review_assignments')->onDelete('cascade')->onUpdate('cascade');
$table->index(['review_id'], 'review_assignment_settings_review_id');
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ class I10759_AddReviewAssignmentSettings extends Migration
public function up(): void
{
Schema::create('review_assignment_settings', function (Blueprint $table) {
$table->bigIncrements('review_assignment_settings_id')->primary()->comment('Prikmary key.');
$table->bigInteger('review_id')->comment('Foreign key refrencing record in review_assignments table');
$table->bigIncrements('review_assignment_settings_id')->primary()->comment('Primary key.');
$table->bigInteger('review_id')->comment('Foreign key referencing record in review_assignments table');
$table->string('locale', 28)->nullable()->comment('Locale key.');
$table->string('setting_name', 255)->comment('Name of settings record.');
$table->mediumText('setting_value')->nullable()->comment('Settings value.');

$table->unique(['review_id', 'locale', 'setting_name'], 'review_assignment_settings_unique');
$table->foreign('review_id')->references('review_id')->on('review_assignments')->onDelete('cascade');
$table->foreign('review_id')->references('review_id')->on('review_assignments')->onDelete('cascade')->onUpdate('cascade');
$table->index(['review_id'], 'review_assignment_settings_review_id');
});
}
Expand Down
2 changes: 1 addition & 1 deletion classes/orcid/PKPOrcidWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private function build(): array
$this->context->getPath(),
'article',
'view',
$submission->getId(),
[$submission->getId()],
urlLocaleForPage: '',
);

Expand Down
2 changes: 1 addition & 1 deletion jobs/orcid/DepositOrcidSubmission.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function handle(): void
OrcidManager::logInfo("Work updated in profile, putCode: {$putCode}");
break;
case 201:
$location = $responseHeaders['Location'][0];
$location = $responseHeaders['location'][0];
// Extract the ORCID work put code for updates/deletion.
$putCode = intval(basename(parse_url($location, PHP_URL_PATH)));
OrcidManager::logInfo("Work added to profile, putCode: {$putCode}");
Expand Down
7 changes: 0 additions & 7 deletions schemas/user.json
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,6 @@
"nullable"
]
},
"orcidReviewPutCode": {
"type": "string",
"apiSummary": true,
"validation": [
"nullable"
]
},
"rememberToken": {
"type": "string",
"writeOnly": true,
Expand Down

0 comments on commit 2538149

Please sign in to comment.