StringTemplate.Context refdata should be internal

Description

Overview:

It should not be possible to delete values from the StringTemplate.Context refdata category in agreements

Steps to Reproduce:

  1. Got to Settings -> Agreements -> Pick list values

  2. Select StringTemplate.Context  in pick list drop down

  3. See that the values display with a trashcan icon

Expected Results:

No trashcan icon

Should be controlled with `@CategoryId(defaultInternal=true)` on the reference data category. Migration may also be needed to fix existing instances

 

Dev task breakdown

This is a multi step process:

  1. Change domain class to make use of defaultInternal

  2. Ensure we have no missing data:

    • Write migration for all missing entries (should be at most 2, unless something really funky has gone on)

    • Something like:

      changeSet(author: "efreestone (manual)", id: "20210922-1534-002") { grailsChange { change { sql.eachRow(""" SELECT DISTINCT strt_context FROM ${database.defaultSchemaName}.string_template INNER JOIN ${database.defaultSchemaName}.refdata_value ON string_template.strt_context = refdata_value.rdv_id WHERE NOT EXISTS ( SELECT rdv_id FROM ${database.defaultSchemaName}.refdata_value WHERE rdv_id = strt_context )""".toString() ) { def row -> sql.execute(""" INSERT INTO ${database.defaultSchemaName}.refdata_value (rdv_id, rdv_version, rdv_value, rdv_owner, rdv_label) ${row.strt_context} as id, 0 as version, 'missing_context_${row.strt_context}' as value,          ( SELECT rdc_id FROM ${database.defaultSchemaName}.refdata_category WHERE rdc_description='StringTemplate.Context' ) as owner,          'Missing context ${row.strt_context}' as label """.toString()) } } } }
  •  

    • This SQL and closure need testing, as I've written it without double checking it works. The top part should find all StringTemplate contexts which do not exist as refdata values, then pass those to the Closure below as "row", where we can use that in a different SQL query to insert a new refdata value with that id.

  1. In this case (Not necessarily always true) we went from String -> refdata, so we should add a migration changing the column type from VARCHAR(255) to VARCHAR(36)

  2. Add migration for foreign key constraint

  3. Add migration changing defaultInternal to true for the refdata category

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Confluence content

Checklist

hide

Activity

