예제 #1
0
        public UserStoryIdZone Create(UserStoryIdZone entity)
        {
            _userStory.InsertOne(entity);

            Logger_Domain logD = new Logger_Domain()
            {
                type        = "IdeaZone@UserStoryCreated",
                description = "A member created a UserStory",
                published   = DateTime.Now
            };
            Logger_Activity logA = new Logger_Activity()
            {
                id          = "user",
                type        = "Activity@UserStoryCreated",
                description = "A member Created a Userstory",
                details     = new data()
                {
                    id   = entity.Id,
                    name = entity.UserStoryName
                },
                published = DateTime.Now,
            };
            RabbitMQProducer producerA = new RabbitMQProducer();

            producerA.SendMessageToLoggerA(logA);
            Console.WriteLine(logA);
            RabbitMQProducer producerD = new RabbitMQProducer();

            producerD.SendMessageToLoggerD(logD);
            Console.WriteLine(logD);

            return(entity);
        }
예제 #2
0
        public void Remove(string id)
        {
            _userStory.DeleteOne(usstory => usstory.Id == id);
            Logger_Domain logD = new Logger_Domain()
            {
                type        = "IdeaZone@userStoryDeleted",
                description = "A member deleted a UserStory",
                published   = DateTime.Now
            };
            Logger_Activity logA = new Logger_Activity()
            {
                id          = "user",
                type        = "Activity@UserStoryDeleted",
                description = "A member moved Userstories to Product Backlog",
                details     = new data()
                {
                    id   = id,
                    name = ""
                },
                published = DateTime.Now
            };
            RabbitMQProducer producerA = new RabbitMQProducer();

            producerA.SendMessageToLoggerA(logA);
            Console.WriteLine(logA);
            RabbitMQProducer producerD = new RabbitMQProducer();

            producerD.SendMessageToLoggerD(logD);
            Console.WriteLine(logD);
        }
예제 #3
0
        public EpicsIdZone Create(EpicsIdZone entity, string username, string userid, string projectId)
        {
            _epic.InsertOne(entity);

            Logger_Domain logD = new Logger_Domain()
            {
                type        = "IdeaZone@EpicCreated",
                description = "A member created a Epic",
                published   = DateTime.Now.Add(new TimeSpan(0, 5, 30, 0)),
            };
            Logger_Activity logA = new Logger_Activity()
            {
                id          = userid,
                type        = "Activity@EpicCreated",
                description = username + " has created an Epic " + entity.EpicName,
                details     = new data()
                {
                    id   = entity.Id,
                    name = entity.EpicName
                },
                published = DateTime.Now,
                projectId = projectId
            };
            RabbitMQProducer producerA = new RabbitMQProducer();

            producerA.SendMessageToLoggerA(logA);
            Console.WriteLine(logA);
            RabbitMQProducer producerD = new RabbitMQProducer();

            producerD.SendMessageToLoggerD(logD);
            Console.WriteLine(logD);

            return(entity);
        }
예제 #4
0
        public void Remove(string id, string username, string userid, string projectId)
        {
            EpicsIdZone Epic = _epic.Find <EpicsIdZone>(epic => epic.Id == id).FirstOrDefault();

            Logger_Domain logD = new Logger_Domain()
            {
                type        = "IdeaZone@EpicDeleted",
                description = "A member has deleted an Epic",
                published   = DateTime.Now.Add(new TimeSpan(0, 5, 30, 0))
            };
            Logger_Activity logA = new Logger_Activity()
            {
                id          = userid,
                type        = "Activity@EpicDeleted",
                description = username + " has deleted an Epic " + Epic.EpicName,
                details     = new data()
                {
                    id   = id,
                    name = " "
                },
                published = DateTime.Now,
                projectId = projectId
            };
            RabbitMQProducer producerA = new RabbitMQProducer();

            producerA.SendMessageToLoggerA(logA);
            Console.WriteLine(logA);
            RabbitMQProducer producer1 = new RabbitMQProducer();

            producer1.SendMessageToLoggerD(logD);
            Console.WriteLine(logD);
            _epic.DeleteOne(epic => epic.Id == id);
        }
