Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Crear ticket a partir de un correo electrónico

Hector Bertorello April 25, 2023

Estoy generando un correo personalizado de un software de alerta de sensores y que cuando fallan manda un correo a jira, el cual genera un incidente pero me gusataria poder poner datos en los campos personalizados, esto es posible? un ejemplo para explicarme mejor, tengo un campo de ubicacion, y me gustaria que cuando un sensor falle mande no solo que esta fallando sino que envie al campo ubicacion el dato pertinente.

Por otro lado, yo asocie a la solicitud de Emailed request un tipo de incidencia, no es posible que se pueda crear otros tipos de incidencia ej: si es una falla de networking entonces que genere una incidencia para networking pero si es una falla de un servidor que genere una incidencia distinta.

Desde ya agradezco su tiempo y disculpen si es dificil entenderme.

1 answer

1 vote
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 25, 2023

Hola @Hector Bertorello ,

Actualmente no es posible analizar directamente el correo electrónico entrante y crear un tipo diferente de ticket ni poner información en otros campos cuando se crea el ticket.

Una solución alternativa sería usar Automation for Jira para crear una regla que analice la información en los campos Resumen y/o Descripción del ticket después de que se haya creado. Esa regla podría analizar el texto y actualizar los campos con la información que encuentra. También podría cambiar el tipo de emisión del ticket si el tipo original y el tipo de destino tienen el mismo flujo de trabajo.

Puede usar la Condición de comparación avanzada para comparar el campo de texto con los valores de expresiones regulares para determinar cómo se deben configurar otros campos. O puede encontrar una función útil en esta documentación.

---

Hello,

It is not currently possible to directly parse the incoming email and create a different type of ticket nor put information into other fields when the ticket is created.

A work around would be to use Automation for Jira to create a rule that would parse the information in the Summary and/or Description fields of the ticket after it is created. That rule could parse the text and update fields with the information it finds. It could also change the Issue Type of the ticket if the original type and the destination type have the same workflow.

You could use the Advanced Compare Condition to compare the text field to regex values to determine how other fields should be set. Or you might find a useful function in this documentation

Create ticket from email

I am generating a personalized email from a sensor alert software and when they fail it sends an email to jira, which generates an incident but I would like to be able to put data in the custom fields, is this possible? An example to explain myself better, I have a location field, and I would like that when a sensor fails, it not only sends that it is failing, but also sends the pertinent data to the location field.

On the other hand, I associate a type of incident with the Emailed request, it is not possible to create other types of incidents, eg: if it is a network failure, then it generates an incident for networking, but if it is a failure of a server that generates a different incident.

I thank you in advance for your time and excuse me if it is difficult to understand me.

Hector Bertorello April 26, 2023

Muchas gracias por su respuesta he intentado hacer una regla automatica mediante condicion:

Captura de pantalla 2023-04-26 173757.png

la condición me funciona.

Ahora lo que necesito es poner el dato que sigue a continuación de Ubicación en el campo de ubicacion, he intentado en edicion de campo pero creo que estoy haciéndolo mal:

Captura de pantalla 2023-04-26 173942.png

No se si seria posible alomejor en la opción "Más opciones" pero no sabría como copiarlo

Captura de pantalla 2023-04-26 174107.png

Desde ya agradecido por su excelente disposición.

Hector Bertorello April 26, 2023

He creado este campo adicional personalizado pero no me toma el texto que sigue a Ubicacion: no se como especificarlo

image.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 26, 2023

Hola,

¿Puede proporcionar un ejemplo del contenido del correo electrónico entrante?

¿Cuál es el tipo de campo para el campo Ubicación?

Una cosa que puede encontrar útil para depurar su regla de automatización es usar la acción Registrar para imprimir cualquier valor inteligente que esté tratando de usar. La acción Registrar imprimirá la información en el Registro de auditoría de la regla. Debe usar la acción Registrar para imprimir su valor inteligente {{issue.description.substringAfter...}} para confirmar qué valor se está usando realmente.

Si el campo que intenta completar es un campo de texto, el valor debe insertarse correctamente sin trabajo adicional.

Si el campo que intenta archivar es una lista de selección, una casilla de verificación u otro tipo de campo sofisticado, es posible que deba convertir el texto que obtiene del campo Descripción en un valor que se pueda establecer para el destino especificado. campo.

---

Hello,

Can you provide an example of the incoming email content?

What is the field type for the Location field?

One thing you may find useful in debugging your automation rule is to use the Log action to print out any smart values that you are trying to use. The Log action will print the information into the rule's Audit Log. You should use the Log action to print out your smart value {{issue.description.substringAfter...}} to confirm what value is actually being used.

If the field you are trying to fill is a text field, the value should insert properly without additional work.