Show:
Owen Stephens
changed the StatusMarch 29, 2024 at 2:59 PM
In QA
Closed
Owen Stephens
updated the ResolutionMarch 29, 2024 at 2:59 PM
None
Done
Automation for Jira
changed the AssigneeMarch 29, 2024 at 2:59 PM
Unassigned
Owen Stephens
Owen Stephens
changed the StatusMarch 29, 2024 at 2:59 PM
Open
In QA
Owen Stephens
changed the AssigneeMarch 28, 2024 at 12:19 PM
Owen Stephens
Unassigned
Owen Stephens
changed the StatusMarch 28, 2024 at 12:19 PM
In QA
Open
Jag Goraya
updated the RemoteIssueLinkMarch 4, 2024 at 12:48 PM
None
This issue links to "Page (FOLIO Wiki)"
Jag Goraya
updated the RemoteIssueLinkFebruary 19, 2024 at 12:49 PM
None
This issue links to "Page (FOLIO Wiki)"
Jag Goraya
updated the SprintFebruary 19, 2024 at 11:12 AM
ERM Sprint 182, ERM Sprint 177, ERM Sprint 179, ERM Sprint 180, ERM Sprint 183, ERM Sprint 188
ERM Sprint 182, ERM Sprint 177, ERM Sprint 179, ERM Sprint 180, ERM Sprint 183, ERM Sprint 187
Jag Goraya
updated the SprintFebruary 19, 2024 at 11:11 AM
ERM Sprint 182, ERM Sprint 177, ERM Sprint 179, ERM Sprint 180, ERM Sprint 183, ERM Sprint 184
ERM Sprint 182, ERM Sprint 177, ERM Sprint 179, ERM Sprint 180, ERM Sprint 183, ERM Sprint 188
Jag Goraya
updated the SprintFebruary 9, 2024 at 4:15 PM
ERM Sprint 182, ERM Sprint 177, ERM Sprint 179, ERM Sprint 180, ERM Sprint 183
ERM Sprint 182, ERM Sprint 177, ERM Sprint 179, ERM Sprint 180, ERM Sprint 183, ERM Sprint 184
Jag Goraya
updated the Linked IssuesJanuary 31, 2024 at 12:26 PM
None
This issue links to "Page (FOLIO Wiki)"
Jag Goraya
updated the SprintJanuary 29, 2024 at 10:20 AM
ERM Sprint 177, ERM Sprint 179, ERM Sprint 180, ERM Sprint 182
ERM Sprint 177, ERM Sprint 179, ERM Sprint 180, ERM Sprint 183, ERM Sprint 182
Jag Goraya
updated the Linked IssuesJanuary 26, 2024 at 12:40 PM
None
This issue defines ERM-3096
Jag Goraya
updated the Linked IssuesJanuary 22, 2024 at 11:03 AM
None
This issue links to "Page (FOLIO Wiki)"
Jag Goraya
changed the AssigneeJanuary 17, 2024 at 1:37 PM
Ethan Freestone
Owen Stephens
Ethan Freestone
changed the StatusJanuary 17, 2024 at 1:37 PM
In Code Review
In QA
Jag Goraya
changed the AssigneeJanuary 15, 2024 at 9:26 AM
Jack Golding
Ethan Freestone
Jack Golding
changed the StatusJanuary 15, 2024 at 9:26 AM
In progress
In Code Review
Jag Goraya
changed the StatusJanuary 10, 2024 at 11:55 AM
In Code Review
In progress
Jag Goraya
changed the AssigneeJanuary 10, 2024 at 11:55 AM
Ethan Freestone
Jack Golding
Jag Goraya
changed the AssigneeJanuary 8, 2024 at 10:55 AM
Jack Golding
Ethan Freestone
Jack Golding
changed the StatusJanuary 8, 2024 at 10:55 AM
In progress
In Code Review
Jag Goraya
updated the Linked IssuesJanuary 8, 2024 at 9:10 AM
None
This issue links to "Page (FOLIO Wiki)"
Jag Goraya
updated the SprintJanuary 8, 2024 at 9:03 AM
ERM Sprint 177, ERM Sprint 179, ERM Sprint 180
ERM Sprint 177, ERM Sprint 179, ERM Sprint 180, ERM Sprint 182
Jack Golding
changed the StatusDecember 11, 2023 at 10:54 AM
Open
In progress
Jag Goraya
updated the Linked IssuesDecember 11, 2023 at 10:17 AM
None
This issue links to "Page (FOLIO Wiki)"
Ethan Freestone
changed the AssigneeDecember 11, 2023 at 9:36 AM
Ethan Freestone
Jack Golding
Ethan Freestone
changed the StatusDecember 11, 2023 at 9:36 AM
In Code Review
Open
Jag Goraya
changed the AssigneeDecember 8, 2023 at 1:25 PM
Owen Stephens
Ethan Freestone
Ethan Freestone
changed the StatusDecember 8, 2023 at 1:25 PM
In QA
In Code Review
Jag Goraya
changed the AssigneeDecember 8, 2023 at 12:07 PM
Ethan Freestone
Owen Stephens
Ethan Freestone
changed the StatusDecember 8, 2023 at 12:07 PM
In Code Review
In QA
Jag Goraya
updated the SprintDecember 6, 2023 at 12:24 PM
ERM Sprint 177, ERM Sprint 179
ERM Sprint 177, ERM Sprint 179, ERM Sprint 180
Jag Goraya
updated the Linked IssuesDecember 6, 2023 at 12:19 PM
None
This issue links to "Page (FOLIO Wiki)"
Jag Goraya
changed the AssigneeDecember 4, 2023 at 9:54 AM
Jack Golding
Ethan Freestone
Jack Golding
changed the StatusDecember 4, 2023 at 9:54 AM
In progress
In Code Review
Jag Goraya
updated the Linked IssuesNovember 27, 2023 at 10:59 AM
None
This issue links to "Page (FOLIO Wiki)"
Jack Golding
changed the StatusNovember 27, 2023 at 10:54 AM
Open
In progress
Jag Goraya
updated the Linked IssuesNovember 22, 2023 at 12:15 PM
None
This issue links to "Page (FOLIO Wiki)"
Jag Goraya
changed the AssigneeNovember 22, 2023 at 11:53 AM
Unassigned
Jack Golding
Jag Goraya
updated the Linked IssuesNovember 20, 2023 at 10:14 AM
None
This issue links to "Page (FOLIO Wiki)"
Jag Goraya
updated the SprintNovember 8, 2023 at 12:37 PM
ERM Sprint 177, ERM Sprint 178
ERM Sprint 177, ERM Sprint 179
Jag Goraya
changed the AssigneeNovember 8, 2023 at 12:26 PM
Claudia Malzer
Unassigned
Jag Goraya
updated the Linked IssuesNovember 8, 2023 at 11:28 AM
None
This issue links to "Page (FOLIO Wiki)"
Jag Goraya
updated the SprintNovember 6, 2023 at 12:13 PM
ERM Sprint 177
ERM Sprint 177, ERM Sprint 178
Jag Goraya
updated the Linked IssuesOctober 30, 2023 at 4:28 PM
None
This issue links to "Page (FOLIO Wiki)"
Ethan Freestone
updated the DescriptionOctober 25, 2023 at 2:38 PM
*Overview:* It should not be possible to delete values from the StringTemplate.Context refdata category in agreements *Steps to Reproduce:* # Got to Settings -> Agreements -> Pick list values # Select StringTemplate.Context  in pick list drop down # See that the values display with a trashcan icon *Expected Results:* No trashcan icon Should be controlled with `@CategoryId(defaultInternal=true)` on the reference data category. Migration may also be needed to fix existing instances   h2. Dev task breakdown This is a multi step process: # Change domain class to make use of defaultInternal # Ensure we have no missing data: ** Write migration for all missing entries (should be at most 2, unless something really funky has gone on ** Something like: {code:java} changeSet(author: "efreestone (manual)", id: "20210922-1534-002") { grailsChange { change { sql.eachRow(""" SELECT DISTINCT strt_context FROM ${database.defaultSchemaName}.string_template INNER JOIN ${database.defaultSchemaName}.refdata_value ON string_template.strt_context = refdata_value.rdv_id WHERE NOT EXISTS ( SELECT rdv_id FROM ${database.defaultSchemaName}.refdata_value WHERE rdv_id = strt_context )""".toString() ) { def row -> sql.execute(""" INSERT INTO ${database.defaultSchemaName}.refdata_value (rdv_id, rdv_version, rdv_value, rdv_owner, rdv_label) ${row.strt_context} as id, 0 as version, 'missing_context_${row.strt_context}' as value,          ( SELECT rdc_id FROM ${database.defaultSchemaName}.refdata_category WHERE rdc_description='StringTemplate.Context' ) as owner,          'Missing context ${row.strt_context}' as label """.toString()) } } } }{code} ** This SQL and closure need testing, as I've written it without double checking it works. The top part _should_ find all StringTemplate contexts which do not exist as refdata values, then pass those to the Closure below as "row", where we can use that in a _different_ SQL query to insert a new refdata value with that id. # In this case (Not necessarily always true) we went from String -> refdata, so we should add a migration changing the column type from VARCHAR(255) to VARCHAR(36) # Add migration for foreign key constraint # Add migration changing defaultInternal to true for the refdata category
*Overview:* It should not be possible to delete values from the StringTemplate.Context refdata category in agreements *Steps to Reproduce:* # Got to Settings -> Agreements -> Pick list values # Select StringTemplate.Context  in pick list drop down # See that the values display with a trashcan icon *Expected Results:* No trashcan icon Should be controlled with `@CategoryId(defaultInternal=true)` on the reference data category. Migration may also be needed to fix existing instances   h2. Dev task breakdown This is a multi step process: # Change domain class to make use of defaultInternal # Ensure we have no missing data: ** Write migration for all missing entries (should be at most 2, unless something really funky has gone on) ** Something like: {code:java} changeSet(author: "efreestone (manual)", id: "20210922-1534-002") { grailsChange { change { sql.eachRow(""" SELECT DISTINCT strt_context FROM ${database.defaultSchemaName}.string_template INNER JOIN ${database.defaultSchemaName}.refdata_value ON string_template.strt_context = refdata_value.rdv_id WHERE NOT EXISTS ( SELECT rdv_id FROM ${database.defaultSchemaName}.refdata_value WHERE rdv_id = strt_context )""".toString() ) { def row -> sql.execute(""" INSERT INTO ${database.defaultSchemaName}.refdata_value (rdv_id, rdv_version, rdv_value, rdv_owner, rdv_label) ${row.strt_context} as id, 0 as version, 'missing_context_${row.strt_context}' as value,          ( SELECT rdc_id FROM ${database.defaultSchemaName}.refdata_category WHERE rdc_description='StringTemplate.Context' ) as owner,          'Missing context ${row.strt_context}' as label """.toString()) } } } }{code} ** This SQL and closure need testing, as I've written it without double checking it works. The top part _should_ find all StringTemplate contexts which do not exist as refdata values, then pass those to the Closure below as "row", where we can use that in a _different_ SQL query to insert a new refdata value with that id. # In this case (Not necessarily always true) we went from String -> refdata, so we should add a migration changing the column type from VARCHAR(255) to VARCHAR(36) # Add migration for foreign key constraint # Add migration changing defaultInternal to true for the refdata category
Ethan Freestone
updated the DescriptionOctober 25, 2023 at 2:33 PM
*Overview:* It should not be possible to delete values from the StringTemplate.Context refdata category in agreements *Steps to Reproduce:* # Got to Settings -> Agreements -> Pick list values # Select StringTemplate.Context  in pick list drop down # See that the values display with a trashcan icon *Expected Results:* No trashcan icon Should be controlled with `@CategoryId(defaultInternal=true)` on the reference data category. Migration may also be needed to fix existing instances   h2. Dev task breakdown This is a multi step process: # Change domain class to make use of defaultInternal # Ensure we have no missing data: ** Write migration for all missing entries (should be at most 2, unless something really funky has gone on ** Something like: {code:java} changeSet(author: "efreestone (manual)", id: "20210922-1534-002") { grailsChange { change { sql.eachRow(""" SELECT DISTINCT strt_context FROM ${database.defaultSchemaName}.string_template INNER JOIN ${database.defaultSchemaName}.refdata_value ON string_template.strt_context = refdata_value.rdv_id WHERE NOT EXISTS ( SELECT rdv_id FROM ${database.defaultSchemaName}.refdata_value WHERE rdv_id = strt_context )""".toString() ) { def row -> sql.execute(""" INSERT INTO ${database.defaultSchemaName}.refdata_value (rdv_id, rdv_version, rdv_value, rdv_owner, rdv_label) ${row.strt_context} as id, 0 as version, 'missing_context_${row.strt_context}' as value,          ( SELECT rdc_id FROM ${database.defaultSchemaName}.refdata_category WHERE rdc_description='StringTemplate.Context' ) as owner,          'Missing context ${row.strt_context}' as label """.toString()) } } } }{code} ** This SQL and closure need testing, as I've written it without double checking it works. The top part _should_ find all StringTemplate contexts which do not exist as refdata values, then pass those to the Closure below as "row", where we can use that in a _different_ SQL query to insert a new refdata value with that id. # In this case (Not necessarily always true) we went from String -> refdata, so we should add a migration changing the column type from VARCHAR(255) to VARCHAR(36) # Add migration for foreign key constraint # Add migration changing defaultInternal to true for the refdata category
*Overview:* It should not be possible to delete values from the StringTemplate.Context refdata category in agreements *Steps to Reproduce:* # Got to Settings -> Agreements -> Pick list values # Select StringTemplate.Context  in pick list drop down # See that the values display with a trashcan icon *Expected Results:* No trashcan icon Should be controlled with `@CategoryId(defaultInternal=true)` on the reference data category. Migration may also be needed to fix existing instances   h2. Dev task breakdown This is a multi step process: # Change domain class to make use of defaultInternal # Ensure we have no missing data: ** Write migration for all missing entries (should be at most 2, unless something really funky has gone on ** Something like: {code:java} changeSet(author: "efreestone (manual)", id: "20210922-1534-002") { grailsChange { change { sql.eachRow(""" SELECT DISTINCT strt_context FROM ${database.defaultSchemaName}.string_template INNER JOIN ${database.defaultSchemaName}.refdata_value ON string_template.strt_context = refdata_value.rdv_id WHERE NOT EXISTS ( SELECT rdv_id FROM ${database.defaultSchemaName}.refdata_value WHERE rdv_id = strt_context )""".toString() ) { def row -> sql.execute(""" INSERT INTO ${database.defaultSchemaName}.refdata_value (rdv_id, rdv_version, rdv_value, rdv_owner, rdv_label) ${row.strt_context} as id, 0 as version, 'missing_context_${row.strt_context}' as value,          ( SELECT rdc_id FROM ${database.defaultSchemaName}.refdata_category WHERE rdc_description='StringTemplate.Context' ) as owner,          'Missing context ${row.strt_context}' as label """.toString()) } } } }{code} ** This SQL and closure need testing, as I've written it without double checking it works. The top part _should_ find all StringTemplate contexts which do not exist as refdata values, then pass those to the Closure below as "row", where we can use that in a _different_ SQL query to insert a new refdata value with that id. # In this case (Not necessarily always true) we went from String -> refdata, so we should add a migration changing the column type from VARCHAR(255) to VARCHAR(36) # Add migration for foreign key constraint # Add migration changing defaultInternal to true for the refdata category
Ethan Freestone
updated the DescriptionOctober 25, 2023 at 2:32 PM
*Overview:* It should not be possible to delete values from the StringTemplate.Context refdata category in agreements *Steps to Reproduce:* # Got to Settings -> Agreements -> Pick list values # Select StringTemplate.Context  in pick list drop down # See that the values display with a trashcan icon *Expected Results:* No trashcan icon Should be controlled with `@CategoryId(defaultInternal=true)` on the reference data category. Migration may also be needed to fix existing instances
*Overview:* It should not be possible to delete values from the StringTemplate.Context refdata category in agreements *Steps to Reproduce:* # Got to Settings -> Agreements -> Pick list values # Select StringTemplate.Context  in pick list drop down # See that the values display with a trashcan icon *Expected Results:* No trashcan icon Should be controlled with `@CategoryId(defaultInternal=true)` on the reference data category. Migration may also be needed to fix existing instances   h2. Dev task breakdown This is a multi step process: # Change domain class to make use of defaultInternal # Ensure we have no missing data: ** Write migration for all missing entries (should be at most 2, unless something really funky has gone on ** Something like: {code:java} changeSet(author: "efreestone (manual)", id: "20210922-1534-002") { grailsChange { change { sql.eachRow(""" SELECT DISTINCT strt_context FROM ${database.defaultSchemaName}.string_template INNER JOIN ${database.defaultSchemaName}.refdata_value ON string_template.strt_context = refdata_value.rdv_id WHERE NOT EXISTS ( SELECT rdv_id FROM ${database.defaultSchemaName}.refdata_value WHERE rdv_id = strt_context )""".toString() ) { def row -> sql.execute(""" INSERT INTO ${database.defaultSchemaName}.refdata_value (rdv_id, rdv_version, rdv_value, rdv_owner, rdv_label) ${row.strt_context} as id, 0 as version, 'missing_context_${row.strt_context}' as value,          ( SELECT rdc_id FROM ${database.defaultSchemaName}.refdata_category WHERE rdc_description='StringTemplate.Context' ) as owner,          'Missing context ${row.strt_context}' as label """.toString()) } } } }{code} ** This SQL and closure need testing, as I've written it without double checking it works. The top part _should_ find all StringTemplate contexts which do not exist as refdata values, then pass those to the Closure below as "row", where we can use that in a _different_ SQL query to insert a new refdata value with that id. # In this case (Not necessarily always true) we went from String -> refdata, so we should add a migration changing the column type from VARCHAR(255) to VARCHAR(36) # Add migration for foreign key constraint # Add migration changing defaultInternal to true for the refdata category
Jag Goraya
updated the Linked IssuesOctober 25, 2023 at 11:36 AM
None
This issue links to "Page (FOLIO Wiki)"
Jag Goraya
updated the Linked IssuesOctober 23, 2023 at 11:45 AM
None
This issue links to "Page (FOLIO Wiki)"
Jag Goraya
changed the AssigneeOctober 23, 2023 at 10:53 AM
Unassigned
Claudia Malzer
Jag Goraya
updated the Linked IssuesOctober 23, 2023 at 10:42 AM
None
This issue links to "Page (FOLIO Wiki)"
Owen Stephens
updated the SprintOctober 23, 2023 at 9:55 AM
None
ERM Sprint 177
Jag Goraya
updated the SprintOctober 18, 2023 at 10:59 AM
ERM Sprint 176
None
Jag Goraya
updated the ReleaseOctober 18, 2023 at 10:52 AM
Poppy (R2 2023) Bug Fix
Quesnelia (R1 2024)
Jag Goraya
changed the StatusOctober 18, 2023 at 10:50 AM
In progress
Open
Jag Goraya
changed the AssigneeOctober 18, 2023 at 10:50 AM
Jack Golding
Unassigned
Jack Golding
changed the StatusOctober 18, 2023 at 10:35 AM
Open
In progress
Jag Goraya
updated the Linked IssuesOctober 16, 2023 at 10:34 AM
None
This issue links to "Page (FOLIO Wiki)"
Jag Goraya
changed the AssigneeOctober 16, 2023 at 10:21 AM
Unassigned
Jack Golding
Owen Stephens
updated the DescriptionOctober 16, 2023 at 10:16 AM
*Overview:* It should not be possible to delete values from the StringTemplate.Context refdata category in agreements *Steps to Reproduce:* # Got to Settings -> Agreements -> Pick list values # Select StringTemplate.Context  in pick list drop down # See that the values display with a trashcan icon *Expected Results:* No trashcan icon Should be controlled with `@CategoryId(defaultInternal=true)` on the reference data category{*}{*}
*Overview:* It should not be possible to delete values from the StringTemplate.Context refdata category in agreements *Steps to Reproduce:* # Got to Settings -> Agreements -> Pick list values # Select StringTemplate.Context  in pick list drop down # See that the values display with a trashcan icon *Expected Results:* No trashcan icon Should be controlled with `@CategoryId(defaultInternal=true)` on the reference data category. Migration may also be needed to fix existing instances
Owen Stephens
changed the AssigneeOctober 16, 2023 at 9:51 AM
Owen Stephens
Unassigned
Owen Stephens
changed the StatusOctober 16, 2023 at 9:51 AM
Draft
Open
Owen Stephens
created the IssueOctober 13, 2023 at 11:04 AM
Done

Details

Assignee

Reporter

Components

Priority

Sprint

Development Team

Bienenvolk

Release

Quesnelia (R1 2024)

RCA Group

TBD

Affected releases

Poppy (R2 2023)
Orchid (R1 2023)
Nolana (R3 2022)

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created October 13, 2023 at 11:04 AM
Updated March 29, 2024 at 2:59 PM
Resolved March 29, 2024 at 2:59 PM
TestRail: Cases
TestRail: Runs

Flag notifications