Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Copy displayed value from 1 custom field that has a hyperlink to another custom field

Suzanne Cranfield October 25, 2024 edited

Hello Jira experts. I am struggling with the following. 

 

 

 

 

I have 2 custom fields:

CF1.  “Link to Exact” – wiki style renderer

CF2.   "Order #”-  has default text renderer

CF 1 is populated by copying  a hyperlink from another system and pasting it in the custom field in Jira. It displays it as a hyperlink displaying the “order number”. When we click on the value (hyperlink) in this field it will open the order in the Financial system. This is working fine.

Problem

I want to create and automation rule-

When the CF1 is populated, copy the field value (text, not the hyperlink address) to CF2 as plain text.

1 answer

0 votes
Richard October 25, 2024

You may want to look into Automation smart values - text fields | Cloud automation Cloud | Atlassian Support to understand how you can pass the value from CF1 to a variable using smart values and remove the portions of text that make it a hyperlink. 

This may be able to be achieve by using the match() function or replace() function depending on your use case. 

Example:

  • Value for CF1 is being stored as a hyperlink '[https://abc.com|ABC]
  • The text value you actually want is 'ABC' and you want to remove the '[https://abc.com' at the start and ']' at the end
  • You may be able to create a regular expression to remove these character and only keep what is between the '|' and ']' and save that in the variable
  • Or you could layer two variables with the replace() function to first replace '[https://abc.com' with '' (nothing) and do it once more to replace ']' with '' (nothing) and that way you are left with only the text value you are looking for to plug in to CF2 as the value.

Hope this makes sense and helps!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events