cityssm/corporate-records-manager

View on GitHub

Showing 256 of 266 total issues

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

    if (parameters.recordDateStringLTE && parameters.recordDateStringLTE !== "") {
      countRequest = countRequest.input("recordDateStringLTE", parameters.recordDateStringLTE);
      resultsRequest = resultsRequest.input("recordDateStringLTE", parameters.recordDateStringLTE);
      whereSQL += " and recordDate <= @recordDateStringLTE";
    }
Severity: Major
Found in helpers/recordsDB/getRecords.ts and 4 other locations - About 1 hr to fix
helpers/recordsDB/getRecords.ts on lines 56..60
helpers/recordsDB/getRecords.ts on lines 62..66
helpers/recordsDB/getRecords.ts on lines 68..72
helpers/recordsDB/getRecords.ts on lines 80..84

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 70.

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

        if (parameters.recordDateStringGTE && parameters.recordDateStringGTE !== "") {
            countRequest = countRequest.input("recordDateStringGTE", parameters.recordDateStringGTE);
            resultsRequest = resultsRequest.input("recordDateStringGTE", parameters.recordDateStringGTE);
            whereSQL += " and recordDate >= @recordDateStringGTE";
        }
Severity: Major
Found in helpers/recordsDB/getRecords.js and 4 other locations - About 1 hr to fix
helpers/recordsDB/getRecords.js on lines 25..29
helpers/recordsDB/getRecords.js on lines 30..34
helpers/recordsDB/getRecords.js on lines 40..44
helpers/recordsDB/getRecords.js on lines 45..49

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 70.

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

        if (parameters.recordDateStringLTE && parameters.recordDateStringLTE !== "") {
            countRequest = countRequest.input("recordDateStringLTE", parameters.recordDateStringLTE);
            resultsRequest = resultsRequest.input("recordDateStringLTE", parameters.recordDateStringLTE);
            whereSQL += " and recordDate <= @recordDateStringLTE";
        }
