Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 12 additions & 1 deletion Rdmp.Core/Curation/Data/Catalogue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -424,6 +425,15 @@ public string Source_of_data_collection
set => SetField(ref _sourceOfDataCollection, value);
}

/// <summary>
/// User specified free text field for internal notes about the Catalogue. Not published externally to RDMP
/// </summary>
public string InternalNote
{
get => _internalNote;
set => SetField(ref _internalNote, value);
}

/// <summary>
/// Identifier for a ticket in your <see cref="ITicketingSystem"/> for documenting / auditing work on the Catalogue and for
/// recording issues (if you are not using the RDMP issue system (see CatalogueItemIssue))
Expand Down Expand Up @@ -549,7 +559,7 @@ public DateTime? DatasetStartDate
/// <inheritdoc/>
public LoadMetadata[] LoadMetadatas()
{

var loadMetadataLinkIDs = Repository.GetAllObjectsWhere<LoadMetadataCatalogueLinkage>("CatalogueID", ID).Select(l => l.LoadMetadataID);

return Repository.GetAllObjects<LoadMetadata>().Where(cat => loadMetadataLinkIDs.Contains(cat.ID)).ToArray();
Expand Down Expand Up @@ -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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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


1 change: 1 addition & 0 deletions Rdmp.Core/Rdmp.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@
<EmbeddedResource Include="Databases\CatalogueDatabase\up\078_AddLastLoadTimeToLoadMetadata.sql" />
<EmbeddedResource Include="Databases\CatalogueDatabase\up\084_AddLoadDirectorySplit.sql" />
<EmbeddedResource Include="Databases\CatalogueDatabase\up\085_AddTicketingReleaseStatuses.sql" />
<EmbeddedResource Include="Databases\CatalogueDatabase\up\092_AddCatalogueInternalNote.sql" />
<EmbeddedResource Include="Databases\CatalogueDatabase\up\091_AddTemplateFlagToCIC.sql" />
<EmbeddedResource Include="Databases\CatalogueDatabase\up\090_UpdateCatalogueMetadata.sql" />
<EmbeddedResource Include="Databases\CatalogueDatabase\up\089_AddDataLoadVersioning.sql" />
Expand Down
159 changes: 93 additions & 66 deletions Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Rdmp.UI/MainFormUITabs/CatalogueUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}
Expand Down Expand Up @@ -527,6 +528,7 @@ private void freeFormTextChipDisplay1_Load(object sender, EventArgs e)
{

}

}

[TypeDescriptionProvider(typeof(AbstractControlDescriptionProvider<CatalogueUI_Design, UserControl>))]
Expand Down
2 changes: 1 addition & 1 deletion Rdmp.UI/NavigationTrack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public NavigationTrack(Func<T, bool> aliveDelegate, Action<T> activate)
public void Prune()
{
_navigationStack = new Stack<T>(_navigationStack.ToArray().Take(MaxHistory + 1).Reverse().Where(_isAlive));
_forward = new Stack<T>(_forward.ToArray().Reverse().Where(_isAlive));
_forward = new Stack<T>(_forward.ToArray().AsEnumerable().Reverse().Where(_isAlive));
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Rdmp.UI/Performance/PerformanceCounterResultsUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading
Loading