• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

HicServices / RDMP / 13493861722

24 Feb 2025 08:35AM UTC coverage: 57.414% (-0.03%) from 57.446%
13493861722

push

github

web-flow
marge v8.4.3 into main (#2145)

* simple db update

* add changelog

* revert csproj

* Fix up some codeql/inspection code issues (#2087)

* Update OverviewModel.cs

Fix up some .Dispose/using issues, make finding most recent load ID more efficient

* LINQ tidying

* CodeQL fixups

* Update Catalogue.cs

Add Hashcode, Equals methods.

* Update Catalogue.cs

Tweak equality semantics for RDMP DB oddities

* Bump actions/setup-dotnet from 4.1.0 to 4.2.0

Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v4.1.0...v4.2.0)

---
updated-dependencies:
- dependency-name: actions/setup-dotnet
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump NUnit.Analyzers from 4.4.0 to 4.5.0

Bumps [NUnit.Analyzers](https://github.com/nunit/nunit.analyzers) from 4.4.0 to 4.5.0.
- [Release notes](https://github.com/nunit/nunit.analyzers/releases)
- [Changelog](https://github.com/nunit/nunit.analyzers/blob/master/CHANGES.md)
- [Commits](https://github.com/nunit/nunit.analyzers/compare/4.4.0...4.5.0)

---
updated-dependencies:
- dependency-name: NUnit.Analyzers
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump Minio from 6.0.3 to 6.0.4

Bumps [Minio](https://github.com/minio/minio-dotnet) from 6.0.3 to 6.0.4.
- [Release notes](https://github.com/minio/minio-dotnet/releases)
- [Commits](https://github.com/minio/minio-dotnet/compare/6.0.3...6.0.4)

---
updated-dependencies:
- dependency-name: Minio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump the aws-sdk group across 1 directory with 4 updates

Bumps the aws-sdk grou... (continued)

11358 of 21338 branches covered (53.23%)

Branch coverage included in aggregate %.

1116 of 1482 new or added lines in 50 files covered. (75.3%)

19 existing lines in 10 files now uncovered.

32283 of 54673 relevant lines covered (59.05%)

17450.76 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

55.88
/Rdmp.Core/Curation/Data/TicketingSystemConfiguration.cs
1
// Copyright (c) The University of Dundee 2018-2024
2
// This file is part of the Research Data Management Platform (RDMP).
3
// RDMP is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
4
// RDMP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
5
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.
6

7
using System;
8
using System.Collections.Generic;
9
using System.Data.Common;
10
using Rdmp.Core.MapsDirectlyToDatabaseTable;
11
using Rdmp.Core.MapsDirectlyToDatabaseTable.Attributes;
12
using Rdmp.Core.Repositories;
13
using Rdmp.Core.ReusableLibraryCode.Annotations;
14
using Rdmp.Core.Ticketing;
15

16
namespace Rdmp.Core.Curation.Data;
17

18
/// <summary>
19
/// Each Catalogue database can have 0 or 1 TicketingSystemConfiguration, this is a pointer to a plugin that handles communicating with a ticketing/issue system
20
/// such as JIRA.  This ticketing system is used to record ticket numbers of a variety of objects (e.g. SupportingDocuments, extraction projects etc) and allows them
21
/// to accrue man hours without compromising your current workflow.
22
/// 
23
/// <para>In addition to tying objects to your ticketing system, the ticketing system will also be consulted about whether data extraction projects are good to go or should
24
/// not be released (e.g. do not release project X until it has been paid for / signed off by the governancer).  The exact implementation of this is mostly left to the
25
/// ticketing class you write.</para>
26
/// 
27
/// <para>The Type field refers to a class that implements PluginTicketingSystem (see LoadModuleAssembly for how to write your own handler or use one of the compatible existing ones).
28
/// this class will handle all communication with the ticketing system/server.</para>
29
///
30
/// <para>There is also a reference to DataAccessCredentials record which stores optional username and encrypted password to use in the plugin for communicating with the ticketing system.</para>
31
/// 
32
/// </summary>
33
public class TicketingSystemConfiguration : DatabaseEntity, INamed
34
{
35
    #region Database Properties
36

37
    private bool _isActive;
38
    private string _url;
39
    private string _type;
40
    private string _name;
41
    private int? _dataAccessCredentials_ID;
42

43
    /// <summary>
44
    /// True if the ticketing system should be used/consulted.  Set to false if you want to temporarily disable the ticketing system link to RDMP
45
    /// without actually deleting the object.
46
    /// 
47
    /// <para>See:</para><see cref="CatalogueRepository.GetTicketingSystem"/>
48
    /// </summary>
49
    public bool IsActive
50
    {
51
        get => _isActive;
2✔
52
        set => SetField(ref _isActive, value);
16✔
53
    }
54

55
    /// <summary>
56
    /// The Url for communicating with the <see cref="ITicketingSystem"/>
57
    /// </summary>
58
    public string Url
59
    {
60
        get => _url;
2✔
61
        set => SetField(ref _url, value);
×
62
    }
63

64
    /// <summary>
65
    /// The C# System.Type of the <see cref="ITicketingSystem"/> which should be used to interact with the ticketing service
66
    /// </summary>
67
    public string Type
68
    {
69
        get => _type;
2✔
70
        set => SetField(ref _type, value);
×
71
    }
72

73
    /// <inheritdoc/>
74
    [NotNull]
75
    [Unique]
76
    public string Name
77
    {
78
        get => _name;
2✔
79
        set => SetField(ref _name, value);
16✔
80
    }
81

82
    /// <summary>
83
    /// The credentials to use to connect to the ticketing service (username/password)
84
    /// </summary>
85
    public int? DataAccessCredentials_ID
86
    {
87
        get => _dataAccessCredentials_ID;
2✔
88
        set => SetField(ref _dataAccessCredentials_ID, value);
×
89
    }
90

91
    #endregion
92

93
    #region Relationships
94

95
    /// <summary>
96
    /// Fetches the credentials to use when connecting to the ticketing service.  Returns null if no credentials have been
97
    /// configured.
98
    /// </summary>
99
    [NoMappingToDatabase]
100
    public DataAccessCredentials DataAccessCredentials =>
101
        DataAccessCredentials_ID == null
2!
102
            ? null
2✔
103
            : Repository.GetObjectByID<DataAccessCredentials>((int)DataAccessCredentials_ID);
2✔
104

105
    #endregion
106

107
    public TicketingSystemConfiguration()
×
108
    {
109
    }
×
110

111
    /// <inheritdoc/>
112
    public TicketingSystemConfiguration(ICatalogueRepository repository, string name) : base()
16✔
113
    {
114
        repository.InsertAndHydrate(this, new Dictionary<string, object>
16!
115
        {
16✔
116
            { "Name", name != null ? (object)name : DBNull.Value },
16✔
117
            { "IsActive", true }
16✔
118
        });
16✔
119
    }
16✔
120

121
    /// <summary>
122
    /// Fetches a list of acceptable release statuses set for the ticketing system
123
    /// </summary>
124
    public List<TicketingSystemReleaseStatus> GetReleaseStatuses()
125
    {
NEW
126
        return [.. Repository.GetAllObjectsWhere<TicketingSystemReleaseStatus>("TicketingSystemConfigurationID", ID)];
×
127
    }
128

129
    /// <inheritdoc/>
130
    internal TicketingSystemConfiguration(ICatalogueRepository repository, DbDataReader r) : base(repository, r)
×
131
    {
132
        IsActive = (bool)r["IsActive"];
×
133
        Url = r["Url"] as string;
×
134
        Type = r["Type"] as string;
×
135
        Name = r["Name"] as string;
×
136
        DataAccessCredentials_ID = ObjectToNullableInt(r["DataAccessCredentials_ID"]);
×
137
    }
×
138

139
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc