RocketChat/Rocket.Chat

View on GitHub
apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx

Summary

Maintainability
F
1 wk
Test Coverage

Function AppearanceForm has 341 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const AppearanceForm = () => {
    const t = useTranslation();
    const isEnterprise = useHasLicenseModule('livechat-enterprise');

    const { control, watch } = useFormContext();
Severity: Major
Found in apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx - About 1 day to fix

    File AppearanceForm.tsx has 366 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import {
        Field,
        FieldRow,
        TextInput,
        ToggleSwitch,
    Severity: Minor
    Found in apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx - About 4 hrs to fix

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

                          <Field>
                              <FieldLabel htmlFor={livechatConversationFinishedTextField}>{t('Conversation_finished_text')}</FieldLabel>
                              <FieldRow>
                                  <Controller
                                      name='Livechat_conversation_finished_text'
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 332..343
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 349..360

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 122.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

                          <Field>
                              <FieldLabel htmlFor={livechatConversationFinishedMessageField}>{t('Conversation_finished_message')}</FieldLabel>
                              <FieldRow>
                                  <Controller
                                      name='Livechat_conversation_finished_message'
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 332..343
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 361..372

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 122.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

                          <Field>
                              <FieldLabel htmlFor={livechatRegistrationFormMessageField}>{t('Livechat_registration_form_message')}</FieldLabel>
                              <FieldRow>
                                  <Controller
                                      name='Livechat_registration_form_message'
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 349..360
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 361..372

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 122.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 15 locations. Consider refactoring.
      Open

                          <Field>
                              <FieldRow>
                                  <FieldLabel htmlFor={livechatRegistrationForm}>{t('Enabled')}</FieldLabel>
                                  <Controller
                                      name='Livechat_registration_form'
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 141..150
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 276..287
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 288..297
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 146..155
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 265..274
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 389..398
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 168..179
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 198..207
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 208..217
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 223..232
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 308..319
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 320..331
      apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx on lines 172..181
      apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx on lines 182..191

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 120.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 15 locations. Consider refactoring.
      Open

                          <Field>
                              <FieldRow>
                                  <FieldLabel htmlFor={livechatEnableMessageCharacterLimit}>{t('Livechat_enable_message_character_limit')}</FieldLabel>
                                  <Controller
                                      name='Livechat_enable_message_character_limit'
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 141..150
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 276..287
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 288..297
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 146..155
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 265..274
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 389..398
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 198..207
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 208..217
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 223..232
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 298..307
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 308..319
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 320..331
      apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx on lines 172..181
      apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx on lines 182..191

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 120.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 15 locations. Consider refactoring.
      Open

                          <Field>
                              <FieldRow>
                                  <FieldLabel htmlFor={livechatDisplayOfflineForm}>{t('Display_offline_form')}</FieldLabel>
                                  <Controller
                                      name='Livechat_display_offline_form'
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 141..150
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 276..287
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 288..297
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 146..155
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 265..274
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 389..398
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 168..179
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 198..207
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 208..217
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 298..307
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 308..319
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 320..331
      apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx on lines 172..181
      apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx on lines 182..191

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 120.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 15 locations. Consider refactoring.
      Open

                          <Field>
                              <FieldRow>
                                  <FieldLabel htmlFor={livechatNameFieldRegistrationForm}>{t('Show_name_field')}</FieldLabel>
                                  <Controller
                                      name='Livechat_name_field_registration_form'
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 141..150
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 276..287
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 288..297
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 146..155
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 265..274
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 389..398
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 168..179
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 198..207
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 208..217
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 223..232
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 298..307
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 320..331
      apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx on lines 172..181
      apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx on lines 182..191

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 120.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 15 locations. Consider refactoring.
      Open

                          <Field>
                              <FieldRow>
                                  <FieldLabel htmlFor={livechatShowAgentInfo}>{t('Show_agent_info')}</FieldLabel>
                                  <Controller
                                      name='Livechat_show_agent_info'
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 141..150
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 276..287
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 288..297
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 146..155
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 265..274
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 389..398
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 168..179
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 208..217
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 223..232
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 298..307
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 308..319
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 320..331
      apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx on lines 172..181
      apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx on lines 182..191

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 120.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 15 locations. Consider refactoring.
      Open

                          <Field>
                              <FieldRow>
                                  <FieldLabel htmlFor={livechatShowAgentEmail}>{t('Show_agent_email')}</FieldLabel>
                                  <Controller
                                      name='Livechat_show_agent_email'
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 141..150
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 276..287
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 288..297
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 146..155
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 265..274
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 389..398
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 168..179
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 198..207
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 223..232
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 298..307
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 308..319
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 320..331
      apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx on lines 172..181
      apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx on lines 182..191

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 120.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 15 locations. Consider refactoring.
      Open

                          <Field>
                              <FieldRow>
                                  <FieldLabel htmlFor={livechatEmailFieldRegistrationForm}>{t('Show_email_field')}</FieldLabel>
                                  <Controller
                                      name='Livechat_email_field_registration_form'
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 141..150
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 276..287
      apps/meteor/client/views/admin/integrations/incoming/IncomingWebhookForm.tsx on lines 288..297
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 146..155
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 265..274
      apps/meteor/client/views/admin/integrations/outgoing/OutgoingWebhookForm.tsx on lines 389..398
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 168..179
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 198..207
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 208..217
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 223..232
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 298..307
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 308..319
      apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx on lines 172..181
      apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx on lines 182..191

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 120.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

                          <Field>
                              <FieldLabel htmlFor={livechatOfflineSuccessMessageField}>{t('Offline_success_message')}</FieldLabel>
                              <FieldRow>
                                  <Controller
                                      name='Livechat_offline_success_message'
      apps/meteor/client/views/admin/emailInbox/EmailInboxForm.tsx on lines 263..272
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 233..242
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 243..252
      apps/meteor/client/views/room/contextualBar/Info/EditRoomInfo/EditRoomInfo.tsx on lines 200..209

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 111.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

                          <Field>
                              <FieldLabel htmlFor={livechatOfflineMessageField}>{t('Offline_message')}</FieldLabel>
                              <FieldRow>
                                  <Controller
                                      name='Livechat_offline_message'
      apps/meteor/client/views/admin/emailInbox/EmailInboxForm.tsx on lines 263..272
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 233..242
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 283..292
      apps/meteor/client/views/room/contextualBar/Info/EditRoomInfo/EditRoomInfo.tsx on lines 200..209

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 111.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

                          <Field>
                              <FieldLabel htmlFor={livechatOfflineFormUnavailableField}>{t('Offline_form_unavailable_message')}</FieldLabel>
                              <FieldRow>
                                  <Controller
                                      name='Livechat_offline_form_unavailable'
      apps/meteor/client/views/admin/emailInbox/EmailInboxForm.tsx on lines 263..272
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 243..252
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 283..292
      apps/meteor/client/views/room/contextualBar/Info/EditRoomInfo/EditRoomInfo.tsx on lines 200..209

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 111.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 3 locations. Consider refactoring.
      Open

                          <Field>
                              <FieldLabel htmlFor={livechatOfflineTitleColorField}>{t('Title_bar_color_offline')}</FieldLabel>
                              <FieldRow>
                                  <Controller
                                      name='Livechat_offline_title_color'
      apps/meteor/client/views/omnichannel/agents/AgentEdit.tsx on lines 213..222
      apps/meteor/client/views/room/contextualBar/ExportMessages/FileExport.tsx on lines 74..79

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 109.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                          <Field>
                              <FieldLabel htmlFor={livechatTitleColorField}>{t('Title_bar_color')}</FieldLabel>
                              <FieldRow>
                                  <Controller
                                      name='Livechat_title_color'
      apps/meteor/client/views/room/contextualBar/ExportMessages/FileExport.tsx on lines 64..73

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 109.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

                          <Field>
                              <FieldLabel htmlFor={livechatOfflineTitleField}>{t('Title_offline')}</FieldLabel>
                              <FieldRow>
                                  <Controller
                                      name='Livechat_offline_title'
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 148..157
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 273..282
      apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx on lines 192..197
      apps/meteor/ee/client/omnichannel/tags/TagEdit.tsx on lines 101..106

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 104.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

                          <Field>
                              <FieldLabel htmlFor={livechatOfflineEmailField}>{t('Email_address_to_send_offline_messages')}</FieldLabel>
                              <FieldRow>
                                  <Controller
                                      name='Livechat_offline_email'
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 148..157
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 253..262
      apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx on lines 192..197
      apps/meteor/ee/client/omnichannel/tags/TagEdit.tsx on lines 101..106

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 104.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

                          <Field>
                              <FieldLabel htmlFor={livechatTitleField}>{t('Title')}</FieldLabel>
                              <FieldRow>
                                  <Controller
                                      name='Livechat_title'
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 253..262
      apps/meteor/client/views/omnichannel/appearance/AppearanceForm.tsx on lines 273..282
      apps/meteor/client/views/omnichannel/customFields/EditCustomFields.tsx on lines 192..197
      apps/meteor/ee/client/omnichannel/tags/TagEdit.tsx on lines 101..106

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 104.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      There are no issues that match your filters.

      Category
      Status