Skip to content

Commit

Permalink
💡 [#4908] Fix TODO identifiers
Browse files Browse the repository at this point in the history
They were wrong
  • Loading branch information
viktorvanwijk committed Dec 20, 2024
1 parent 7340b62 commit d3dff91
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from 'components/admin/forms/ValidationErrors';
import {getChoicesFromSchema} from 'utils/json-schema';

// TODO-4098: maybe create separate file (JSONOptionsFormFields) for all the fields?
// TODO-4908: maybe create separate file (JSONOptionsFormFields) for all the fields?
// Though, no need to use multiple FieldSets, so adding the fields to the form is pretty
// straightforward.
import FormVariablesSelect from './fields/FormVariablesSelect';
Expand Down Expand Up @@ -81,7 +81,7 @@ JSONOptionsForm.propTypes = {
formData: PropTypes.shape({
service: PropTypes.number,
relativeApiEndpoint: PropTypes.string,
// TODO-4098: might need to rename this to selectedFormVariables to avoid confusion or even
// TODO-4908: might need to rename this to selectedFormVariables to avoid confusion or even
// naming conflicts
formVariables: PropTypes.arrayOf(PropTypes.string),
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import FormRow from 'components/admin/forms/FormRow';
import ReactSelect from 'components/admin/forms/ReactSelect';

// TODO-4908: where to add already selected form variables from the variables table?
// TODO-4098: the select box does not change size when you add more form variables, which causes
// TODO-4908: the select box does not change size when you add more form variables, which causes
// selected form variables to be hidden
const FormVariablesSelect = ({options}) => {
const [fieldProps, , fieldHelpers] = useField('formVariables');
Expand Down
2 changes: 1 addition & 1 deletion src/openforms/registrations/contrib/json/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from django.utils.translation import gettext_lazy as _


# TODO-4098: maybe rename to FVaJ (Form Variables as JSON)
# TODO-4908: maybe rename to FVaJ (Form Variables as JSON)
class JSONConfig(AppConfig):
name = "openforms.registrations.contrib.json"
label = "registrations_json"
Expand Down
4 changes: 3 additions & 1 deletion src/openforms/registrations/contrib/json/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@
from openforms.utils.mixins import JsonSchemaSerializerMixin


# TODO-4908: when you select a form variable in the configurations and then remove it again,
# it is possible to save the plugin and form without validation errors.
class JSONOptionsSerializer(JsonSchemaSerializerMixin, serializers.Serializer):
service = PrimaryKeyRelatedAsChoicesField(
queryset=Service.objects.filter(api_type=APITypes.orc),
label=_("Service"),
help_text=_("Which service to use."),
required=True,
)
# TODO-4098: show the complete API endpoint as a (tooltip) hint after user entry?
# TODO-4908: show the complete API endpoint as a (tooltip) hint after user entry?
# Might be a front-end thing...
relative_api_endpoint = serializers.CharField(
max_length=255,
Expand Down
5 changes: 2 additions & 3 deletions src/openforms/registrations/contrib/json/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

from ...base import BasePlugin # openforms.registrations.base
from ...registry import register # openforms.registrations.registry
from ...utils import execute_unless_result_exists
from .config import JSONOptions, JSONOptionsSerializer


Expand Down Expand Up @@ -64,7 +63,7 @@ def register_submission(self, submission: Submission, options: JSONOptions) -> N
return json

def check_config(self):
# TODO-4098: check if it's possible to connect to the service
# TODO-4908: check if it's possible to connect to the service
# (using the 'connection check endpoint' of the service)
# TODO-4098: check anything else?
# TODO-4908: check anything else?
pass

0 comments on commit d3dff91

Please sign in to comment.