Skip to content

Commit

Permalink
feat(dataset): limit funding org to 1024 characters
Browse files Browse the repository at this point in the history
Closes #424
  • Loading branch information
vchendrix committed Feb 9, 2024
1 parent 19bb30f commit d88d5f8
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 4.2.2 on 2024-02-09 20:37

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('archive_api', '0027_add_dataset_desc_limit'),
]

operations = [
migrations.AlterModelOptions(
name='historicaldataset',
options={'get_latest_by': ('history_date', 'history_id'), 'ordering': ('-history_date', '-history_id'), 'verbose_name': 'historical data set', 'verbose_name_plural': 'historical data sets'},
),
migrations.AlterField(
model_name='historicaldataset',
name='history_date',
field=models.DateTimeField(db_index=True),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.2.2 on 2024-02-09 20:40

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('archive_api', '0028_alter_historicaldataset_options_and_more'),
]

operations = [
migrations.AlterField(
model_name='dataset',
name='funding_organizations',
field=models.TextField(blank=True, max_length=1024, null=True),
),
migrations.AlterField(
model_name='historicaldataset',
name='funding_organizations',
field=models.TextField(blank=True, max_length=1024, null=True),
),
]
2 changes: 1 addition & 1 deletion archive_api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def data_set_id(self):
qaqc_status = models.IntegerField(choices=QAQC_STATUS_CHOICES, blank=True, null=True)
qaqc_method_description = models.TextField(blank=True, null=True)
ngee_tropics_resources = models.BooleanField(blank=True, null=True)
funding_organizations = models.TextField(blank=True, null=True)
funding_organizations = models.TextField(blank=True, null=True, max_length=1024)
doe_funding_contract_numbers = models.CharField(max_length=100, blank=True, null=True)
acknowledgement = models.TextField(blank=True, null=True)
reference = models.TextField(blank=True, null=True, max_length=2255)
Expand Down
2 changes: 1 addition & 1 deletion ui/static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ $(document).ready(function () {
}
});

$.getJSON("static/js/metadata/dataset.json?v=20231026", function (data) {
$.getJSON("static/js/metadata/dataset.json?v=20240209", function (data) {
templates.datasets = data;
createEditForm('datasets');
});
Expand Down
2 changes: 1 addition & 1 deletion ui/static/js/metadata/dataset.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
"label": "Dataset Funding organization(s)",
"sequence": 16,
"multiple": false,
"description": "<p>Identify the agencies and offices that funded the work to generate the dataset. Separate multiple funders with a comma and a space.</p>"
"description": "<p>Identify the agencies and offices that funded the work to generate the dataset. Separate multiple funders with a comma and a space. <b>This field has a limit of 1024 characters.</b></p>"
},
"doe_funding_contract_numbers": {
"type": "string",
Expand Down

0 comments on commit d88d5f8

Please sign in to comment.