Parse and Copy URL from Description field to a custom field

Issue #897 resolved
Nikhil created an issue

Hi Fidel,

I want to parse and copy an URL of "Alert Location: " value from Description field to a new Custom field "Alert Location". I tried delimiters but at the end of the URL, in the custom field, I am getting spaces and --------.

Here is the image with URL that needs to be copied and what I have achieved.

Capture.JPG

Can you please help me getting the correct post-function or delimiters?

Screenshot of my post-function:

Capture.JPG Nikhil

Comments (18)

  1. Nikhil reporter

    Nope, still same output in the Alert Location custom field (Text Field (single line)). Post-function: Capture.JPG

    The URL is closed in [ ] braces with dashes (----) and empty space within the field. Capture.JPG

    Nikhil

  2. Fidel Castro Armario repo owner

    Please, attach the text of the Description field you should in the screenshot, so that I can reproduce the problem.

    Meanwhile, try selecting url as value to be extracted, like shown in the following screenshot:

    Captura de pantalla 2017-11-17 a las 19.04.25.png

  3. Nikhil reporter

    Selecting URL doesn't even copy and paste the content i.e., the custom field doesn't even show up in the View issue screen. Attaching the content to reproduce.

    Nikhil

  4. Nikhil reporter

    @fcarmario ,

    Now I can see that the Alert Location URL in text mode and is closed within braces [ ] and this is the reason we were getting those braces after getting copied to the custom field. Capture.JPG

    Can we change the renderer to WIki Style as this style doesn't show braces?

    Nikhil

  5. Fidel Castro Armario repo owner

    Hi @nikhil_dsv,

    Try using the following delimiters:

    • Leading delimiter (regular expression): Alert Location:\s*\[
    • Trailing delimiter (regular expression): \]
  6. Nikhil reporter

    @fcarmario,

    Nope, it did not work. The Alert Location custom field didn't show up at all in the view issue screen. Here is the screenshot of the post-function. Capture.JPG

  7. Fidel Castro Armario repo owner

    Hi @nikhil_dsv,

    Try using the following delimiters:

    • Format of the value to be extracted (regular expression): .*?
    • Leading delimiter (regular expression): Alert Location.*?\[
    • Trailing delimiter (regular expression): \]
  8. Fidel Castro Armario repo owner

    Try using:

    • Format of the value to be extracted (regular expression): .*?
    • Leading delimiter (regular expression): Alert Location:\s*
    • Trailing delimiter (regular expression): \s

    Please, close the issue if this configuration solves the problem.

  9. Nikhil reporter

    This is working as expected. Thanks for your support. But one important thing, can this be applied for all the old Jira tickets created before we implemented this? There are lot of such implementations we did like parse and copy a text to a new custom field which needs to be applied for older tickets as well? Is this possible?

  10. Log in to comment