- changed version to 2.1.30
Parsing description of issues created by email
Hi Fidel,
Hope you are doing good. I wanted to follow up with you on this:
By the way, I recall a feature you wanted to implement long time ago for parsing description of issues created by email. If you want to give it a try again, I will be glad to help you. Since then, I have implemented that functionality in other users, and I think this time we will succeed.
We want this feature to work now. Could you please help us? We do not want the entire description of issues but just the email and name of the person when issues are created via email. Please see the screenshot.
Thanks Adhip
Comments (38)
-
reporter -
repo owner Can you please, copy+paste an example of an issue description? I need a real description to test my solution.
If you have privacy concerns, you can send it to me by email at fidel@workflowarts.com.
-
reporter This is simply a test
--xxxxxxxxx
[Created via e-mail received from: xxxxx zzzzzzzz xxxxxxx@xxxxx.com]
-
repo owner In your previous screenshot the email was between < > characters. Are they missing by mistake in your c+p example?
-
reporter Sorry about that. Yes, the emails are in between <> characters. I must have mistakenly deleted it when changing the email address. Her's how it looks:
[Created via e-mail received from: Peter Barnes test@gmail.com]
-
reporter Looks like this comment box is automatically changing the email to the format above.
-
repo owner Use "Copy a parsed text to a field" with the following configurations:
Capture "User Name":
Text to be parsed is:
replaceFirst(replaceFirst(%{00001}, "(?s)^.*Created via e-mail received from:\\s*", ""), "(?s)\\s*<.*$", "")
Capture "Email":
Text to be parsed is:
replaceFirst(replaceFirst(%{00001}, "(?s)^.*Created via e-mail received from:.*<\\s*", ""), "(?s)\\s*>.*$", "")
-
reporter Thanks, Fidel. Is this a post function on the "Create Issue" transition? Also, where is the filed value of the custom field where we are parsing the name and email used?
-
repo owner You can use these post-functions in any transition of your workflow. If you use them in "Create Issue" transition, insert them after "Creates the issue originally" post-function.
-
reporter Thanks!
-
reporter Sorry, i edited my comment and you may have missed my last question.
Where is the filed value of the custom field where we are parsing the name and email used?
For eg: We will have a custom field called "Client Contact" (a single line text field) where we want the parsed name and email address to appear.
-
repo owner In my example I have used two single line text custom field called "Email" and "User Name". Select in parameter "Target field" your desired custom fields to receive the parsed values.
-
reporter Perfect, thanks. I was thinking to use one custom field for both email and name but using separate fields will work for us too. At this point, i have everything i needed to ask you. I will test this on our Dev environment of JIRA in a bit and let you know how it goes.
-
reporter Hi Fidel,
This worked great. Yay :) A big thanks to you. There is nothing we have not been able to do with your plugin and the service you provide is excellent times infinity :)
Thanks again.
--Adhip
-
repo owner - changed status to resolved
-
repo owner Hi Adhip, version 2.1.33 provides a new post-function "Parse field for extracting data" that makes much more easy to implement this issue.
-
reporter Hi Fidel,
I appreciate you following up on this issue. It is working great for us at the moment. if this is a much better way, i will definitely take a look at it.
-
repo owner I advice you not to touch your current configuration. I only inform you just in case you need to parse any other field in the future for extracting data.
-
reporter Sounds good, Thanks. We may explore this more in future. As of now, we are good. Appreciate the follow up
-
reporter Hi Fidel,
I hope you are doing well. We've run into an issue with this configuration.
As you know, you helped us parse the email and name from the description to a text field when issues were created via email. Recently, we have run into issues when someone is trying to create the ticket manually. The description box is trying to parse everything to the custom fields and is throwing errors. The custom fields are text fields less than 255 characters and it is not able to hold characters greater than that. If you would like to know the exact scenario, i can send you an email with the errors we get. For now, please look at what Atlassian told me couple of hours ago. After going back and forth with them since two weeks, they were finally able to figure out the cause for this issue today.
Thanks for the workflow export. It looks like there's a Post Function on the Create Issue transition in this workflow, which is using the JIRA Suite Utilities plugin to write data to the problematic field on issue the issue create transition. Here's what this looks like in the XML.
<arg name="full.module.key">com.fca.jira.plugins.workflowToolbox.workflow-toolboxcopy-parsed-text-function</arg> <arg name="textToParse">replaceFirst(replaceFirst(%{00001}, "(?s)^.Created via e-mail received from:\s", ""), "(?s)\s<.$", "")</arg> <arg name="class.name">com.fca.jira.plugins.workflowToolbox.CopyParsedTextFunction</arg> <arg name="selectedTargetGeneralizedField">11004</arg>
Please advise
Thanks Adhip
-
reporter - changed status to open
-
repo owner We can implement the same functionality using "Parse field for extracting data", available in version 2.1.34. Can you update your add-on to that version?
-
repo owner For parsing the email use "Parse field for extracting data" with the following configuration:
- Leading delimiter:
#! Created via e-mail received from:.*<\s*
- Trailing delimiter:
#! \s*>
For parsing the user name use "Parse field for extracting data" with the following configuration:
- Leading delimiter:
#! Created via e-mail received from:\s*
- Trailing delimiter:
#! \s*<
Once configured, both post-functions look like this:
-
reporter Hi Fidel,
I appreciate you posting the instructions along with screenshots. Before trying this, could you please let me know the difference between this configuration and the one we are using today. The one we're using today is working great as well in terms of parsing the name and email to a text box when issues are created via email. it's just that it's throwing errors when issues are manually created, instead of email.
Here's our current configuration:
-
reporter - attached configuration.JPG
-
reporter Hi Fidel,
Never mind. I deleted the old configuration and applied the new one you mentioned above on our JIRA Sandbox and the error is now gone. Email and Name fields worked as expected. I am currently in process of updating the plugin to version 2.1.34 on Production and making the change there. Again, i appreciate your help.
--Adhip
-
repo owner - changed status to resolved
Great Adhip! Another advantage of the new post-function is that it has a more intuitive configuration for parsing data.
I close issue.
-
reporter Sounds good. Thank you once again.
--Adhip
-
reporter Hi Fidel, We want to revisit this and parse the contact name from the description field (example below) to a custom field called "Client Contact". Is the last configuration you gave me still good or do you have something new?
Created via e-mail received from: "Pokharel, Adhip" xxxx@gmail.com
So, we want "Adhip Pokharel" to be parsed to the custom field Client Contact.
-
reporter - changed status to open
-
reporter Is your comment from 2015-08-19 above still good?
-
repo owner Hi Adhip,
Use the following configuration:
Leading delimiter:
Created via e-mail received from: "
Format of the value to be extracted:
\w+(,\s*)?\w+
Trailing delimiter:
"
I have detected a problem: when you try to edit the configuration the values are not retrieved correctly. I will fix the problem in next version of the plugin. Anyway, it will work, since the values are correctly used by the post-function.
-
reporter Hi Fidel,
So do you want us to try this configuration or wait until the next version of the plugin is released? We are using an old version (2.2.8) in our Production environment at the moment.
-
repo owner You can use your current version. The only problem is that if you try to edit the configuration of the post-function, some configuration values are retrieved incorrectly, and you will have to rewrite them again.
-
reporter okay, thanks. I will try it on our dev environment and let you know how it works.
-
repo owner - changed status to resolved
Hi Adhip. I close the issue. Please, reopen it if you need more support on it.
-
Hi Fidel -
I have been trying to follow the above steps with the "Parse field for extracting data" post function. I have a JIRA Service Desk project. When customers send an email an Issue gets created. I am trying to parse the body of the email (Description) and populate that parsed text to a custom field. Attached are my configurations. I am a bit lost at this point. Any advice?
-
My apologies - just realized I posed this on the old website. Will create a new issue on your new website.
- Log in to comment