If the field you are trying to file is a selection list or a check box or another type of sophisticated field, you may need to do some conversion of the text you get from the Description field into a value that can be set for the specified destination field.

Thank you very much for your answer. I have tried to make an automatic rule through condition:

condition works for me.

Now what I need is to put the data that follows Location in the location field, I've tried editing the field but I think I'm doing it wrong:

I don't know if it would be possible at least in the "More options" option but I wouldn't know how to copy it

Thank you in advance for your excellent disposition.



I have created this additional custom field but it does not take the text that follows Location: I don't know how to specify it

Hector Bertorello April 26, 2023

Captura de pantalla 2023-04-26 185158.png

En realidad esto es lo que me interesaria: el texto a continuacion de Ubicacion me ponga en el campo personalizado de Ubicacion (customfield_10052) y lo que continua luego de prioridad que lo ponga en el campo de priority

--------------------------------------------------------------------------------------------------

en auditoria al ejecutarlo solo me da el siguiente error

Detalles de la acción:
EDITAR INCIDENCIA
Error al analizar Campos adicionales JSON no válido.
con el codigo:
{
"update": {
"customfield_10052" : [
{
"set": {
"value": {{issue.description.substringAfter("Ubicación: ")}}
}
}
]
}
}
--------------------------------------------------------------------------------------------------
pero si uso el siguiente codigo si funciona:{
"update": {
"customfield_10052" : [
{
"set": {
"value": "Planta Avex (Rio Cuarto CBA)"
}
}
]
}
}
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 28, 2023

Primero hablemos de analizar el texto.

Si desea obtener una parte del texto que se encuentra en el medio del bloque de texto más grande, le sugiero que use la función substringBetween(). Con eso, especifica una cadena que está inmediatamente antes de la subcadena que desea obtener y una cadena que está inmediatamente después de la subcadena que desea obtener. Si este fuera tu bloque de texto, por ejemplo:

 

abcdefg

hijklmn

Ubicacion: Plata Avex

Prioridad: alta

xyz

Si desea obtener el texto "Plata Avex", usaría este valor inteligente:

{{issue.Description.substringBetween("Ubicacion:","Prioridad")}}

Sus cadenas "antes" y "después" en ese valor inteligente deberán ser únicas en su correo electrónico.

Ahora hablemos sobre la configuración de sus campos personalizados en función del texto que encuentre en la Descripción.

El texto que obtiene de la Descripción es texto simple. La forma en que use eso para establecer un campo personalizado dependerá del tipo de campo personalizado. Si el campo personalizado es un campo de Texto o Párrafo, puede usar el valor inteligente directamente para establecer el campo. No necesariamente necesita hacer eso con JSON. Es posible que pueda seleccionar su campo personalizado de la lista de campos.

Screen Shot 2023-04-28 at 2.25.54 PM.png

Luego puede ingresar el valor inteligente como el valor para asignar al campo.

 Screen Shot 2023-04-28 at 2.27.16 PM.png

Para la lista de selección donde puede seleccionar solo un elemento, esto también podría funcionar si el nombre del elemento coincide exactamente con el texto que obtiene de la Descripción.

Para listas de selección múltiple, probablemente tendrá que usar JSON.

También puede encontrar que necesita convertir el texto que obtiene de la Descripción a algún otro valor que coincida con los tipos de valores que puede asignar a sus campos personalizados.

Creo que tendrá que experimentar un poco para descubrir qué método necesita usar para cada campo.

 

---

First let us talk about parsing the text.

If you want to get a piece of the text that is in the middle of the larger text block I would suggest that you use the substringBetween() function. With that you specify a string that is immediately before the substring you want to get, and a string that is immediately after the substring you want to get. If this was your block of text, for example:

abcdefg

hijklmn

Ubicacion: Plata Avex

Prioridad: alta

xyz

If you want to get the "Plata Avex" text you would use this smart value:

{{issue.Description.substringBetween("Ubicacion:","Prioridad")}}

Your "before" and "after" strings in that smart value will need to be unique in your email.

Now let us talk about setting your custom fields based on the text that you find in the Description.

The text you get from the Description is simple text. How you use that to set a custom field will depend on the type of the custom field. If the custom field is a Text or Paragraph field, you can use the smart value directly to set the field. You don't necessarily need to do that with JSON. You might be able to select your custom field from the field list. 

You can then enter the smart value as the value to assign to the field.

For selection list where you can select only one item this might also work if the name of the item is an exact match to the text you get from the Description.

For multiple selection lists you will probably have to use JSON.

You might also find that you need to convert the text you get from the Description to some other value that matches with the types of values you can assign to your custom fields.

I think you will have to do some experimenting to figure out which method you need to use for each field.

 

Actually this is what I would be interested in: the text after Location put me in the location custom field (customfield_10052) and what follows after priority I put it in the priority field

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events