Beispiel #1
0
        public string GetCRMFieldName(int ticketTypeID, int cRMLinkID)
        {
            var crmFieldName = string.Empty;

            using (var jiraTicketsService = new JiraTicketsService(new JiraRepository(new GenericRepository <CRMLinkField>(), new GenericRepository <TicketTypes>())))
            {
                crmFieldName = jiraTicketsService.GetCRMFieldName(ticketTypeID, cRMLinkID);
            }
            return(crmFieldName);
        }
Beispiel #2
0
        public CrmLinkTable GetCRMLinkTableData(int?crmLinkId)
        {
            var crmLinkTable = new CrmLinkTable();

            using (var jiraTicketsService = new JiraTicketsService(new JiraRepository(new GenericRepository <CrmLinkTable>())))
            {
                crmLinkTable = jiraTicketsService.GetCrmLinkTableById(crmLinkId).FirstOrDefault();
            }
            return(crmLinkTable);
        }
Beispiel #3
0
        /// <summary>
        /// TicketsView is deprecated! This is to be replaced with a call to Tickets, only
        /// </summary>
        /// <param name="ticketId"></param>
        /// <returns></returns>
        public string GetTicketDescription(int ticketId, int organizationId)
        {
            var description = string.Empty;

            using (var jiraTicketsService = new JiraTicketsService(new JiraRepository(new GenericRepository <Actions>(), new GenericRepository <Tickets>())))
            {
                description = jiraTicketsService.GetDescriptionFromActionsForNewTicketCreation(ticketId, organizationId);
            }
            return(description);
        }
Beispiel #4
0
        /// <summary>
        /// TicketsView is deprecated! This is to be replaced with a call to Tickets, only
        /// </summary>
        /// <param name="ticketId"></param>
        /// <returns></returns>
        public Tickets GetTicketData(int ticketId)
        {
            var ticketData = new Tickets();

            using (var jiraTicketsService = new JiraTicketsService(new JiraRepository(new GenericRepository <Tickets>())))
            {
                ticketData = jiraTicketsService.GetTicketData(ticketId);
            }
            return(ticketData);
        }
Beispiel #5
0
        public Users GetUserMetaData(int?assignedUserToTicketId)
        {
            if (assignedUserToTicketId == null)
            {
                return(new Users());
            }
            var response = new Users();

            using (var jiraTicketsService = new JiraTicketsService(new JiraRepository(new GenericRepository <Users>())))
            {
                response = jiraTicketsService.GetUserMetaData(assignedUserToTicketId);
            }

            return(response);
        }
Beispiel #6
0
        public bool SaveTicketLinkToJira(TicketLinkToJira ticketLinkToJira)
        {
            var response = true;

            try
            {
                using (var jiraTicketsService = new JiraTicketsService(new JiraRepository(new GenericRepository <TicketLinkToJira>())))
                {
                    jiraTicketsService.SaveJiraTickets(ticketLinkToJira);
                }
            }catch (Exception ex)
            {
                response = false;
                //ToDo: add logging here and exception handling
            }
            return(response);
        }