Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Custom fields - how to copy and paste value

Lukasz July 24, 2018

Hi there,

I have one Custom Field "Example_name1" which works as single choice dropdown menu, with around 40 values. In one ticket type i need to repeat this 3 times, so instead of recreating it two times from scratch - i would like to copy all values from Example_name1 to Example_name2 and Example_name3. I will need also to create and duplicate some rules per every value, x3 Example_name x40 values = 120 rules.

Is this possible to copy/paste or duplicate Custom fields or rules??

I read that ScriptRunner can do it, but it looks like that i need to point in which ticket this will be duplicated, which wont help me at all.

 

Thank you for your time,

Lukasz

 

4 answers

0 votes
Lukasz July 31, 2018

Anyone?

There is really no way to copy all dropdown options from custom field1 to field2/3/4? I need to recreate the same 40 options x4 times?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 31, 2018

To do things the way you describe, yes, and there's no copying because that's not the way Atlassian expect you to use this sort of thing.

But I really think the design of your implementation is weak.  For example, think of the reporting.  "I want to find all cars made by audi" - in a well designed system, you could say "brand = audi".  In yours, you're going to need "brand 1 = audi or brand 2 = audi or brand 3 = audi or brand 4 = audi" and so-on.

A much better design:

  • An issue with "how many cars do you have"?
  • Each car is a subtask with only one brand, one payment and one model field on it

The problems with multiple fields go away.

I would also automate, maybe looking at

  • Automatically create the number of subtasks needed (but block workflow on the main issue until the subtasks have been filled in)
  • Calculated fields on the main issue for
    • Sum of values
    • Array of brands
    • Array of makes
Lukasz July 31, 2018

Thank you Nic for idea,

I never used subtasks before, will research it and test. Hope I can reach you out with bigger challanges/questions. 

 

Best wishes,

Lukasz

0 votes
Lukasz July 25, 2018

Thank you for answers, so the example of the case is that in the ticket there will be questions:
1. How many cars do you have?" - number answer, max 4

2. First Car: How much you paid for it? - number answer
3. First Car: Provide brand. - dropdown menu, has 40 option
4. First Car: Provide model. - dropdown menu, has 40 option

5. Second Car: How much you paid for it? - number answer
6. Second Car: Provide brand. - dropdown menu, has 40 option as above
7. Second st Car: Provide model. - dropdown menu, has 40 option as above

8. Third Car: How much you paid for it? - number answer
9.  Third Car: Provide brand. - dropdown menu, has 40 option as above
10.  Third st Car: Provide model. - dropdown menu, has 40 option as above

11. 12. 13....  

This is just an example, purpose of our ticket is totally different (finance related) but this example shows exactly what i need to do.

If I will make it manually - it will be minimum 8 Custom fields with totally 320 dropdown options. Then i need to create a rule that if somebody picked specific brand and model - hidden custom field will be updated = additional minimum 160 rules. 

 

I was hoping to do it only once for first car and just copy paste second, third and forth one,  

Hope it is clear now. I do not bought any plugin yet, before i need to make sure that tool can make this simple copy paste feature. 

Katarzyna
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
July 25, 2018

Ok, so it's more clear now. Unfortunately, it's not possible with our app. I guess that script runner is the best solution to do it. You can use it not only to copy, but also to set rules. Maybe @Mahesh S or @Nic Brough -Adaptavist- can help you with this case?

0 votes
Katarzyna
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
July 24, 2018

Hi @Lukasz,

If I understand, you have one dropdown menu with 40 options and you want to show different options depending on the request type, right?

Unfortunately, Jira doesn't offer copy custom fields by default. You're right that you can use scriptrunner. But in case of Jira Service Desk, you can do it with our app Extension for Jira Service Desk. Under service desk project settings this app provides a new item: Visibility. In tab Options you can define which options will be visible in which request types.

extension_visibility_options.png

Moreover, you can define for which groups these options will be visible. I think it should solve problem and save your time because all options are available still in one custom field. If you want to edit option / add / delete, you can do it in one place, so you don't have to check every custom field (Example_name1, Example_name2, Example_name3, etc.) what also saves your time and energy.

Kate

0 votes
Lukas Kinc July 24, 2018

Hi Lukasz,

I use 'Jira Misc Workflow Extensions' plugin and copy values in post-fuction on transtion. But this plugin is not probably free...

If you dont use this plugin and if you have Script runner, it is possible use post-function groovy script. If you want, I can send you any example of it...

Lukas

Lukasz July 26, 2018

Hi Lukas,

 

Whatever will do the job, i added some example below to make situation more clear.
Please let me know if your solution will help me out.

Thank you for your time,

Lukasz

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events