Workflow is an app that allows teams to manage and track their work efficiently. The issue management system enables users to create issues, organize them by teams, and break down complex tasks into sub-issues. Currently, when users create new issues or sub-issues, they are not created and do not appear on the board or in the issue list, which prevents teams from tracking their work effectively. Your task is to fix this issue on the backend.
Steps to Reproduce:
Log in using Email: alex@workflow.dev / Password: Password@123 Click on the + icon present in the top right of the screen Fill in the issue details and click Create Notice that the issue is not appearing on the board or in the issue list
Steps to Reproduce:
Click on any existing issue from the board to open the issue detail page Click on the Add Sub-Issue button Fill in the sub-issue details and click the Create button Notice that the sub-issue is not appearing in the sub-issues list
Each issue or sub-issue must have a unique identifier that combines the team key with an auto-incremented number (e.g., ENG-1, ENG-2, DES-1) The identifier should increment sequentially for each team independently Sub-issues must maintain a proper parent-child relationship with their parent issue Activity tracking should log issue creation automatically
Error Responses: json// 400 Missing title { "message": "Title is required" }
// 404 Team not found { "message": "team not found" }
Success Response (201): json{ "issue": { "_id": "issue_id", "identifier": "ENG-1", "title": "Implement user authentication", "description": "Add JWT based authentication system", "status": "todo", "priority": "high", "team": { "_id": "team_id", "name": "Engineering", "key": "ENG", "icon": "⚙" }, "assignee": "user_id", "creator": "user_id", "parentIssue": null, "labels": ["backend", "security"], "createdAt": "2024-01-01T00:03:00.000Z", "updatedAt": "2024-01-01T00:03:00.000Z" } }


issueRoutes.js ← add authenticate to POST route
issueController.js ← createIssue function
