Inheritance labels IF I clone the test case with labels

alexei
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 28, 2024

Our team has test cases with labels. When we clone a test case with labels, they are inherited. Is it possible to remove the inheritance of the labels field?

4 answers

1 vote
Luka Hummel - codefortynine
Atlassian Partner
August 30, 2024

Hi @alexei and welcome to the community!

When cloning a test case in Jira, the labels are inherited by default, which can be inconvenient if you need different labels for the cloned issue. To customize this behavior, I recommend using our app Deep Clone for Jira. Deep Clone allows you to specify exactly what fields to include or exclude during the cloning process, including labels. For labels, you can use our Field Editor feature to clear the field while cloning.

2024-08-30 14-14.png

1 vote
Pears Whims
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.
August 28, 2024

Hi Alexei,

 

When cloning a test case in Jira, labels are inherited by default. If you want to remove the inheritance of the labels field, here are few solutions that may be working, depending on Your setup, environment and apps available.

 

Automation Rule with Autiomation for Jira

  • Set up an Automation Rule to clear labels when an issue is cloned. This may work for certain issue types:
  • Trigger: Issue Created.
  • Condition: Something that can determine issue was cloned. Issue type or CLONE prefix.
    • Advanced Compare Condition: Use this condition to check if the summary contains the word “CLONE”.
      • Configuration: Field: {{issue.summary}}
      • Condition: contains
      • Value: CLONE
  • Action: Edit Issue to clear the Labels field.

 

Scriptrunner Custom Scripting

If you use Scriptrunner, you can write a custom script to automatically remove labels when cloning.

I hope this may help.

 

Best regards,
Pears

1 vote
Valerie Knapp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 28, 2024

Hi @alexei , welcome to the Atlassian Community and thanks for your question.

I don't think it will be possible to choose what is and isn't copied using the standard cloning functionality - https://support.atlassian.com/jira-software-cloud/docs/clone-an-issue/ 

You can use scripts or apps to copy issues (or test cases) where you could specify exactly what you want to copy and not the rest. Is this a possibility for you? Do you have any apps like ScriptRunner or Jira Misc?

Cheers

0 votes
Pears Whims
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.
September 5, 2024

Hi @alexei ,

I wanted to check in and see if any of the suggestions helped you with the issue of label inheritance when cloning test cases. If you found a solution, it would be great to know, and feel free to accept any of the answers if they resolved your problem - it helps others find solutions faster.

Looking forward to hearing how it went!

Best regards,
Pears

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events