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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Create issue with copied multi-user picker custom field (ScriptRunner)

Hi,

I have to create a complex solution for our customer but I'm stucked at a part.

The task, is to create a new issue that inherits some data from the original issue, and link the two tickets.

I'm trying to do it with IssueInputParameter, but it's not too flexible in adding CustomFields, cause it only accepts String parameters.

By this way I can't add value to the multi-user picker, th validation result is invalid all the times.

Does anyone knows a better solution?

1 answer

Hi @Zoltan Kiss I remember we used few methods

Hi @Martin Bayer _MoroSystems_ s_r_o__

I've already tried the second one, and I'm able to copy it's value. The problem is, that when the new issue is created, an other script has to handle that, but without this custom field value, it will fails all the time.

What I trying to do:
1. create issue (without the custom field value) in a post-function at the original issue and link them together
2. catch the create issue event, and fill this custom field
3. further tasks with new issue in an other post function

It fails at 2. because issue2 is null... As I think, the first point is slower than the second, so at that moment when 2. starts, issue2 is not exists yet. Or the linking is too slow?!
Now I have to create issue2 and then link it to issue1 in the same script.

Is there a way to link issue1 and issue2 at the same time when I create issue2 ?

I've planned trying to clone issue2, but I don't need every field. Can I decide what will issue2 inherits os at least exclude some fields?

Hi @Zoltan Kiss thank you for clarification. And what about this postfunction prepared by Adaptavist. It already contains link and custom field selection functionality:

https://scriptrunner.adaptavist.com/latest/jira/builtin-scripts.html#_clones_an_issue_and_links

Hi @Martin Bayer _MoroSystems_ s_r_o__ ,

Well... I've never used it, but I give it a try.

Thank you.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...

7,047 views 8 28
Join discussion

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