Class TicketRelationHelper
Inheritance
TicketRelationHelper
Assembly: SoDataBase.dll
Syntax
public static class TicketRelationHelper
Methods
CheckExistingRelationAsync(int, int, int, CancellationToken)
Declaration
public static Task<bool> CheckExistingRelationAsync(int ticketRelationId, int sourceTicketId, int destinationTicketId, CancellationToken cancellationToken)
Parameters
Returns
CheckIfRelationDefinitionForTicketTypesExistsAsync(int, int, int, TicketRelationType, CancellationToken)
Declaration
public static Task<(bool Exists, string ExistingName)> CheckIfRelationDefinitionForTicketTypesExistsAsync(int ticketRelationDefId, int sourceTicketTypeId, int destinationTicketTypeId, TicketRelationType relationType, CancellationToken cancellationToken)
Parameters
Returns
EvaluateTicketRelationActionsAsync(int, CancellationToken)
Determines whether a ticket can be closed based on its related tickets and returns the IDs of any related
tickets that prevent or offer closure.
If the ticket can be closed, list of child tickets that offer closure is returned.
If the ticket can be closed, checking maybe it is the last not closed child of another ticket, which based on definition rules should be offered to be closed too.
Declaration
public static Task<(bool CanCloseTicket, List<TicketData> Children, int TicketIdToClose)> EvaluateTicketRelationActionsAsync(int ticketId, CancellationToken cancellationToken)
Parameters
| Type |
Name |
Description |
| int |
ticketId |
Ticket ID, 0 if ticket is new
|
| CancellationToken |
cancellationToken |
A token to monitor for cancellation requests.
|
Returns
GetChildTicketIdsToCloseAsync(int, CancellationToken)
Declaration
public static Task<List<int>> GetChildTicketIdsToCloseAsync(int parentTicketId, CancellationToken cancellationToken)
Parameters
Returns
GetTicketParentRelationDataAsync(int, CancellationToken)
Declaration
public static Task<TicketParentRelationtData> GetTicketParentRelationDataAsync(int ticketId, CancellationToken cancellationToken)
Parameters
Returns
GetTicketRelationDataAsync(int, CancellationToken)
Declaration
public static Task<TicketRelationtData> GetTicketRelationDataAsync(int ticketRelationId, CancellationToken cancellationToken = default)
Parameters
Returns
GetTicketRelationDefId(int, int, TicketRelationType, CancellationToken)
Declaration
public static Task<TicketRelationDefInfo> GetTicketRelationDefId(int sourceTicketTypeId, int destinationTicketTypeId, TicketRelationType ticketRelationType, CancellationToken cancellationToken)
Parameters
Returns
GetTicketRelationsInfoAsync(int, CancellationToken)
Declaration
public static Task<MainTicketInfo> GetTicketRelationsInfoAsync(int ticketId, CancellationToken cancellationToken)
Parameters
Returns
InverseRelation(TicketRelationType)
Declaration
public static TicketRelationType InverseRelation(TicketRelationType relationType)
Parameters
Returns
IsParentRequiredAsync(int, CancellationToken)
Declaration
public static Task<bool> IsParentRequiredAsync(int ticketTypeId, CancellationToken cancellationToken)
Parameters
Returns
UpdateTicketRelationDefIdForTicketRelationAsync(int)
Declaration
public static Task UpdateTicketRelationDefIdForTicketRelationAsync(int ticketId)
Parameters
| Type |
Name |
Description |
| int |
ticketId |
|
Returns