Skip to content

ISRequestService

Implements IISRequestService, providing the client for IS (internal help-desk) service requests: it fetches Workfront application lists over HTTP and emails incident/question reports to the help desk (or, outside production, to the current user for testing) using IEmailService, IUserProfileService, and IEnvironmentService collaborators.

Purpose

  • Retrieves the Workfront application lists used to populate IS request forms, via an HTTP call to the internal Workfront API.
  • Builds and sends an HTML-formatted incident/question email (with any uploaded attachments from the current HTTP request) to the help desk, CC'ing the submitting user.

Context

  • Namespace: SAIF.Services.Utilities.Workfront
  • Assembly/package: SAIF.Services (packaged inside the SAIF.SAIFCode.Core NuGet package)

Public members

Member Signature Purpose
ISRequestService(...) public ISRequestService(IEmailService emailService, IUserProfileService userProfileService, IEnvironmentService environmentService) Stores the email, profile, and environment collaborators, resolves the current SAIF user, and routes the help-desk email address to the real help desk in production or to the current user's own email otherwise.
GetRequestLists public string GetRequestLists() Calls WorkRequest/ApplicationLists on the internal Workfront API using default network credentials and returns the raw response body, or an empty string on a non-success HTTP status.
SendIncidentReport public bool SendIncidentReport(ISIncidentReport incident) Composes an HTML email describing incident (issue type, description, urgency) from the current user to the resolved help-desk address, attaches any files from the current HTTP request, sends it via IEmailService, and always returns true.

Behavioral notes

  • The help-desk destination address is chosen once in the constructor: the literal HelpDesk@saif.com in production, or the current user's own email otherwise — meaning non-production incident reports never actually reach the help desk*.
  • SendIncidentReport reads file uploads directly from HttpContext.Current.Request.Files, tying this method to an active ASP.NET request context rather than being independently callable*.
  • GetRequestLists disposes its HttpClientHandler/HttpClient implicitly via the method's synchronous GetAwaiter().GetResult() pattern, blocking the calling thread rather than awaiting asynchronously.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • Services/SAIF.Services/Utilities/Workfront/ISRequestService.cs