Parsing text from last comment field to the end of summary field
Hello Fidel,
I hope you are keeping well and you have a lot of success with your add-on, which I find very good. I wonder if you can help me again with parsing text from an email that we receive (which shows in the comment obviously) to the end of the summary field of the the Jira ticket. An example of reply is:
Original issue summary: GCI (GI-20265) - Da Vinci Diamonds Dual - Broken- VIP 13
Last comment contains the following reply: Subject: RE: [GCI Jira] (OCC-14813) GCI (GI-20265) - Da Vinci Diamonds Dual - Broken- VIP 13 [ ref:_00D30iVRS._50014smU7L:ref ]
Desire result of the summary: [GCI Jira] (OCC-14813) GCI (GI-20265) - Da Vinci Diamonds Dual - Broken- VIP 13 [ ref:_00D30iVRS._50014smU7L:ref ]
Thank you in advance for your help Shai Dahan
Comments (10)
-
repo owner -
Account Deactivated reporter Hello Fidel,
- The invariant parts of the prefix is the summary of the original ticket
- The suffix should be everything which is within the brackets
Different example: Original summery: "Bonus Game Issue. Indiajaya" Response from IGT received as an email which contain the following Subject: "Subject: RE: [GCI Jira] (OCC-14436) Bonus Game Issue. Indiajaya [ ref:_00D30iVRS._50014slPqN:ref ]" Desired summary: "Bonus Game Issue. Indiajaya [ ref:_00D30iVRS._50014slPqN:ref ]
I hope it's clear enough
Thanks Shai
-
Account Deactivated reporter - Different example:
- Original summery: "Bonus Game Issue. Indiajaya"
- Response from IGT received as an email which contain the following Subject: "Subject: RE: [GCI Jira] (OCC-14436) Bonus Game Issue. Indiajaya [ ref:_00D30iVRS._50014slPqN:ref ]"
- Desired summary: "Bonus Game Issue. Indiajaya [ ref:_00D30iVRS._50014slPqN:ref ]
reformatting my last comment
-
repo owner We will implement it with 2 post-functions:
1) "Parse field for extracting data" with the following configuration:
2) "Copy a parsed text to a field" with the following configuration:
Text to be parsed is:
%{00000} + (%{00000} !~ "[ ref:" AND %{00061} != null ? " [ ref:" + %{00061} + ":ref ]" : "")
Once configured, your post-functions will look like this:
-
Account Deactivated reporter Hello Fidel,
Thank you for that, it does the trick, however I need it to only to be copied once and if the summary only contained IGT reference I don't want it to be copied over and over again you did it before by matching the string to find out whether it already contains the parsed text.
Thanks, Shai
-
repo owner I implemented the behavior to avoid repetitions, but made a mistake in the text to be parsed. Use the following one instead:
%{00000} + (%{00000} !~ "[ ref:" AND %{00061} != null ? " [ ref:" + %{00061} + ":ref ]" : "")
-
Account Deactivated reporter it is exactly the same string, isn't it? Am I'm missing something?
-
Account Deactivated reporter OK cool, I've found the difference between the two strings Thank you very much it works as a charm :)
-
repo owner Sorry, I edited my previous post and corrected the mistake.
The incorrect string was:
%{00000} + (%{00000} !~ "[ :ref" AND %{00061} != null ? " [ ref:" + %{00061} + ":ref ]" : "")
The correct string is:
%{00000} + (%{00000} !~ "[ ref:" AND %{00061} != null ? " [ ref:" + %{00061} + ":ref ]" : "")
-
repo owner - changed status to resolved
I close the issue once resolved.
- Log in to comment
Hi Shai,
I need some additional information: