Skip to content

Correct creation of and deduplicate SpAppResourceDirs#7993

Merged
grantfitzsimmons merged 2 commits intov7_12_0_4from
issue-7984-2
Apr 18, 2026
Merged

Correct creation of and deduplicate SpAppResourceDirs#7993
grantfitzsimmons merged 2 commits intov7_12_0_4from
issue-7984-2

Conversation

@melton-jason
Copy link
Copy Markdown
Contributor

@melton-jason melton-jason commented Apr 17, 2026

Fixes part of #7984
Companion of #7990

Checklist

Testing instructions

If needed, you can use the following Query to identity SpAppResourceDirs and any AppResources within those "directories":

SELECT dir.SpAppResourceDirID, dir.TimestampCreated, dir.DisciplineID, dir.SpecifyUserID, dir.DisciplineType, dir.UserType, CASE WHEN dir.IsPersonal=1 THEN 'True' ELSE 'False' END AS 'Is Personal', appresource.Description, appresource.Level, appresource.MimeType, appresource.Name FROM SpAppResourceDir dir LEFT OUTER JOIN SpAppResource appresource ON appresource.SpAppResourceDirID=dir.SpAppResourceDirID ORDER BY dir.SpAppResourceDirID;

You can also use the following query to idenity SpAppResourceDirs and any View Sets within those "directories":

SELECT dir.SpAppResourceDirID, dir.TimestampCreated, dir.DisciplineID, dir.SpecifyUserID, dir.DisciplineType, dir.UserType, CASE WHEN dir.IsPersonal=1 THEN 'True' ELSE 'False' END AS 'Is Personal', viewset.FileName, viewset.Level, viewset.Name FROM SpAppResourceDir dir LEFT OUTER JOIN SpViewsetObj viewset ON viewset.SpAppResourceDirID=dir.SpAppResourceDirID ORDER BY dir.SpAppResourceDirID;

For the Issue when looking for duplicates, you will be looking for SpAppResourceDir records that have a new Timestamp Created and have the following attributes (which should appear in earlier SpAppResourceDir records if they previously existed):

  • a non-NULL DisciplineID

  • NULL CollectionID

  • NULL UserType

  • False IsPersonal

  • Use a database that has migrations ran from any version of v7.12.0.0-v7.12.0.3 (and thus will have duplicated SpAppResourceDirs)

  • Execute the run_key_migration_functions and ensure the duplicate SpAppResourceDir records get deleted

  • Use a database that does not have migrations from any version of v7.12.0 ran on it

  • Ensure that there are no duplicated SpAppResourceDir records, and if any were created that they have a "correct" DisciplineType (the name of the Discipline they're assigned to)

@melton-jason melton-jason added this to the 7.12.0 milestone Apr 17, 2026
@github-project-automation github-project-automation bot moved this to 📋Back Log in General Tester Board Apr 17, 2026
@melton-jason melton-jason changed the title fix: correct creation of and deduplicate SpAppResourceDirs Correct creation of and deduplicate SpAppResourceDirs Apr 17, 2026
Copy link
Copy Markdown
Member

@grantfitzsimmons grantfitzsimmons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Use a database that has migrations ran from any version of v7.12.0.0-v7.12.0.3 (and thus will have duplicated SpAppResourceDirs)
  • Execute the run_key_migration_functions and ensure the duplicate SpAppResourceDir records get deleted
  • Use a database that does not have migrations from any version of v7.12.0 ran on it
  • Ensure that there are no duplicated SpAppResourceDir records, and if any were created that they have a "correct" DisciplineType (the name of the Discipline they're assigned to)

👍 Tested on a local copy of the paris DB (with 7.12) and a copy of KU Vert Paleo (never used with 7.12)

@grantfitzsimmons grantfitzsimmons merged commit 545caf1 into v7_12_0_4 Apr 18, 2026
14 checks passed
@grantfitzsimmons grantfitzsimmons deleted the issue-7984-2 branch April 18, 2026 00:16
@github-project-automation github-project-automation bot moved this from 📋Back Log to ✅Done in General Tester Board Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅Done

Development

Successfully merging this pull request may close these issues.

3 participants