Hello everyone
I would like the syncronize the composent who are in project n°1 and for example the project n°2 he can use the components who are in the project n°1.
I'm find this script : ( https://mraddon.blog/2021/04/25/how-to-sync-components-between-jira-projects/ )
it's the second party
in this script i can enter the project key but he don't working
You can help me ???
Ok, so this is not going to do what you think it is. Rather than try to fix your scripts, I would like to check if you actually want to do this!
Components are project items, they do not go across projects. The scripts you've got are broadly trying to duplicate, not share.
Components in different projects are different and independant things, no matter what their names are - Component "Cat" in project ABC is not the same component as "Dog" in project ABC or "Cat" in project DEF.
Are you sure you want duplicate component names?
No i would like than a project n°1 use the project n°2 and when i add the components in the project n°2 the components he should syncronise for show ad use in the project n°1
Thanks in advance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Um, as I said, you can't do that.
Issues in project n*1 can only show and use the components in project n*1, they can't use the components from project n*2.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i have this errro when i create a new component :
2022-02-09 16:25:44,064 ERROR [runner.AbstractScriptListener]: *************************************************************************************
2022-02-09 16:25:44,064 ERROR [runner.AbstractScriptListener]: Script function failed on event: com.atlassian.jira.event.bc.project.component.ProjectComponentCreatedEvent, file: null
java.lang.NullPointerException: Cannot invoke method getId() on null object
at Script29.run(Script29.groovy:24)
You can help me please ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your script contains a small error. In fact "dest_prj" must contain project KEYs and not project names.
Project keys cannot have spaces in them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Salim,
@Nic Brough -Adaptavist- is right. You cannot share components between projects.
The script you gave "duplicates" components between the two projects. Perhaps if you explain what is the end-user requirement we can help you?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I have a error when i create the component
Error :
2022-02-09 16:25:44,064 ERROR [runner.AbstractScriptListener]: *************************************************************************************
2022-02-09 16:25:44,064 ERROR [runner.AbstractScriptListener]: Script function failed on event: com.atlassian.jira.event.bc.project.component.ProjectComponentCreatedEvent, file: null
java.lang.NullPointerException: Cannot invoke method getId() on null object
at Script29.run(Script29.groovy:24)
You can help me please ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @M Amine
I have this script he dupplicate the components between project and i would like when i change the name for the component , the name in the other project but actually when i change the name he create a new component with name changed
You can help me ?
Thanks in advance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is not going to work like that. It can't because you don't know what you need to look for.
Imagine you've got a list of components, and the same list in the second project:
If someone changes "Bunny" to "Guinea Pig" in TH, then
How are you catching the event that they do that?
If you read the components in TH now, there is no Bunny, so you don't know what the change is from. It actually looks like a delete.
Your code is going to have to get the whole list of components from both projects, compare them and try to guess what has changed. If the list in source is longer, you know to add the missing ones, if the list is shorter, you'll need to delete a component from the destination, and if the list is the same length, you'll need to compare every item until you find the changed one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.