We have a project for access requests, and using dynamic templates we have created templates where the requester fills in details such as "user email". I would like to get this info copied from the summary to a field we have named "user email".
Using the command:
{{issue.summary.substringBetween("","")}}
This doesn't seem to be able to collect an email address, even if I surround it with ( ), or ' ' or set the rule to include the words before/after.
It seems it will only work on one word, for example:
Bitwarden Access
[rest of summary]
Is there a way to get a text like email address from the summary to a custom field?
Hi Patricia - Welcome to the Atlassian Community!
Do all of the emails end with .com?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So this is my issue that it won't return anything if there are spaces, special characters etc, as shown:
It seems it will only work on one word, for example:
Bitwarden Access
[rest of summary]
- Rule ("B","n") gives me "itwarde"
Rule ("B","c") gives me none/blank (expected "itwarden A")
Even if I set the rule to be "{{issue.summary.substringAfter(":")}}" and change the summary so the user email is the first one with a : it still returns blank
Log on automation:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, it looks like there are too many limitations for what you are trying to do. You should probably create a custom field to capture the information when it is input.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So there wouldn't be a possibility of collecting this info from the summary itself? As we do have a field already but want it to autofill from what's put into the summary. As we use templates it should always be in the same format
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm, in your example above, you have issue.summary, but you show values in the Description field. Does your Summary field have the colon?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh my...... You are right, I had confused the description with summary *facepalm.
Thanks! It's one of those things that the longer you stare at them the more blind you become
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Patricia Johansson and welcome to the community!
Can you please provide a sample summary so we can see the full context?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mark and thank you!
Sure, so we use the templates for Jira and here is an example of one of our dynamic templates:
Summary would be something like this based on the above:
Bitwarden Access Request
----------------------------
Name: Test
User email: ' test@email.com '
Manager: Manager
Domain: Supply
Collections:
I've tried surrounding the email address with ( ), *'s, etc.
Even if the rule is set to
{{issue.summary.substringBetween("email:","Manager")}}
and no other formatting is added to the email address it always returns blank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Want to make your everyday Community actions directly contribute to reforestation? The Atlassian Community can achieve this goal by liking a post, attending an ACE, sending your peers kudos, and so much more!
Help us plant more trees
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.