I would like to solve the following challenge.
I have a project A in which there are issues A.
I have a project B in which there are issues B in the sense of items in a catalog with a price.
Now I have created a scripted field of the Issue Picker type with the Scriptrunner with which I can select Issue B in Issue A. Up to this point it works very well.
When I have selected the Issue B I was looking for, I would like to transfer 5 fields to Issue A.
Unfortunately I fail at that.
Hi @Kay Domschke I would do it with a postfunction. In more details
You can try to write some script and we can consult it step by step?
I'll try my very best, first Idea was to include it into the scripted Issue Picker, but guess that won't work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kay Domschke , you still need Issue Picker field. The task is "to copy data from issue B to issue A". Issue picker field provides an issue instance, I guess it is ok... you need to implement the function which happens after the form is saved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Martin Bayer _MoroSystems_ s_r_o__
Wouldn't a listener also be a good option, which would be fired after the issue edit?
I would not like to tie it to the status of an issue, rather to a change in an issue.
Is my train of thought wrong?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kay Domschke yes, you can use listener, but I don't like it because of performance. It is not probably the problem for smaller instances but I'm programmer so I want the code to be only executed when it is really needed...that's why I use postfunctions most of the time.
If you're on DC or your instance is not big, you can use listener :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Perfect, I'll follow the way of Listener. Will create a proposal and post ist.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure, keep me updated :) good luck
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now i solved it by a bahavior. Works fine. I found some code in the library and was able to adapt it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nice, good job. Did my answer help you a little or did you make it on your own?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks a lot, you guided me in the right direction. Then I founded this and that help me finaly: https://library.adaptavist.com/entity/set-form-field-values-from-issue-in-picker
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.