Skip to content

Commit 358e1cf

Browse files
committed
close ticket function.
1 parent 1eb8c35 commit 358e1cf

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/Support/Support/Models/Enums.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,10 @@ public enum Severity
2727
Critical,
2828
HighestCriticalImpact
2929
}
30+
31+
public enum TicketStatus
32+
{
33+
Open,
34+
Closed
35+
}
3036
}

src/Support/Support/SupportTickets/UpdateAzSupportTicket.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ public class UpdateAzSupportTicket : AzSupportCmdletBase
4141
[Parameter(Mandatory = false, HelpMessage = "Update Severity of SupportTicket.")]
4242
public Severity Severity { get; set; }
4343

44+
[Parameter(Mandatory = false, HelpMessage = "Update Status of SupportTicket.")]
45+
public TicketStatus Status { get; set; }
46+
4447
[Parameter(Mandatory = true, ParameterSetName = UpdateByNameWithContactObjectParameterSet, HelpMessage = "Update Contact details on SupportTicket.")]
4548
[Parameter(Mandatory = true, ParameterSetName = UpdateByInputObjectWithContactObjectParameterSet, HelpMessage = "Update Contact details on SupportTicket.")]
4649
[ValidateNotNull]
@@ -112,6 +115,11 @@ public override void ExecuteCmdlet()
112115
updateSupportTicket.Severity = this.Severity.ToString();
113116
}
114117

118+
if (this.IsParameterBound(c => c.Status))
119+
{
120+
updateSupportTicket.Status = this.Status.ToString();
121+
}
122+
115123
UpdateContactProfile updateContactProfile = null;
116124
if (this.ParameterSetName.Equals(UpdateByNameWithContactObjectParameterSet) ||
117125
this.ParameterSetName.Equals(UpdateByInputObjectWithContactObjectParameterSet))

0 commit comments

Comments
 (0)