- edited description
Parse Summary to populate multiple Fields
Hi,
Currently we have a Mail Hnadler set up to automatically create Tickets in a Project with the Mail Subject = Summary of the ticket. I want to know if it is possible to parse the Summary of the created ticket to populate multiple fields. For e.g
Summary = Approve <Fixversion> release of Patch to <Label> on <DueDate>
The Summary should be parsed as a Post Create Function to populate the Fixversion , Label and Duedate fields. We are currently on v2.2.28
Regards,
Arjun
Comments (13)
-
reporter -
reporter - edited description
-
repo owner Yes, it's possible to do it. I have some questions:
- Is the subject's format always exactly like in the example?
- Which format is Due date? Can you use something like 2017-04-18 for date format?
-
reporter Is the subject's format always exactly like in the example? - The format can be changed to make this work.
Which format is Due date? Can you use something like 2017-04-18 for date format? - Yes we can use that format for DueDate
-
repo owner Then, you can do it using the following 3 "Parse field for extracting data" post-functions with the following configurations:
Extracting "Fixed versions"
- Leading delimiter is:
\s*Approve\s+
- Trailing delimiter is:
\s+release
Extracting "Labels"
- Leading delimiter is:
\s+to\s+
- Trailing delimiter is:
\s+on\s+
Extracting "Due date"
- Leading delimiter is:
\s+on\s+
- Trailing delimiter is:
\s*$
- Value format is:
yyyy-MM-dd
Once configured, all 3 post-functions look like this:
- Leading delimiter is:
-
reporter Hi Fidel,
Thank you for the detailed instructions. However i just tried it out and it did not work for me. I have set them as Post Function in the Create Transition. The draft has also been published and made active.
-
repo owner Move the 3 "Parse field for extracting data" post-functions AFTER post-function "Creates the issue originally".
Please, let me know whether it solves your problem.
-
reporter Hi Fidel,
Now the Label is getting populated but the others are not. Please note the subject line has been modified a bit.
This is my Email subject - Test - APPROVAL NEEDED for 1.1.1 deployment on PROD at 10:00 AM on 2017-04-01
1.1.1 = Fixversion PROD = Label 2017-04-01 = Due Date
-
repo owner Hi Arjun,
The problem with Fixed versions might be caused by the first post-function, which is also setting that field. Please, try removing it.
In relation with Due date: Is it possible that you have another post-function that is setting the field. Please, let me see all the post-functions in "Create issue" transition.
-
reporter I moved the Fixversion post-function below the new one that did not work. So i deleted it and that didnt work either. There are no other Due Date related Post-functions. The complete list is below:
-
repo owner Hi Arjun,
The problem with due date is that you are using two "on" words in your summary. Try using the following leading delimiter for Due date:
\s+on\s+(?=\d+)
In relation with Fixed versions, take into account that the fixed version should already exist in the project as a version. It will not be automatically created if it doesn't exist. Is this the cause of the problem?
-
reporter Worked on both counts. Thank you so much, Fidel. Appreciate your detailed and swift responses to resolve this issue.
-
reporter - changed status to resolved
Issue Resolved
- Log in to comment