diff --git a/CHANGELOG.md b/CHANGELOG.md index c7edb79356..65a407f7d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [9.2.0] - Unreleased +- Add Internal Note to Catalogue + ## [9.1.2] - Unreleased - Automatically fetch user settings from previous versions of RDMP when installing the latest version - Allow new columns to be added to archive extractions diff --git a/Rdmp.Core/Curation/Data/Catalogue.cs b/Rdmp.Core/Curation/Data/Catalogue.cs index a7a58ab621..e144c636b6 100644 --- a/Rdmp.Core/Curation/Data/Catalogue.cs +++ b/Rdmp.Core/Curation/Data/Catalogue.cs @@ -67,6 +67,7 @@ public sealed class Catalogue : DatabaseEntity, IComparable, ICatalogue, IInject private Uri _queryToolUrl; private Uri _sourceUrl; private string _countryOfOrigin; + private string _internalNote; private string _dataStandards; @@ -424,6 +425,15 @@ public string Source_of_data_collection set => SetField(ref _sourceOfDataCollection, value); } + /// + /// User specified free text field for internal notes about the Catalogue. Not published externally to RDMP + /// + public string InternalNote + { + get => _internalNote; + set => SetField(ref _internalNote, value); + } + /// /// Identifier for a ticket in your for documenting / auditing work on the Catalogue and for /// recording issues (if you are not using the RDMP issue system (see CatalogueItemIssue)) @@ -549,7 +559,7 @@ public DateTime? DatasetStartDate /// public LoadMetadata[] LoadMetadatas() { - + var loadMetadataLinkIDs = Repository.GetAllObjectsWhere("CatalogueID", ID).Select(l => l.LoadMetadataID); return Repository.GetAllObjects().Where(cat => loadMetadataLinkIDs.Contains(cat.ID)).ToArray(); @@ -1112,6 +1122,7 @@ internal Catalogue(ICatalogueRepository repository, DbDataReader r) DataType = r["DataType"].ToString(); DataSubType = r["DataSubType"].ToString(); Doi = r["Doi"].ToString(); + InternalNote = r["InternalNote"].ToString(); var updateLag = r["UpdateLag"]; if (updateLag == null || updateLag == DBNull.Value) { diff --git a/Rdmp.Core/Databases/CatalogueDatabase/runAfterCreateDatabase/CreateCatalogue.sql b/Rdmp.Core/Databases/CatalogueDatabase/runAfterCreateDatabase/CreateCatalogue.sql index 0715584ad8..72065b0dbb 100644 --- a/Rdmp.Core/Databases/CatalogueDatabase/runAfterCreateDatabase/CreateCatalogue.sql +++ b/Rdmp.Core/Databases/CatalogueDatabase/runAfterCreateDatabase/CreateCatalogue.sql @@ -289,7 +289,8 @@ CREATE TABLE [dbo].[Catalogue]( [AssociatedPeople] [nvarchar](MAX) NULL, [Doi] [nvarchar](50) NULL, [Purpose] [nvarchar](255) NULL, - [AssociatedMedia] [nvarchar](max) NULL + [AssociatedMedia] [nvarchar](max) NULL, + [InternalNote] [nvarchar](max) NULL, CONSTRAINT [PK_Data_Catalogue] PRIMARY KEY CLUSTERED ( [ID] ASC diff --git a/Rdmp.Core/Databases/CatalogueDatabase/up/092_AddCatalogueInternalNote.sql b/Rdmp.Core/Databases/CatalogueDatabase/up/092_AddCatalogueInternalNote.sql new file mode 100644 index 0000000000..f64592d8bc --- /dev/null +++ b/Rdmp.Core/Databases/CatalogueDatabase/up/092_AddCatalogueInternalNote.sql @@ -0,0 +1,11 @@ +--Version: 9.2.0 +--Description: Add new metadata fields for catalogues +if not exists (select 1 from sys.columns where name = 'InternalNote' and OBJECT_NAME(object_id) = 'Catalogue') +BEGIN +ALTER TABLE [dbo].[Catalogue] +ADD +[InternalNote] [nvarchar](max) NULL +END +GO + + diff --git a/Rdmp.Core/Rdmp.Core.csproj b/Rdmp.Core/Rdmp.Core.csproj index a840864982..a4ea445462 100644 --- a/Rdmp.Core/Rdmp.Core.csproj +++ b/Rdmp.Core/Rdmp.Core.csproj @@ -256,6 +256,7 @@ + diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs index 62abb71b24..0e49185516 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs @@ -35,103 +35,106 @@ private void InitializeComponent() splitContainer1 = new SplitContainer(); cbInternal = new CheckBox(); cbDeprecated = new CheckBox(); - editableFolder = new SimpleControls.EditableLabelUI(); - editableCatalogueName = new SimpleControls.EditableLabelUI(); + editableFolder = new Rdmp.UI.SimpleControls.EditableLabelUI(); + editableCatalogueName = new Rdmp.UI.SimpleControls.EditableLabelUI(); ticketingControl1 = new TicketingControlUI(); tabControl1 = new TabControl(); tabPage1 = new TabPage(); + groupBox26 = new GroupBox(); + tbInternalNote = new TextBox(); groupBox23 = new GroupBox(); - aiAcronym = new SimpleControls.AdditionalInfomationUI(); + aiAcronym = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); tbAcronym = new TextBox(); groupBox16 = new GroupBox(); - aiDescription = new SimpleControls.AdditionalInfomationUI(); + aiDescription = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); tbDescription = new TextBox(); groupBox15 = new GroupBox(); - aiShortDescription = new SimpleControls.AdditionalInfomationUI(); + aiShortDescription = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); tbAbstract = new TextBox(); tabPage2 = new TabPage(); tableLayoutPanel2 = new TableLayoutPanel(); groupBox18 = new GroupBox(); - aiDatasetType = new SimpleControls.AdditionalInfomationUI(); - ddDatasetType = new SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); + aiDatasetType = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); + ddDatasetType = new Rdmp.UI.SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); groupBox22 = new GroupBox(); - aiKeywords = new SimpleControls.AdditionalInfomationUI(); - ffcKeywords = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); + aiKeywords = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); + ffcKeywords = new Rdmp.UI.SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); groupBox19 = new GroupBox(); - aiDatasetSubtype = new SimpleControls.AdditionalInfomationUI(); - ddDatasetSubtype = new SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); + aiDatasetSubtype = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); + ddDatasetSubtype = new Rdmp.UI.SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); groupBox21 = new GroupBox(); - ddDataSourceSetting = new SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); - aiDataSourceSetting = new SimpleControls.AdditionalInfomationUI(); + ddDataSourceSetting = new Rdmp.UI.SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); + aiDataSourceSetting = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); groupBox20 = new GroupBox(); - ddDataSource = new SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); - aiDataSource = new SimpleControls.AdditionalInfomationUI(); - groupBox24 = new GroupBox(); - aiPurposeOfDataset = new SimpleControls.AdditionalInfomationUI(); - cbPurpose = new ComboBox(); + ddDataSource = new Rdmp.UI.SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay(); + aiDataSource = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); groupBox17 = new GroupBox(); - aiResourceType = new SimpleControls.AdditionalInfomationUI(); + aiResourceType = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); cb_resourceType = new ComboBox(); + groupBox24 = new GroupBox(); + aiPurposeOfDataset = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); + cbPurpose = new ComboBox(); tabPage3 = new TabPage(); groupBox14 = new GroupBox(); - aiEndDate = new SimpleControls.AdditionalInfomationUI(); + aiEndDate = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); dtpEndDate = new DateTimePicker(); btnEndDateClear = new Button(); groupBox13 = new GroupBox(); - aiStartDate = new SimpleControls.AdditionalInfomationUI(); + aiStartDate = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); dtpStart = new DateTimePicker(); btnStartDateClear = new Button(); groupBox12 = new GroupBox(); - aiGranularity = new SimpleControls.AdditionalInfomationUI(); + aiGranularity = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); cb_granularity = new ComboBox(); groupBox11 = new GroupBox(); - aiGeographicalCoverage = new SimpleControls.AdditionalInfomationUI(); + aiGeographicalCoverage = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); tbGeoCoverage = new TextBox(); tabPage4 = new TabPage(); groupBox10 = new GroupBox(); - aiJuristiction = new SimpleControls.AdditionalInfomationUI(); + aiJuristiction = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); tbJuristiction = new TextBox(); groupBox9 = new GroupBox(); - aiDataProcessor = new SimpleControls.AdditionalInfomationUI(); + aiDataProcessor = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); tbDataProcessor = new TextBox(); groupBox8 = new GroupBox(); - aiDataController = new SimpleControls.AdditionalInfomationUI(); + aiDataController = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); tbDataController = new TextBox(); groupBox7 = new GroupBox(); - aiAccessContact = new SimpleControls.AdditionalInfomationUI(); + aiAccessContact = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); tbAccessContact = new TextBox(); tabPage5 = new TabPage(); groupBox3 = new GroupBox(); - aiDOI = new SimpleControls.AdditionalInfomationUI(); + aiDOI = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); tbDOI = new TextBox(); tableLayoutPanel1 = new TableLayoutPanel(); groupBox2 = new GroupBox(); - aiControlledGroup = new SimpleControls.AdditionalInfomationUI(); - fftControlledVocab = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); + aiControlledGroup = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); + fftControlledVocab = new Rdmp.UI.SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); groupBox1 = new GroupBox(); - aiPeople = new SimpleControls.AdditionalInfomationUI(); - ffcPeople = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); + aiPeople = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); + ffcPeople = new Rdmp.UI.SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); tabPage6 = new TabPage(); - aiUpdateFrequency = new SimpleControls.AdditionalInfomationUI(); + aiUpdateFrequency = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); groupBox6 = new GroupBox(); - aiUpdateLag = new SimpleControls.AdditionalInfomationUI(); + aiUpdateLag = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); cbUpdateLag = new ComboBox(); groupBox5 = new GroupBox(); - aiInitialReleaseDate = new SimpleControls.AdditionalInfomationUI(); + aiInitialReleaseDate = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); dtpReleaseDate = new DateTimePicker(); btnReleaseDateClear = new Button(); groupBox4 = new GroupBox(); cb_updateFrequency = new ComboBox(); tabPage7 = new TabPage(); groupBox25 = new GroupBox(); - aiAssociatedMedia = new SimpleControls.AdditionalInfomationUI(); - ffAssociatedMedia = new SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); + aiAssociatedMedia = new Rdmp.UI.SimpleControls.AdditionalInfomationUI(); + ffAssociatedMedia = new Rdmp.UI.SimpleControls.MultiSelectChips.FreeFormTextChipDisplay(); ((System.ComponentModel.ISupportInitialize)splitContainer1).BeginInit(); splitContainer1.Panel1.SuspendLayout(); splitContainer1.Panel2.SuspendLayout(); splitContainer1.SuspendLayout(); tabControl1.SuspendLayout(); tabPage1.SuspendLayout(); + groupBox26.SuspendLayout(); groupBox23.SuspendLayout(); groupBox16.SuspendLayout(); groupBox15.SuspendLayout(); @@ -142,8 +145,8 @@ private void InitializeComponent() groupBox19.SuspendLayout(); groupBox21.SuspendLayout(); groupBox20.SuspendLayout(); - groupBox24.SuspendLayout(); groupBox17.SuspendLayout(); + groupBox24.SuspendLayout(); tabPage3.SuspendLayout(); groupBox14.SuspendLayout(); groupBox13.SuspendLayout(); @@ -255,6 +258,7 @@ private void InitializeComponent() // tabPage1.AutoScroll = true; tabPage1.BackColor = System.Drawing.Color.WhiteSmoke; + tabPage1.Controls.Add(groupBox26); tabPage1.Controls.Add(groupBox23); tabPage1.Controls.Add(groupBox16); tabPage1.Controls.Add(groupBox15); @@ -266,6 +270,25 @@ private void InitializeComponent() tabPage1.Text = "Descriptions"; tabPage1.Click += tabPage1_Click; // + // groupBox26 + // + groupBox26.Controls.Add(tbInternalNote); + groupBox26.Location = new System.Drawing.Point(7, 396); + groupBox26.Name = "groupBox26"; + groupBox26.Size = new System.Drawing.Size(866, 165); + groupBox26.TabIndex = 9; + groupBox26.TabStop = false; + groupBox26.Text = "Internal Note"; + // + // tbInternalNote + // + tbInternalNote.Location = new System.Drawing.Point(6, 22); + tbInternalNote.MaxLength = 250; + tbInternalNote.Multiline = true; + tbInternalNote.Name = "tbInternalNote"; + tbInternalNote.Size = new System.Drawing.Size(851, 116); + tbInternalNote.TabIndex = 2; + // // groupBox23 // groupBox23.Controls.Add(aiAcronym); @@ -529,33 +552,6 @@ private void InitializeComponent() aiDataSource.Size = new System.Drawing.Size(20, 20); aiDataSource.TabIndex = 24; // - // groupBox24 - // - groupBox24.AutoSize = true; - groupBox24.Controls.Add(aiPurposeOfDataset); - groupBox24.Controls.Add(cbPurpose); - groupBox24.Location = new System.Drawing.Point(207, 6); - groupBox24.Name = "groupBox24"; - groupBox24.Size = new System.Drawing.Size(194, 67); - groupBox24.TabIndex = 20; - groupBox24.TabStop = false; - groupBox24.Text = "Purpose of Dataset"; - // - // aiPurposeOfDataset - // - aiPurposeOfDataset.Location = new System.Drawing.Point(114, 0); - aiPurposeOfDataset.Name = "aiPurposeOfDataset"; - aiPurposeOfDataset.Size = new System.Drawing.Size(20, 20); - aiPurposeOfDataset.TabIndex = 27; - // - // cbPurpose - // - cbPurpose.FormattingEnabled = true; - cbPurpose.Location = new System.Drawing.Point(6, 22); - cbPurpose.Name = "cbPurpose"; - cbPurpose.Size = new System.Drawing.Size(182, 23); - cbPurpose.TabIndex = 1; - // // groupBox17 // groupBox17.AutoSize = true; @@ -583,6 +579,33 @@ private void InitializeComponent() cb_resourceType.Size = new System.Drawing.Size(182, 23); cb_resourceType.TabIndex = 0; // + // groupBox24 + // + groupBox24.AutoSize = true; + groupBox24.Controls.Add(aiPurposeOfDataset); + groupBox24.Controls.Add(cbPurpose); + groupBox24.Location = new System.Drawing.Point(207, 6); + groupBox24.Name = "groupBox24"; + groupBox24.Size = new System.Drawing.Size(194, 67); + groupBox24.TabIndex = 20; + groupBox24.TabStop = false; + groupBox24.Text = "Purpose of Dataset"; + // + // aiPurposeOfDataset + // + aiPurposeOfDataset.Location = new System.Drawing.Point(114, 0); + aiPurposeOfDataset.Name = "aiPurposeOfDataset"; + aiPurposeOfDataset.Size = new System.Drawing.Size(20, 20); + aiPurposeOfDataset.TabIndex = 27; + // + // cbPurpose + // + cbPurpose.FormattingEnabled = true; + cbPurpose.Location = new System.Drawing.Point(6, 22); + cbPurpose.Name = "cbPurpose"; + cbPurpose.Size = new System.Drawing.Size(182, 23); + cbPurpose.TabIndex = 1; + // // tabPage3 // tabPage3.AutoScroll = true; @@ -1103,6 +1126,8 @@ private void InitializeComponent() splitContainer1.ResumeLayout(false); tabControl1.ResumeLayout(false); tabPage1.ResumeLayout(false); + groupBox26.ResumeLayout(false); + groupBox26.PerformLayout(); groupBox23.ResumeLayout(false); groupBox23.PerformLayout(); groupBox16.ResumeLayout(false); @@ -1123,8 +1148,8 @@ private void InitializeComponent() groupBox21.PerformLayout(); groupBox20.ResumeLayout(false); groupBox20.PerformLayout(); - groupBox24.ResumeLayout(false); groupBox17.ResumeLayout(false); + groupBox24.ResumeLayout(false); tabPage3.ResumeLayout(false); groupBox14.ResumeLayout(false); groupBox13.ResumeLayout(false); @@ -1255,5 +1280,7 @@ private void InitializeComponent() private SimpleControls.AdditionalInfomationUI aiAssociatedMedia; private SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay ddDataSourceSetting; private SimpleControls.MultiSelectChips.DropdownOptionsChipDisplay ddDataSource; + private GroupBox groupBox26; + public TextBox tbInternalNote; } } diff --git a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs index 6a79f879bd..6a8b77ee1d 100644 --- a/Rdmp.UI/MainFormUITabs/CatalogueUI.cs +++ b/Rdmp.UI/MainFormUITabs/CatalogueUI.cs @@ -127,6 +127,7 @@ protected override void SetBindings(BinderWithErrorProviderFactory rules, Catalo Bind(cbInternal, "Checked", "IsInternalDataset", c => c.IsInternalDataset); Bind(editableCatalogueName, "TextValue", "Name", c => c.Name); Bind(editableFolder, "TextValue", "Folder", c => c.Folder); + Bind(tbInternalNote, "Text", "InternalNote", c => c.InternalNote); tabControl1_SelectedIndexChanged(tabControl1, null); } @@ -527,6 +528,7 @@ private void freeFormTextChipDisplay1_Load(object sender, EventArgs e) { } + } [TypeDescriptionProvider(typeof(AbstractControlDescriptionProvider))] diff --git a/Rdmp.UI/NavigationTrack.cs b/Rdmp.UI/NavigationTrack.cs index 92b56d248e..9437fb6c2a 100644 --- a/Rdmp.UI/NavigationTrack.cs +++ b/Rdmp.UI/NavigationTrack.cs @@ -64,7 +64,7 @@ public NavigationTrack(Func aliveDelegate, Action activate) public void Prune() { _navigationStack = new Stack(_navigationStack.ToArray().Take(MaxHistory + 1).Reverse().Where(_isAlive)); - _forward = new Stack(_forward.ToArray().Reverse().Where(_isAlive)); + _forward = new Stack(_forward.ToArray().AsEnumerable().Reverse().Where(_isAlive)); } /// diff --git a/Rdmp.UI/Performance/PerformanceCounterResultsUI.cs b/Rdmp.UI/Performance/PerformanceCounterResultsUI.cs index e0e56f837e..54af79f37e 100644 --- a/Rdmp.UI/Performance/PerformanceCounterResultsUI.cs +++ b/Rdmp.UI/Performance/PerformanceCounterResultsUI.cs @@ -105,7 +105,7 @@ public void LoadState(ComprehensiveQueryPerformanceCounter performanceCounter) var query = performanceCounter.DictionaryOfQueries[stackTrace]; //get the stack trace split by line reversed so the root is at the top - var lines = stackTrace.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).Reverse() + var lines = stackTrace.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).AsEnumerable().Reverse() .ToArray(); lines = lines.Where(l => !isSystemCall.IsMatch(l)).ToArray(); diff --git a/SharedAssemblyInfo.cs b/SharedAssemblyInfo.cs index e9382b968b..4501772401 100644 --- a/SharedAssemblyInfo.cs +++ b/SharedAssemblyInfo.cs @@ -10,6 +10,6 @@ [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: AssemblyVersion("9.1.2")] -[assembly: AssemblyFileVersion("9.1.2")] -[assembly: AssemblyInformationalVersion("9.1.2")] +[assembly: AssemblyVersion("9.2.0")] +[assembly: AssemblyFileVersion("9.2.0")] +[assembly: AssemblyInformationalVersion("9.2.0")]