Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue tracker module #109

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion OrchardCoreContrib.Modules.sln
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCoreContrib.Themes.A
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCoreContrib.Liquid", "src\OrchardCoreContrib.Liquid\OrchardCoreContrib.Liquid.csproj", "{8C49A05B-5D69-4222-9245-310E412E237E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrchardCoreContrib.Sms.Azure", "src\OrchardCoreContrib.Sms.Azure\OrchardCoreContrib.Sms.Azure.csproj", "{47BE63E8-AECC-43E5-AC48-2E2835452402}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCoreContrib.Sms.Azure", "src\OrchardCoreContrib.Sms.Azure\OrchardCoreContrib.Sms.Azure.csproj", "{47BE63E8-AECC-43E5-AC48-2E2835452402}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCoreContrib.IssueTracker", "src\OrchardCoreContrib.IssueTracker\OrchardCoreContrib.IssueTracker.csproj", "{BBB66E6C-28A1-424A-9630-70DBBB09614C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -156,6 +158,10 @@ Global
{47BE63E8-AECC-43E5-AC48-2E2835452402}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47BE63E8-AECC-43E5-AC48-2E2835452402}.Release|Any CPU.ActiveCfg = Release|Any CPU
{47BE63E8-AECC-43E5-AC48-2E2835452402}.Release|Any CPU.Build.0 = Release|Any CPU
{BBB66E6C-28A1-424A-9630-70DBBB09614C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BBB66E6C-28A1-424A-9630-70DBBB09614C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BBB66E6C-28A1-424A-9630-70DBBB09614C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BBB66E6C-28A1-424A-9630-70DBBB09614C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -184,6 +190,7 @@ Global
{EF11652A-B9A2-4E5E-897E-16F26C4D6946} = {C80A325F-F4C4-4C7B-A3CF-FB77CD8C9949}
{8C49A05B-5D69-4222-9245-310E412E237E} = {C80A325F-F4C4-4C7B-A3CF-FB77CD8C9949}
{47BE63E8-AECC-43E5-AC48-2E2835452402} = {C80A325F-F4C4-4C7B-A3CF-FB77CD8C9949}
{BBB66E6C-28A1-424A-9630-70DBBB09614C} = {C80A325F-F4C4-4C7B-A3CF-FB77CD8C9949}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {48F73B05-7D3D-4ACF-81AE-A98B2B4EFDB2}
Expand Down
15 changes: 15 additions & 0 deletions src/OrchardCoreContrib.IssueTracker/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OrchardCoreContrib.IssueTracker.Controllers;
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
}
11 changes: 11 additions & 0 deletions src/OrchardCoreContrib.IssueTracker/Manifest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using OrchardCore.Modules.Manifest;

[assembly: Module(
Name = "Issue Tracker",
Author = "The Orchard Core Community",
Website = "https://github.com/OrchardCoreContrib",
Version = "0.0.1",
Description = "Provides a set of features and services to manage and track issues.",
Dependencies = new[] { "OrchardCore.Contents", "OrchardCore.Taxonomies", "OrchardCore.Media" },
Category = "Content Management"
)]
173 changes: 173 additions & 0 deletions src/OrchardCoreContrib.IssueTracker/Migrations.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
using OrchardCore.ContentFields.Settings;
using OrchardCore.ContentManagement;
using OrchardCore.ContentManagement.Metadata;
using OrchardCore.ContentManagement.Metadata.Settings;
using OrchardCore.Data.Migration;
using OrchardCore.Media.Settings;
using OrchardCore.Taxonomies.Settings;

namespace OrchardCoreContrib.IssueTracker;
public class Migrations : DataMigration
{
IContentDefinitionManager _contentDefinitionManager;

public Migrations(IContentDefinitionManager contentDefinitionManager)
{
_contentDefinitionManager = contentDefinitionManager;
}

public int Create()
{
// Issue Priority
_contentDefinitionManager.AlterTypeDefinition("IssuePriority", type => type
.DisplayedAs("Issue Priority")
.WithPart("TitlePart", part => part
.WithPosition("0")
)
.WithPart("IssuePriority", part => part
.WithPosition("1")
)
.WithPart("AutoroutePart", part => part
.WithPosition("2")
)
);

// Issue Status
_contentDefinitionManager.AlterTypeDefinition("IssueStatus", type => type
.DisplayedAs("Issue Status")
.WithPart("TitlePart", part => part
.WithPosition("0")
)
.WithPart("IssueStatus", part => part
.WithPosition("1")
)
.WithPart("AutoroutePart", part => part
.WithPosition("2")
)
);

// Issue Category
_contentDefinitionManager.AlterTypeDefinition("IssueCategory", type => type
.DisplayedAs("Issue Category")
.WithPart("TitlePart", part => part
.WithPosition("0")
)
.WithPart("IssueCategory", part => part
.WithPosition("1")
)
.WithPart("AutoroutePart", part => part
.WithPosition("2")
)
);

_contentDefinitionManager.AlterPartDefinition("IssueCategory", part => part
.WithField("ResponsibleUsers", field => field
.OfType("UserPickerField")
.WithDisplayName("Responsible Users")
.WithPosition("0")
.WithSettings(new UserPickerFieldSettings
{
Required = true,
Multiple = true,
DisplayAllUsers = false,
DisplayedRoles = new[]
{
"Administrator",
},
})
)
);

// Issue
_contentDefinitionManager.AlterTypeDefinition("Issue", type => type
.DisplayedAs("Issue")
.Creatable()
.Listable()
.Securable()
.WithPart("Issue", part => part
.WithPosition("2")
)
.WithPart("AutoroutePart", part => part
.WithPosition("3")
)
.WithPart("TitlePart", part => part
.WithPosition("0")
)
.WithPart("ContactInformationPart", part => part
.WithPosition("1")
)
);

_contentDefinitionManager.AlterPartDefinition("Issue", part => part
.WithField("Description", field => field
.OfType("MarkdownField")
.WithDisplayName("Description")
.WithEditor("Wysiwyg")
.WithPosition("0")
)
.WithField("Files", field => field
.OfType("MediaField")
.WithDisplayName("Files")
.WithEditor("Attached")
.WithPosition("4")
)
.WithField("Category", field => field
.OfType("TaxonomyField")
.WithDisplayName("Category")
.WithPosition("1")
.WithSettings(new TaxonomyFieldSettings
{
Required = true,
TaxonomyContentItemId = "4gj5zq9wf1zaet99mqab9gvw4g",
Unique = true,
})
)
.WithField("Assignees", field => field
.OfType("UserPickerField")
.WithDisplayName("Assignees")
.WithPosition("2")
.WithSettings(new UserPickerFieldSettings
{
Multiple = true,
DisplayAllUsers = false,
DisplayedRoles = new[]
{
"Administrator",
},
})
)
.WithField("Priority", field => field
.OfType("TaxonomyField")
.WithDisplayName("Priority")
.WithPosition("3")
.WithSettings(new TaxonomyFieldSettings
{
TaxonomyContentItemId = "4mwtqz7n7dqyr1hxnr7hcte148",
})
)
);

_contentDefinitionManager.AlterPartDefinition("ContactInformationPart", part => part
.Attachable()
.WithDescription("Contact Information")
.WithField("Name", field => field
.OfType("TextField")
.WithDisplayName("Name")
.WithPosition("0")
)
.WithField("Email", field => field
.OfType("TextField")
.WithDisplayName("Email")
.WithEditor("Email")
.WithPosition("2")
)
.WithField("Phone", field => field
.OfType("TextField")
.WithDisplayName("Phone")
.WithEditor("Tel")
.WithPosition("1")
)
);
return 1;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="OrchardCore.Module.Targets" Version="1.7.0" />
<PackageReference Include="OrchardCore.ContentManagement" Version="1.7.0" />
<PackageReference Include="OrchardCore.ContentTypes.Abstractions" Version="1.7.0" />
<PackageReference Include="OrchardCore.DisplayManagement" Version="1.7.0" />
<PackageReference Include="OrchardCore.Taxonomies" Version="1.7.0" />
<PackageReference Include="OrchardCore.Media" Version="1.7.0" />
<PackageReference Include="OrchardCore.ContentFields" Version="1.7.0" />
</ItemGroup>

<ItemGroup>
<Folder Include="Drivers\" />
<Folder Include="Models\" />
<Folder Include="Settings\" />
</ItemGroup>

</Project>
29 changes: 29 additions & 0 deletions src/OrchardCoreContrib.IssueTracker/Startup.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Fluid;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.ContentManagement;
using OrchardCore.ContentManagement.Display.ContentDisplay;
using OrchardCore.ContentManagement.Handlers;
using OrchardCore.ContentTypes.Editors;
using OrchardCore.Data.Migration;
using OrchardCore.Modules;

namespace OrchardCoreContrib.IssueTracker;
public class Startup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddDataMigration<Migrations>();
}

public override void Configure(IApplicationBuilder builder, IEndpointRouteBuilder routes, IServiceProvider serviceProvider)
{
routes.MapAreaControllerRoute(
name: "Home",
areaName: "OrchardCoreContrib.IssueTracker",
pattern: "Home/Index",
defaults: new { controller = "Home", action = "Index" }
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Template
9 changes: 9 additions & 0 deletions src/OrchardCoreContrib.IssueTracker/Views/_ViewImports.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@*
For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860

*@

@inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, OrchardCore.DisplayManagement
@addTagHelper *, OrchardCore.ResourceManagement
43 changes: 43 additions & 0 deletions src/OrchardCoreContrib.IssueTracker/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Issue Tracker Module

## Definitions
**Issue** - Used for reporting problems, requesting new features, or any request for something to be done.

**Project** - A set of related tasks that need to be completed.

**Milestone** - A date when something should happen such the date something is due to be completed.

**Member** - A user who is responsible for some part of an issue or project.

## Features
### Common to both an Issue and a Project
- [ ] Title
- [ ] Body (html or markdown)
- [ ] Requestor contact information
- [ ] Members (Assign to one or more users who are responsible for the task)
- [ ] Attach files
- [ ] Category
- [ ] Different groups of people should be linked to different categories. For example, IT would be responsible for the category "Computer" and Application Development would be responsible for the "Website" category
- [ ] Status (New, In Progress, completed, cancelled, etc)
- [ ] Priority
- [ ] Comments
- [ ] Milestones

### Issue
- [ ] A user should be able to submit an Issue without having access to the admin side
- [ ] Users can view all Issues they have submitted

### Project
- [ ] Multiple Issues can be associated with a project

### Milestone
- [ ] Title
- [ ] Body (html or markdown)
- [ ] Date

### Member
- [ ] User

### Workflows
- [ ] Users who submitted or are assigned to should be notified when a change is made or comment added
- [ ] Users should be notified when new content is added with a Category they are responsible for
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<ProjectReference Include="..\OrchardCoreContrib.Gravatar\OrchardCoreContrib.Gravatar.csproj" />
<ProjectReference Include="..\OrchardCoreContrib.HealthChecks\OrchardCoreContrib.HealthChecks.csproj" />
<ProjectReference Include="..\OrchardCoreContrib.Html\OrchardCoreContrib.Html.csproj" />
<ProjectReference Include="..\OrchardCoreContrib.IssueTracker\OrchardCoreContrib.IssueTracker.csproj" />
<ProjectReference Include="..\OrchardCoreContrib.Liquid\OrchardCoreContrib.Liquid.csproj" />
<ProjectReference Include="..\OrchardCoreContrib.ReverseProxy.Yarp\OrchardCoreContrib.ReverseProxy.Yarp.csproj" />
<ProjectReference Include="..\OrchardCoreContrib.Sms.Azure\OrchardCoreContrib.Sms.Azure.csproj" />
Expand Down
Loading