Forums

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

How to clone field values from JSM to Jira Product Discovery

Nate Dickinson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 27, 2023 edited

What is the best way to clone fields from JSM to Jira Product Discovery? I'm sensing that because JPD doesn't have the company managed fields implementation that I'm going to have to write rules to set the value in JPD for values in JSM. 

 

For example, I have a company managed custom field called business unit in JSM. It's values are healthcare, IT, and HR. 

I have a created field in JPD called business unit that has the same values. 

 

When I clone a ticket from Jira Service Management  to Jira Product Discovery  and I have automation set to copy the value of the business unit field from Jira Service Management  to Jira Product Discovery , I get an error. I assume this is because I am not using the same custom field. 

I can write a conditional rule for this to set the value in JPD, but I have maybe 10 other fields coming from JSM that I want to set in JPD automatically without having to write these, or change rules around later when values change. 

What is the best way to get values from Jira Service Management  to Jira Product Discovery in their respective place? 

Thanks, 

-Nate

 

 

2 answers

1 vote
Marlene Kegel - codefortynine
Atlassian Partner
July 5, 2023

Hi @Nate Dickinson,

I am Marlene from codefortynine.

You could give Deep Clone for Jira a try. Since we're mapping the fields and field values by name and not field ID, we are able to copy most issue field data between Jira projects and project types.

I've just tested to clone issues from a company-managed project to a product discovery project along with select list values and it worked. It also worked for team-managed custom field values. 

1 vote
Fernando Eugênio da Silva
Community Champion
June 27, 2023

@Nate Dickinson 

You need to add the Jira Product Discovery fields in the 'Additional fields' section on your automation rule.

 

The basic structuture for your use case is:

{
"update": {
"JIRA_PRODUCT_DISCOVERY_FIELD_NAME": [
{
"set": {
"value": "{{issue.customfield_XXXXX}}" // JIRA SERVICE MANAGEMENT FIELD ID
}
}
]
}
}

List value options need to match exactly to work.

See my example:

Screenshot_120.png

Hope this helps :)

Nate Dickinson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 3, 2023

Thanks Fernando, How do I set up a multiple if/then statement? I have 8 identical values for both projects but I will need automation to analyze and set these correctly. 

Like • Sayed Bares _ServiceRocket_ likes this
Fernando Eugênio da Silva
Community Champion
July 3, 2023

@Nate Dickinson 

As you are using smartvalue the conditions apply more to the business rules that lead this automation to be created.

For example:

If you create a JSM ticket with the value IT or HR, it won't matter to JPD as long as the field value in the JPD is the same, because Jira is reading the field variable.

So the conditions go more according to your automation rule. Can you share what your final automation rule idea is or have you tried to reproduce the smartvalue I passed and confirm that it works for your use case?

Like • Sayed Bares _ServiceRocket_ likes this
Nate Dickinson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 5, 2023

Thank you Fernando this worked well. I was confused about whether or not I had to choose which fields to set in the automation window. When I deselected the custom field and reviewed the JSON carefully I was able to pass this information into the next project. Thank you. 

Like • Sayed Bares _ServiceRocket_ likes this
Jess Williamson October 6, 2023

How do you find the ID for the custom field?

Mark Taylor October 18, 2023

@Fernando Eugênio da Silva 

Did you need to put JPD first before field name or was that an example? 

Mine is failing... 


"update": {
"JPDPlatform": [
{
"set": {
"value": "{{triggerissue.customfield_11332}}"



Any help?? My Custom Field is Platform named too.. created that in JPD.. is also fails if I remove JPD from before the name.... 

Any idea what i'm doing wrong? Thanks.  

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
atlassian, jira service management, devops, ship quality code, atlassian webinar, continuous delivery, integrated workflows, change management, developer productivity, agile teams, atlassian community events, ace, atlassian learning

Ship quality code faster with Jira Service Management ✨

In the wake of growing customer expectations, development teams are facing more pressure to deliver innovations faster. Register for this 45-minute webinar to learn how devs can accelerate software delivery and time-to-market with Jira Service Management.

Register now 🚀
AUG Leaders

Atlassian Community Events