Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to move issue from one project to other using custom groovy script?

I want to move issue to specific project using post function.

Awaiting your response.

1 answer

2 votes

No.

You cannot do this in a post function, as you need the issue to not be in the middle of a transition.

Moving an issue is complex whenever you do it.  The project (and issue type) define ALL the configuration for an issue, and to avoid breaking your data, Jira checks compatibility when you do a move.  What happens when the workflow is different in the new project?  Or security, or fields or or or?

The question "move issue in post function" is not in itself a bad question, but it always points to a wider problem.  Either your process is broken, or you are mapping it into Jira incorrectly.

Instead of trying to perform a hideous botch with complex code, fix your process or mapping.  Go back to the source of the question - why do you think you want to move an issue in a post-function?

It is not moving the existing issue to a new project. The requirement is Make a clone of existing issue and move that cloned issue.

Ok, that's not in the original question, so there was no way to know.  

It is easier in some ways, as you can move an issue if it's not the issue being transitioned, but your code will still need to think about ensuring your "clone" is complete before trying the move.

The comments about moving issues still stands though - it's hard, complex and potentially messy.

Frankly, just don't bother.  Instead, write a simple "create issue in other project, with any fields from the current issue copied in".  You don't need to mess around with clone or move.

Like Adam Hraban likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase

The benefits of using Jira in different departments

Jira is a great tool to use across different departments. Forget that paperwork – switch to Jira and get that tasks done smoothly. Marketing Jira allows for a complete digital transformation of you...

101 views 0 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you