Hi,
I have created a plugin that is supposed to create a feature as soon as a request is created.
I can see in logs that the handler is called properly in the plugin, but no feature is created. And no errors are logged in the plugin log file and TP log file.
In another tests, I was able to create succesfully user stories and task.
Here is the class:
class CreateFeature : IHandleMessages<RequestUpdatedMessage>
{
private readonly ICommandBus _bus;
private readonly IStorageRepository _storage;
private IActivityLogger LOG = ObjectFactory.GetInstance<IActivityLogger>();
public CreateFeature(ICommandBus bus, IStorageRepository storage)
{
_bus = bus;
_storage = storage;
}
public void Handle(RequestUpdatedMessage message)
{
LOG.Info("CreateFeature - Inicio");
var requestDto = message.Dto;
CreateFeatureAndUserStory(requestDto);
LOG.Info("CreateFeature - Fim");
}
private void CreateFeatureAndUserStory(RequestDTO requestDto)
{
_bus.Send(new CreateFeatureCommand(new FeatureDTO
{
Name = requestDto.Name,
ParentID = requestDto.RequestID,
OwnerID = requestDto.OwnerID,
ProjectID = requestDto.ProjectID
}));
}
}
(note: to simplify the tests, I am handling request update only; after solving the issue of feature creation, I will update to handle request create)