Severity: Major
Found in helpers/recordsDB/getRecords.js and 4 other locations - About 1 hr to fix
helpers/recordsDB/getRecords.js on lines 25..29
helpers/recordsDB/getRecords.js on lines 30..34
helpers/recordsDB/getRecords.js on lines 35..39
helpers/recordsDB/getRecords.js on lines 45..49

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 70.

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

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

                patternElement.addEventListener("keyup", () => {
                    if (crmAdmin.isValidRegex(patternElement.value)) {
                        patternElement.classList.remove("is-danger");
                    }
                    else {
Severity: Major
Found in public-typescript/admin/recordTypes.js and 1 other location - About 1 hr to fix
public-typescript/admin/recordTypes.js on lines 227..234

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 70.

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

    if (parameters.recordNumber && parameters.recordNumber !== "") {
      countRequest = countRequest.input("recordNumber", parameters.recordNumber);
      resultsRequest = resultsRequest.input("recordNumber", parameters.recordNumber);
      whereSQL += " and recordNumber like '%' + @recordNumber + '%'";
    }
Severity: Major
Found in helpers/recordsDB/getRecords.ts and 4 other locations - About 1 hr to fix
helpers/recordsDB/getRecords.ts on lines 62..66
helpers/recordsDB/getRecords.ts on lines 68..72
helpers/recordsDB/getRecords.ts on lines 74..78
helpers/recordsDB/getRecords.ts on lines 80..84

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 70.

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

        if (parameters.statusTypeKey && parameters.statusTypeKey !== "") {
            countRequest = countRequest.input("statusTypeKey", parameters.statusTypeKey);
            resultsRequest = resultsRequest.input("statusTypeKey", parameters.statusTypeKey);
            whereSQL += " and s.statusTypeKey = @statusTypeKey";
        }
Severity: Major
Found in helpers/recordsDB/getRecords.js and 4 other locations - About 1 hr to fix
helpers/recordsDB/getRecords.js on lines 25..29
helpers/recordsDB/getRecords.js on lines 30..34
helpers/recordsDB/getRecords.js on lines 35..39
helpers/recordsDB/getRecords.js on lines 40..44

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 70.

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

    if (parameters.recordDateStringGTE && parameters.recordDateStringGTE !== "") {
      countRequest = countRequest.input("recordDateStringGTE", parameters.recordDateStringGTE);
      resultsRequest = resultsRequest.input("recordDateStringGTE", parameters.recordDateStringGTE);
      whereSQL += " and recordDate >= @recordDateStringGTE";
    }
Severity: Major
Found in helpers/recordsDB/getRecords.ts and 4 other locations - About 1 hr to fix
helpers/recordsDB/getRecords.ts on lines 56..60
helpers/recordsDB/getRecords.ts on lines 62..66
helpers/recordsDB/getRecords.ts on lines 74..78
helpers/recordsDB/getRecords.ts on lines 80..84

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 70.

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

        if (parameters.recordTag && parameters.recordTag !== "") {
            countRequest = countRequest.input("recordTag", parameters.recordTag);
            resultsRequest = resultsRequest.input("recordTag", parameters.recordTag);
            whereSQL += " and recordID in (select recordID from CR.RecordTags where tag like '%' + @recordTag + '%')";
        }
Severity: Major
Found in helpers/recordsDB/getRecords.js and 4 other locations - About 1 hr to fix
helpers/recordsDB/getRecords.js on lines 25..29
helpers/recordsDB/getRecords.js on lines 35..39
helpers/recordsDB/getRecords.js on lines 40..44
helpers/recordsDB/getRecords.js on lines 45..49

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 70.

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

        if (parameters.recordNumber && parameters.recordNumber !== "") {
            countRequest = countRequest.input("recordNumber", parameters.recordNumber);
            resultsRequest = resultsRequest.input("recordNumber", parameters.recordNumber);
            whereSQL += " and recordNumber like '%' + @recordNumber + '%'";
        }
Severity: Major
Found in helpers/recordsDB/getRecords.js and 4 other locations - About 1 hr to fix
helpers/recordsDB/getRecords.js on lines 30..34
helpers/recordsDB/getRecords.js on lines 35..39
helpers/recordsDB/getRecords.js on lines 40..44
helpers/recordsDB/getRecords.js on lines 45..49

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 70.

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

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

        patternElement.addEventListener("keyup", () => {
          if (crmAdmin.isValidRegex(patternElement.value)) {
            patternElement.classList.remove("is-danger");
          } else {
            patternElement.classList.add("is-danger");
Severity: Major
Found in public-typescript/admin/recordTypes.ts and 1 other location - About 1 hr to fix
public-typescript/admin/recordTypes.ts on lines 344..350

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 70.

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

    if (parameters.statusTypeKey && parameters.statusTypeKey !== "") {
      countRequest = countRequest.input("statusTypeKey", parameters.statusTypeKey);
      resultsRequest = resultsRequest.input("statusTypeKey", parameters.statusTypeKey);
      whereSQL += " and s.statusTypeKey = @statusTypeKey";
    }
Severity: Major
Found in helpers/recordsDB/getRecords.ts and 4 other locations - About 1 hr to fix
helpers/recordsDB/getRecords.ts on lines 56..60
helpers/recordsDB/getRecords.ts on lines 62..66
helpers/recordsDB/getRecords.ts on lines 68..72
helpers/recordsDB/getRecords.ts on lines 74..78

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 70.

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

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

                patternElement.addEventListener("keyup", () => {
                    if (crmAdmin.isValidRegex(patternElement.value)) {
                        patternElement.classList.remove("is-danger");
                    }
                    else {
Severity: Major
Found in public-typescript/admin/recordTypes.js and 1 other location - About 1 hr to fix
public-typescript/admin/recordTypes.js on lines 80..87

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 70.

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

    if (parameters.recordTag && parameters.recordTag !== "") {
      countRequest = countRequest.input("recordTag", parameters.recordTag);
      resultsRequest = resultsRequest.input("recordTag", parameters.recordTag);
      whereSQL += " and recordID in (select recordID from CR.RecordTags where tag like '%' + @recordTag + '%')";
    }
Severity: Major
Found in helpers/recordsDB/getRecords.ts and 4 other locations - About 1 hr to fix
helpers/recordsDB/getRecords.ts on lines 56..60
helpers/recordsDB/getRecords.ts on lines 68..72
helpers/recordsDB/getRecords.ts on lines 74..78
helpers/recordsDB/getRecords.ts on lines 80..84

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 70.

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

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

        patternElement.addEventListener("keyup", () => {
          if (crmAdmin.isValidRegex(patternElement.value)) {
            patternElement.classList.remove("is-danger");
          } else {
            patternElement.classList.add("is-danger");
Severity: Major
Found in public-typescript/admin/recordTypes.ts and 1 other location - About 1 hr to fix
public-typescript/admin/recordTypes.ts on lines 134..140

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 70.

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

            result = await pool.request()
                .input("recordID", recordUserForm.recordID)
                .input("userName", recordUserForm.userName)
                .input("recordUserTypeKey", recordUserForm.recordUserTypeKey)
                .input("recordCreate_userName", requestSession.user.userName)
Severity: Major
Found in helpers/recordsDB/addRecordUser.js and 1 other location - About 1 hr to fix
helpers/recordsDB/updateURL.js on lines 8..13

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 69.

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

        await pool.request()
            .input("url", recordURL.url)
            .input("urlTitle", recordURL.urlTitle)
            .input("urlDescription", recordURL.urlDescription)
            .input("recordUpdate_userName", requestSession.user.userName)
Severity: Major
Found in helpers/recordsDB/updateURL.js and 1 other location - About 1 hr to fix
helpers/recordsDB/addRecordUser.js on lines 37..42

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 69.

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

    await pool.request()
      .input("url", recordURL.url)
      .input("urlTitle", recordURL.urlTitle)
      .input("urlDescription", recordURL.urlDescription)
      .input("recordUpdate_userName", requestSession.user.userName)
Severity: Major
Found in helpers/recordsDB/updateURL.ts and 1 other location - About 1 hr to fix
helpers/recordsDB/addRecordUser.ts on lines 54..59

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 69.

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

      result = await pool.request()
        .input("recordID", recordUserForm.recordID)
        .input("userName", recordUserForm.userName)
        .input("recordUserTypeKey", recordUserForm.recordUserTypeKey)
        .input("recordCreate_userName", requestSession.user.userName)
Severity: Major
Found in helpers/recordsDB/addRecordUser.ts and 1 other location - About 1 hr to fix
helpers/recordsDB/updateURL.ts on lines 18..23

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 69.

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

        (responseJSON: { success: true; message?: string; statusTypes?: recordTypes.StatusType[] }) => {

          if (responseJSON.success) {

            updateStatusTypeCloseModalFunction();
Severity: Major
Found in public-typescript/admin/statusTypes.ts and 1 other location - About 1 hr to fix
public-typescript/admin/statusTypes.ts on lines 288..302

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 68.

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

        (responseJSON: { success: boolean; message?: string; statusTypes?: recordTypes.StatusType[] }) => {

          if (responseJSON.success) {

            addStatusTypeCloseModalFunction();
Severity: Major
Found in public-typescript/admin/statusTypes.ts and 1 other location - About 1 hr to fix
public-typescript/admin/statusTypes.ts on lines 112..126

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 68.

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

Severity
Category
Status
Source
Language