예제 #5
0
        public void UpdateEpicStatus(string id, string status, string username, string userid, string projectId)
        {
            Console.WriteLine("status of epic will change to " + status);
            EpicsIdZone Epic = _epic.Find <EpicsIdZone>(epic => epic.Id == id).FirstOrDefault();

            _epic.UpdateOne(
                epic => epic.Id == id,
                Builders <EpicsIdZone> .Update.Set(epic => epic.status, status));
            Logger_Domain logD = new Logger_Domain()
            {
                type        = "IdeaZone@UserStoriesMovedWS",
                description = (status == "requested")?username + " has requested to move an Epic " + Epic.EpicName + " to Workspace"
                                                     : (status == "productbacklog")?username + " has moved an Epic " + Epic.EpicName + " to ProductBacklog"
                                                     : username + " has moved an Epic " + Epic.EpicName + " Back to Workspace",
                published = DateTime.Now.Add(new TimeSpan(0, 5, 30, 0)),
            };
            Logger_Activity logA = new Logger_Activity()
            {
                id          = userid,
                type        = "Activity@UserStoryMovedWS",
                description = (status == "requested") ? username + " has requested to move an Epic " + Epic.EpicName + " to Workspace"
                                                      : (status == "productbacklog") ? username + " has moved an Epic " + Epic.EpicName + " to ProductBacklog"
                                                     : username + " has moved an Epic " + Epic.EpicName + " Back to Workspace",
                details = new data()
                {
                    id   = id,
                    name = ""
                },
                published = DateTime.Now,
                projectId = projectId
            };
            RabbitMQProducer producerA = new RabbitMQProducer();

            producerA.SendMessageToLoggerA(logA);
            Console.WriteLine(logA);
            RabbitMQProducer producerD = new RabbitMQProducer();

            producerD.SendMessageToLoggerD(logD);
            Console.WriteLine(logD);
        }
예제 #6
0
        public void UpdateStoryStatus(string id, string status, string ProjectId, string username, string userid)
        {
            Console.WriteLine("ProjectId received while moving user story to Product Backlog " + ProjectId);
            Console.WriteLine(status);


            _userStory.UpdateOne(
                usstory => usstory.Id == id,
                Builders <UserStoryIdZone> .Update.Set(usstory => usstory.Status, status));
            UserStoryIdZone obj    = _userStory.Find <UserStoryIdZone>(usstory => usstory.Id == id).FirstOrDefault();
            UserStoryIdeas  entity = new UserStoryIdeas();

            entity.linkedtoId         = obj.Id;
            entity.description        = obj.UserStoryName;
            entity.acceptanceCriteria = obj.UserStoryDescription;
            entity.action             = "put";
            entity.projectId          = ProjectId;
            if (status == "Backlog")
            {
                entity.action = "post";
            }
            else
            {
                entity.action = "delete";
            }
            Console.WriteLine("entity action " + entity.action);

            RabbitMQProducer producerM = new RabbitMQProducer();

            producerM.SendBacklog(entity);
            //producerM.SendBacklogBoard(entity);
            Console.WriteLine(entity);
            Logger_Domain logD = new Logger_Domain()
            {
                type        = "IdeaZone@UserStoriesMovedPB",
                description = "A member moved Userstories to Product Backlog",
                published   = DateTime.Now.Add(new TimeSpan(0, 5, 30, 0)),
            };
            Logger_Activity logA = new Logger_Activity()
            {
                id          = userid,
                type        = "Activity@UserStoryMovedPB",
                description = (status == "Backlog") ? username + " moved Userstory ( " + obj.UserStoryName + " ) to Product Backlog"
                                                   : username + " moved Userstory ( " + obj.UserStoryName + " )  back to Workspace",
                details = new data()
                {
                    id   = id,
                    name = ""
                },
                published = DateTime.Now,
                projectId = ProjectId
            };
            RabbitMQProducer producerA = new RabbitMQProducer();

            producerA.SendMessageToLoggerA(logA);
            Console.WriteLine(logA);
            RabbitMQProducer producerD = new RabbitMQProducer();

            producerD.SendMessageToLoggerD(logD);
            Console.WriteLine(logD);
        }