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

Sync Develop with RC 5.12.0 #4016

Merged
merged 7 commits into from
Sep 23, 2024
Merged
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
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Only for technical/build aims, built image will be with nginxinc/nginx-unprivileged:alpine according to the last step


FROM alpine:3.20.3 AS generate-build-info
RUN mkdir -p /usr/src/app/build
WORKDIR /usr/src
Expand Down
40 changes: 20 additions & 20 deletions app/localization/translated/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"AddEditNotificationCaseModal.title": "{actionType} Regla de notificación",
"AddEditNotificationModal.nameLabel": "Nombre de la regla",
"AddEditNotificationModal.namePlaceholder": "Nombre de la regla",
"AddEditNotificationModal.recipientsError": "Please enter existent user name on your project or valid email",
"AddEditNotificationModal.recipientsError": "Por favor, introduzca un nombre de usuario existente en su proyecto o un correo electrónico válido",
"AddEditNotificationModal.recipientsPlaceholder": "Nombre de usuario/correo electrónico",
"AddEditNotificationModal.ruleNameHint": "Campo obligatorio. El nombre de la regla debe tener entre 1 y 55 caracteres",
"AddFilter.filterName": "Nombre del filtro",
Expand All @@ -87,10 +87,10 @@
"AddIntegrationModal.createProjectTitle": "Crear integración de proyecto",
"AddIntegrationModal.editGlobalIntegrationTitle": "Editar integración global",
"AddIntegrationModal.editProjectIntegrationTitle": "Editar integración de proyecto",
"AddLdapIntegrationModal.createLdapTitle": "Create Global Integration",
"AddLdapIntegrationModal.editLdapIntegrationTitle": "Edit Global Integration",
"AddLdapIntegrationModal.fieldSettingsTitle": "Field settings",
"AddLdapIntegrationModal.serverSettingsTitle": "Server settings",
"AddLdapIntegrationModal.createLdapTitle": "Crear Integración Global",
"AddLdapIntegrationModal.editLdapIntegrationTitle": "Editar Integratión Global",
"AddLdapIntegrationModal.fieldSettingsTitle": "Configuración de campos",
"AddLdapIntegrationModal.serverSettingsTitle": "Configuración del servidor",
"AddNewCaseButton.addNewRuleButton": "Agregar nueva regla",
"AddNewCaseButton.addRule": "Agregar regla",
"AddUserForm.addUserTitle": "Agregar usuario",
Expand Down Expand Up @@ -548,7 +548,7 @@
"DefectTypesTab.warningSubMessage": "La cantidad de tipos de defectos en tu proyecto es actualmente de {maxLength} de {maxLength}. Podrás crear uno nuevo después de eliminar al menos uno previamente creado",
"DeleteAccountBlock.deleteAccount": "Eliminar cuenta",
"DeleteAccountBlock.tooltipAdminDisabledText": "Solo los usuarios con un rol distinto al de administrador pueden eliminar su cuenta.\nAdemás, otro administrador también puede hacerlo.",
"DeleteAccountBlock.tooltipDefaultUserDisabledText": "It's forbidden to delete account of default user on Demo instance.",
"DeleteAccountBlock.tooltipDefaultUserDisabledText": "Está prohibido eliminar la cuenta del usuario por defecto en la instancia Demo.",
"DeleteAccountFeedbackModal.alternative": "Encontré una mejor alternativa",
"DeleteAccountFeedbackModal.continue": "Continuar",
"DeleteAccountFeedbackModal.deleteAccountReasonSizeHint": "El campo debe tener un tamaño máximo de 128 caracteres.",
Expand Down Expand Up @@ -1056,7 +1056,7 @@
"IntegrationsDescription.noGlobalIntegrationsButtonAdd": "Agregar integración de proyecto",
"IntegrationsDescription.noGlobalIntegrationsDescription": "Las integraciones no están configuradas. Puedes configurar manualmente una integración para este proyecto.",
"IntegrationsDescription.noGlobalIntegrationsMessage": "No hay integraciones",
"IntegrationsDescription.projectIntegrationAddLimited": "Only one Project Integration can be created",
"IntegrationsDescription.projectIntegrationAddLimited": "Sólo puede crearse un proyecto de integración",
"IntegrationsDescription.projectIntegrationReset": "Restablecer a integraciones globales",
"IntegrationsDescription.projectIntegrationResetDescription": "¿Estás seguro de que deseas restablecer la configuración a las Integraciones Globales? Todas tus integraciones de proyecto se eliminarán sin posibilidad de recuperación.",
"IntegrationsDescription.projectIntegrationText": "Las integraciones de proyecto se crean específicamente para cada proyecto.",
Expand Down Expand Up @@ -1195,16 +1195,16 @@
"LaunchesTableControls.ItemsValidationError": "La cantidad de elementos debe ser entre '1' y '600'",
"LdapFormFields.baseDnLabel": "DN Base",
"LdapFormFields.emailAttributeLabel": "Atributo de Correo Electrónico",
"LdapFormFields.firstAndLastName": "First & last name",
"LdapFormFields.firstNameAttributeLabel": "First name",
"LdapFormFields.fullName": "Full name",
"LdapFormFields.firstAndLastName": "Nombre y apellidos",
"LdapFormFields.firstNameAttributeLabel": "Nombre",
"LdapFormFields.fullName": "Nombre completo",
"LdapFormFields.fullNameAttributeLabel": "Atributo de Nombre Completo",
"LdapFormFields.groupSearchBaseLabel": "Base de Búsqueda de Grupo",
"LdapFormFields.groupSearchFilterLabel": "Filtro de Búsqueda de Grupo",
"LdapFormFields.lastNameAttributeLabel": "Last name",
"LdapFormFields.lastNameAttributeLabel": "Apellidos",
"LdapFormFields.managerDnLabel": "DN del Manager",
"LdapFormFields.managerPasswordLabel": "Contraseña del Manager",
"LdapFormFields.nameTypeLabel": "Name attributes mode",
"LdapFormFields.nameTypeLabel": "Modo nombre de atributos",
"LdapFormFields.passwordAttributeLabel": "Atributo de Contraseña",
"LdapFormFields.passwordEncoderTypeLabel": "Tipo de Codificador de Contraseña",
"LdapFormFields.photoAttributeLabel": "Atributo de Foto",
Expand Down Expand Up @@ -1523,8 +1523,8 @@
"NotificationsEnableForm.toggleNotificationsLabel": "Notificaciones automáticas por correo electrónico",
"NotificationsEnableForm.toggleNotificationsNote": "Enviar notificaciones por correo electrónico al finalizar las ejecuciones",
"NotificationsEnableForm.typeDescription": "Seleccione una lista de destinatarios {type} para cada regla para enviar notificaciones relacionadas con la ejecución.",
"NotificationsEnableForm.unableToConfigure": "Why can't I configure it?",
"NotificationsEnableForm.unableToConfigureDescription": "Learn more about roles and permissions",
"NotificationsEnableForm.unableToConfigure": "¿Por qué no puedo configurarlo?",
"NotificationsEnableForm.unableToConfigureDescription": "Más información sobre funciones y permisos",
"NotificationsTab.updateProjectNotificationsConfigurationSuccess": "¡La configuración de notificaciones se ha actualizado correctamente!",
"OverallStatisticsControls.ContentFieldsValidationError": "Seleccione al menos un elemento",
"OverallStatisticsControls.CriteriaFieldLabel": "Criterios para el widget",
Expand Down Expand Up @@ -2000,12 +2000,12 @@
"Timer.hours": "h",
"Timer.minutes": "m",
"Timer.seconds": "s",
"TwoStepsFooter.cancel": "Cancel",
"TwoStepsFooter.create": "Create",
"TwoStepsFooter.discardChanges": "Discard changes",
"TwoStepsFooter.nextStep": "Next step",
"TwoStepsFooter.previousStep": "Previous step",
"TwoStepsFooter.saveAndClose": "Save & close",
"TwoStepsFooter.cancel": "Cancelar",
"TwoStepsFooter.create": "Crear",
"TwoStepsFooter.discardChanges": "Descartar cambios",
"TwoStepsFooter.nextStep": "Siguiente paso",
"TwoStepsFooter.previousStep": "Paso previo",
"TwoStepsFooter.saveAndClose": "Guardar y cerrar",
"UnassignButton.anassignBtn": "Desasignar",
"UnassignButton.anassignUser": "¡El usuario ha sido desasignado del proyecto!",
"UnassignButton.unAssignTitle": "Desasignar usuario del proyecto",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,9 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames/bind';
import { JIRA_CLOUD } from 'pages/inside/projectSettingsPageContainer/content/integrations/integrationsList/integrationInfo/constats';
import { dynamicFieldShape } from './dynamicFieldShape';
import { getFieldComponent } from './utils';
import {
ASSIGNEE_FIELD_NAME,
MULTIPLE_AUTOCOMPLETE_TYPE,
VALUE_ID_KEY,
VALUE_NAME_KEY,
} from './constants';
import { getFieldComponent, isJiraCloudAssigneeField } from './utils';
import { AUTOCOMPLETE_TYPE, VALUE_ID_KEY, VALUE_NAME_KEY } from './constants';
import styles from './dynamicFieldsSection.scss';

