File tree 3 files changed +29
-7
lines changed
3 files changed +29
-7
lines changed Original file line number Diff line number Diff line change @@ -227,8 +227,8 @@ export enum pages {
227
227
cmpResourceOwnerRank = '/{orgName}/cmp/resource-rank/owner' ,
228
228
publisherContent = '/{orgName}/dop/publisher/{type}/{publisherItemId}' ,
229
229
iterationDetail = '/{orgName}/dop/projects/{projectId}/issues/iteration/{iterationId}/{issueType}' ,
230
- taskList = '/{orgName}/dop/projects/{projectId}/issues/task' ,
231
- bugList = '/{orgName}/dop/projects/{projectId}/issues/bug' ,
230
+ taskList = '/{orgName}/dop/projects/{projectId}/issues/all?type= task' ,
231
+ bugList = '/{orgName}/dop/projects/{projectId}/issues/all?type= bug' ,
232
232
issueDetail = '/{orgName}/dop/projects/{projectId}/issues/{issueType}?id={issueId}&iterationID={iterationId}&type={issueType}' ,
233
233
ticketDetail = '/{orgName}/dop/projects/{projectId}/ticket?id={issueId}&pageNo=1' ,
234
234
backlog = '/{orgName}/dop/projects/{projectId}/issues/backlog?id={issueId}&issueType={issueType}' ,
Original file line number Diff line number Diff line change @@ -396,6 +396,7 @@ interface RouteConfigItem {
396
396
pageNameInfo ?: ( ) => JSX . Element ;
397
397
keepQuery ?: boolean ;
398
398
getComp ?: ( cb : RouterGetComp ) => Promise < any > ;
399
+ render ?: ( props : { location : Location } ) => React . ReactNode ;
399
400
}
400
401
401
402
declare function GET_ROUTES ( ) : RouteConfigItem [ ] ;
Original file line number Diff line number Diff line change 11
11
// You should have received a copy of the GNU Affero General Public License
12
12
// along with this program. If not, see <http://www.gnu.org/licenses/>.
13
13
14
+ import React from 'react' ;
15
+ import { Redirect } from 'react-router-dom' ;
16
+ import { qs } from 'common/utils' ;
14
17
import getAppRouter from 'application/router' ;
15
18
import i18n from 'i18n' ;
16
19
import {
@@ -75,11 +78,29 @@ function getProjectRouter(): RouteConfigItem[] {
75
78
} ,
76
79
{
77
80
path : 'task' ,
78
- tabs : COLLABORATE_TABS ,
79
- ignoreTabQuery : true ,
80
- getComp : ( cb ) => cb ( import ( 'project/pages/issue/task' ) ) ,
81
- layout : {
82
- noWrapper : true ,
81
+ render : ( props ) => {
82
+ const { location } = props ;
83
+ const { search } = location ;
84
+ const params = qs . parse ( search ) ;
85
+ return < Redirect to = { `all?${ qs . stringify ( { ...params , type : 'TASK' } ) } ` } /> ;
86
+ } ,
87
+ } ,
88
+ {
89
+ path : 'bug' ,
90
+ render : ( props ) => {
91
+ const { location } = props ;
92
+ const { search } = location ;
93
+ const params = qs . parse ( search ) ;
94
+ return < Redirect to = { `all?${ qs . stringify ( { ...params , type : 'BUG' } ) } ` } /> ;
95
+ } ,
96
+ } ,
97
+ {
98
+ path : 'requirement' ,
99
+ render : ( props ) => {
100
+ const { location } = props ;
101
+ const { search } = location ;
102
+ const params = qs . parse ( search ) ;
103
+ return < Redirect to = { `all?${ qs . stringify ( { ...params , type : 'REQUIREMENT' } ) } ` } /> ;
83
104
} ,
84
105
} ,
85
106
{
You can’t perform that action at this time.
0 commit comments