Skip to content

Commit cfca074

Browse files
fix(jira): rename "Jira Server" to "Jira Data Center" in UI labels (#8903)
* fix(jira): rename Jira Server to Jira Data Center in UI labels * fix(jira): show both Jira Server and Jira Data Center labels
1 parent 1b0d580 commit cfca074

3 files changed

Lines changed: 7 additions & 18 deletions

File tree

backend/plugins/webhook/api/issues.go

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ package api
1919

2020
import (
2121
"fmt"
22-
"github.com/apache/incubator-devlake/core/log"
23-
"github.com/apache/incubator-devlake/helpers/dbhelper"
2422
"net/http"
2523
"time"
2624

25+
"github.com/apache/incubator-devlake/core/log"
26+
"github.com/apache/incubator-devlake/helpers/dbhelper"
27+
2728
"github.com/apache/incubator-devlake/core/dal"
2829
"github.com/apache/incubator-devlake/core/errors"
2930
"github.com/apache/incubator-devlake/core/models/domainlayer"
@@ -283,7 +284,7 @@ func CloseIssueByName(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput
283284
err := connectionHelper.FirstByName(connection, input.Params)
284285
return closeIssue(input, err, connection)
285286
}
286-
287+
287288
// CloseIssueByBodyByName
288289
// @Summary close an issue by connection name (body-based)
289290
// @Description Close an incident using connection name + issueKey in request body.
@@ -333,12 +334,6 @@ func closeIssue(input *plugin.ApiResourceInput, err errors.Error, connection *mo
333334
if domainIssue.ResolutionDate == nil {
334335
domainIssue.ResolutionDate = &now
335336
}
336-
if domainIssue.LeadTimeMinutes == nil || *domainIssue.LeadTimeMinutes == 0 {
337-
if domainIssue.CreatedDate != nil {
338-
temp := uint(domainIssue.ResolutionDate.Sub(*domainIssue.CreatedDate).Minutes())
339-
domainIssue.LeadTimeMinutes = &temp
340-
}
341-
}
342337
// save
343338
err = tx.Update(domainIssue)
344339
if err != nil {
@@ -355,12 +350,6 @@ func closeIssue(input *plugin.ApiResourceInput, err errors.Error, connection *mo
355350
if domainIncident.ResolutionDate == nil {
356351
domainIncident.ResolutionDate = &now
357352
}
358-
if domainIncident.LeadTimeMinutes == nil || *domainIncident.LeadTimeMinutes == 0 {
359-
if domainIncident.CreatedDate != nil {
360-
temp := uint(domainIncident.ResolutionDate.Sub(*domainIncident.CreatedDate).Minutes())
361-
domainIncident.LeadTimeMinutes = &temp
362-
}
363-
}
364353
// save
365354
err = tx.Update(domainIncident)
366355
if err != nil {

config-ui/src/plugins/register/jira/config.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const JiraConfig: IPluginConfig = {
4949
'By default, DevLake uses dynamic rate limit for optimized data collection for Jira. But you can adjust the collection speed by setting up your desirable rate limit.',
5050
learnMore: DOC_URL.PLUGIN.JIRA.RATE_LIMIT,
5151
externalInfo:
52-
'Jira Cloud does not specify a maximum value of rate limit. For Jira Server, please contact your admin for more information.',
52+
'Jira Cloud does not specify a maximum value of rate limit. For Jira Server / Jira Data Center, please contact your admin for more information.',
5353
defaultValue: 10000,
5454
},
5555
],

config-ui/src/plugins/register/jira/connection-fields/auth.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export const Auth = ({ type, initialValues, values, setValues, setErrors }: Prop
124124
<Block title="Jira Version" required>
125125
<Radio.Group value={version} onChange={handleChangeVersion}>
126126
<Radio value="cloud">Jira Cloud</Radio>
127-
<Radio value="server">Jira Server</Radio>
127+
<Radio value="server">Jira Server / Jira Data Center</Radio>
128128
</Radio.Group>
129129

130130
<Block
@@ -136,7 +136,7 @@ export const Auth = ({ type, initialValues, values, setValues, setErrors }: Prop
136136
? 'Provide the Jira instance API endpoint. For Jira Cloud, e.g. https://your-company.atlassian.net/rest/. Please note that the endpoint URL should end with /.'
137137
: ''}
138138
{version === 'server'
139-
? 'Provide the Jira instance API endpoint. For Jira Server, e.g. https://jira.your-company.com/rest/. Please note that the endpoint URL should end with /.'
139+
? 'Provide the Jira instance API endpoint. For Jira Server / Jira Data Center, e.g. https://jira.your-company.com/rest/. Please note that the endpoint URL should end with /.'
140140
: ''}
141141
</>
142142
}

0 commit comments

Comments
 (0)