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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Create a screen with scriptrunner (clone a project)


I'm trying to create a real clone of a project with Scriptrunner.

To do that, i need to copy every single element of a project (workflow scheme, workflow, issue type scheme,...)

I'm acutally trying to do that with issue type screen scheme.

There is a manager for this object, but the function to create a issue type screen scheme is odd:

voidcreateIssueTypeScreenScheme(IssueTypeScreenScheme issueTypeScreenScheme) 

And there is no further description.

I tried to dig this issue until the screen object. Even for the screen we have this kind of function:

voidcreateFieldScreen(FieldScreen fieldScreen)

Besides the architecture of the issue type screen scheme is a bit weird, i found this:

The goal is to create FieldScreens, then associate them to upper objects.


But there is no real function to create FieldScreenScheme or FieldScreen or 


There is still a possibility to create thos object since there are all kind of setters:

voidsetDescription(String description) 
voidsetGenericValue(org.ofbiz.core.entity.GenericValue genericValue) 
voidsetId(Long id) 
voidsetName(String name) 

But that doesn't seems "clean" at all to me. Besides i still need to generate a correct id and i'm not sure how to generate a correcte "GenericValue".


Any idea for all this matter ? :)




Laurent Bierge



There is already built-in script to do the same task. It is called Clone project. Go to cog item->add-ons find built-in scripts in the vertical menu. 

Actually i only have "copy". Besides "copy" don't clone project elements, it share them with the new project.

I want my new project to be independant.

Like jingjing likes this

A little update about this long lost journey.

Actually the FieldScreenSchemeItem is what makes the link between FieldScreenScheme and an issue operation.

The big improvement is that i managed to create a screen by scripting. I think there is a lot of safe way to do that and that the one i used may not be the safest one.

The interface FieldScreen actually has functions that allow you to create a screen. However, as it is an interface it doesn't have a constructor.

The class FieldScreenImpl which implement FieldScreen does have all those function and have a constructor. That constructor is very easy to use since it only requires the FieldScreenManager interface. (which you can obtain in componentAccessor)

So i created an FieldScreenImpl object and set the name, description, tab (important) and id (very important). The id is set by reading all screens ids and adding one to the bigger id. (if the id is already used, an error is thrown)

I used the store function to create the screen.

With this in mind, it should be possible to use this method to create every object until the issueTypeScreenScheme. 

Ps: Now that i've seen what's was in "xxxImpl" classes, i think that it's something that is obvious for most of devs that this class should be used to create object. It wasn't for me though !

Like # people like this

Hi Laurent,


Would you be able to post a snippet of code demonstrating how you were able to create the issue type screen scheme? We are similarly stuck. I will be looking into the impl classes you described above, just wanted to see if you had any examples that worked for you.



Hi Joshua,

No exemple left, I didn't kept an exemple of what I've tested ^^'.

However, if you follow what I said, i'm sure you can manage to build something.



Hey Laurent,

I have the same need as you did - full clone of a project with own Elements.

Unfortunately I'm a SR Noob fo could you post your complete script here? It would massively massively help me.



Hi Andie,

Unfortunately I'd never got the time to push forward my tests. When it's needed I still copy the project with SR and then clone manually each object that need it.



OK, thx nevertheless. 

If I get it working I will post it here. I still find all the manual steps needed too much :)


Log in or Sign up to comment