Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to copy domain to a custom field

I'm trying to copy the Domain name to a custom field every time when the issue is created.

Can someone help me with this.

1 answer

1 accepted

0 votes
Answer accepted
Mykenna Cepek Community Leader Dec 09, 2020

The easiest way to accomplish this would be to use Automation in Jira.

Specifically, you'll want a rule that:

  • Starts with the "Issue Created" trigger
  • And then uses an "Edit Issue" action to Copy the Domain field value to the other custom field (three-dots menu > Operations > Copy From).

Here's a link to get started with Automation (in case you haven't used it before):

Be aware that there are limits on Automation usage with the Jira Free plan:

In particular, note the 100 "rule executions" per month limit for the Free plan.

_ _ _ _ _ _ _ _ _ _ _ _ _ _

An alternative solution is to set a Post Function on the Create step in the Workflow:

  • Edit the workflow for the project.
  • View the workflow as a Diagram (not as Text).
  • Click on the "Create" transition (coming out of the circle).
  • Click the "Post Functions" hyperlink in the pop-up.
  • Click "Add post function".
  • Select "Copy Value From Other Field".
  • Click "Add" to add the new post function to the Create transition.
  • Be sure to "Publish Draft" so that your new workflow is saved and deployed.

This approach is a bit more hidden, but there is no "execution limitation".

Hi Mykenna,

Thanks for the quick response. we don't have a field called Domain, I want to copy the domain from the reporter field to a custom field.

Mykenna Cepek Community Leader Dec 09, 2020

I see. Then the "Workflow - Post Function" approach will not work for that.

Automation can do this, though. You'll do what I mentioned above, but the "Edit Issue" action is just a pinch more complicated.

I created the rule below to test it. This rule copies the assignee email address domain (everything after the @ in the email) to the Description field. You'll want set it to your custom field instead.

I have the action component selected in the rule so you can see the Smart Value notation used to extract the email address and parse out the domain.

Screen Shot 2020-12-09 at 5.14.57 PM.pngImportant notes:

  • If the assignee is blank, the domain will also come back blank.
  • I'm not sure how you're assuring that the Assignee is set when the issue is created. If this automation runs BEFORE the Assignee is set, then the rule will appear to succeed, but the domain will be blank.
  • You might also consider a second rule to trigger this same action when the Assignee field changes. I assume you'd want to keep this custom field in sync, in case the issue is reassigned.
  • The 100 rule executions per month limit on the Jira Free plan is still in play here.

Thanks for your response Mykenna.

I have tried the automation but I'm getting the error. Please check the attachment for the errors and automation.

And I'm trying to pull the domain from the reporter field, not from the assigned field.

Screen Shot 2020-12-09 at 4.02.30 PM.pngScreen Shot 2020-12-09 at 4.02.23 PM.png

So the SmartValue syntax (the code between the {{ and the }} markers) should not be in the "Additional Fields" section (under "More options"). Only JSON belongs there, and that is the source of the error.

Instead, put the SmartValue code into the "Company2" field. We don't want to clear that field, we want to set it to the value returned by the SmartValue code.

It should look like the following. I used a field we had called "Chamber", you want "Company2" there, of course.

Screen Shot 2020-12-10 at 9.28.30 AM.pngImportant notes:

  • Be sure to remove the changes made under "More options".
  • This approach assumes that the "Company2" custom field is a Text Field. If not, let me know. 

Hi Mykenna,

Is it possible to get Company from Insight if the reporter's email on Jira project matches to email in Insight.

I mean,

If issue.reporter.email is equal to email in Insight attribute, then get the company in insight and populate in JIRA project.


Mykenna Cepek Community Leader Dec 15, 2020

Honestly, I'm not sure. I do not have access to Insight for any of my Jira Instances at this time, so I can't give you a tested solution.

Consider closing out this question (which was focused on copying the reporter's email domain to a custom field), and creating a new question that focuses on using Jira (or JSM?) to retrieve Company data from Insight.

Tagging that new question with Jira (or JSM) and Insight is recommended.

Best wishes!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Service Management

JSM June Challenge #2: Share how your business teams became ITSM rockstars

For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...

272 views 8 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you