const cx = classNames.bind(styles);
Expand Down Expand Up @@ -70,12 +64,11 @@ export class DynamicFieldsSection extends Component {
} = this.props;

return fields.map((field) => {
const isJiraCloud = integrationInfo.pluginName === JIRA_CLOUD;
const isAssigneeField = field.fieldName?.toLowerCase() === ASSIGNEE_FIELD_NAME.toLowerCase();
const fieldType =
isJiraCloud && isAssigneeField ? MULTIPLE_AUTOCOMPLETE_TYPE : field.fieldType;

const FieldComponent = getFieldComponent({ ...field, fieldType });
const { pluginName } = integrationInfo;
const FieldComponent = getFieldComponent({
...field,
...(isJiraCloudAssigneeField(pluginName, field) && { fieldType: AUTOCOMPLETE_TYPE }),
});

return (
<FieldComponent
Expand Down
8 changes: 8 additions & 0 deletions app/src/components/fields/dynamicFieldsSection/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

import { omit } from 'common/utils/omit';
import { JIRA_CLOUD } from 'pages/inside/projectSettingsPageContainer/content/integrations/integrationsList/integrationInfo/constats';
import {
ARRAY_TYPE,
DROPDOWN_TYPE,
Expand All @@ -27,6 +28,7 @@ import {
CREATABLE_MULTIPLE_AUTOCOMPLETE_TYPE,
MULTILINE_TEXT_TYPE,
VALUE_NONE,
ASSIGNEE_FIELD_NAME,
} from './constants';
import { FIELDS_MAP } from './dynamicFieldMap';

Expand Down Expand Up @@ -106,3 +108,9 @@ export const removeNoneValues = (inputObj) => {
});
return obj;
};

export const isJiraCloudAssigneeField = (pluginName, field) => {
const isJiraCloud = pluginName === JIRA_CLOUD;
const isAssigneeField = field.fieldName?.toLowerCase() === ASSIGNEE_FIELD_NAME.toLowerCase();
return isJiraCloud && isAssigneeField;
};
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ const messages = defineMessages({
},
btsIntegrationNameHint: {
id: 'BtsCommonMessages.btsIntegrationNameHint',
defaultMessage: 'Integration name should have a size from 1 to 55 characters',
defaultMessage: 'Integration name should have size from 1 to 55 characters',
},
btsUrlHint: {
id: 'BtsCommonMessages.btsUrlHint',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ const DeleteLaunchModal = ({ data: { launches, confirmDeleteLaunches, userId } }
cancelButton={cancelButton}
warningMessage={warning}
CustomFooter={selectedImportantLaunches.length > 0 ? CustomFooter : null}
contentClassName={cx('delete-launch-modal-content')}
>
<p className={cx('message')}>{Parser(DOMPurify.sanitize(getMainContent()))}</p>
</ModalLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
.delete-launch-modal-content {
padding: 15px 10px;
}

.message {
line-height: 24px;

b {
font-family: $FONT-SEMIBOLD;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
normalizeFieldsWithOptions,
mapFieldsToValues,
removeNoneValues,
isJiraCloudAssigneeField,
} from 'components/fields/dynamicFieldsSection/utils';
import { projectInfoSelector } from 'controllers/project';
import { FieldProvider } from 'components/fields/fieldProvider';
Expand Down Expand Up @@ -279,7 +280,7 @@ export class PostIssueModal extends Component {
getBtsIntegrationBackLink,
data: { items },
} = this.props;

const pluginName = this.state.pluginName;
const fields = this.state.fields.map((field) => {
const isAutocomplete =
field.fieldType === AUTOCOMPLETE_TYPE ||
Expand All @@ -290,7 +291,13 @@ export class PostIssueModal extends Component {
if (!Array.isArray(formFieldData)) {
preparedFormFieldData = formFieldData ? [formFieldData] : [];
}
return { ...field, [isAutocomplete ? 'namedValue' : 'value']: preparedFormFieldData };
return {
...field,
[isAutocomplete ? 'namedValue' : 'value']: preparedFormFieldData,
...(isJiraCloudAssigneeField(pluginName, field) && {
value: preparedFormFieldData.map((item) => item.id),
}),
};
});
const backLinks = items.reduce(
(acc, item) => ({ ...acc, [item.id]: getBtsIntegrationBackLink(item) }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ export class UniqueErrorsPage extends Component {
];
this.props.onUnlinkIssue(items, {
fetchFunc: this.unselectAndFetchItems,
eventsInfo: {},
eventsInfo: {
unlinkBtn: UNIQUE_ERRORS_PAGE_EVENTS.UNLINK_ISSUE_MODAL_EVENTS.getClickUnlinkButtonEventParameters(),
},
});
};
deleteItems = () => {
Expand Down
Loading