KCF-Pro when does select script fire in comparison to post functions on a transition.

AndrewB November 23, 2015

I have a KCF-Pro custom field. I present it during a transition. I have a select script to create an issue link. I also have a post function to clear the custom field value. It looks like the post function happens before the select script. Is there any way to reverse this order?

1 answer

1 accepted

1 vote
Answer accepted
Silviu Burcea
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 23, 2015

I think that you can use select script to do everything the post function does and eliminate the post function. If you have to keep both of them but there is some common code, move the common code into a new script and use include statement. A use case would be helpful to better understand your needs and provide an accurate solution.

AndrewB November 24, 2015

That's a good idea. Basically, I'm using a KCF - Pro custom field for a user to pick an issue during a transition, then I create an issue link from the current issue to the issue picked, and then I clear the custom field value. If I don't clear the custom field value - if a user deletes the issue link after the transition, and then the issue comes back through the transition, then if the same issue is left selected the select script won't fire and create an issue link because there wasn't a change in the field. Do you happen to have an example of clearing the field in a select script? I'm guessing it's easy, but I haven't played with it yet.

AndrewB November 25, 2015

It was very easy in case anyone else runs across this: KPOption[] selectedOption = customfield_xxxxx; linkIssue(key, selectedOption[0].value, "Issue Link Name"); customfield_xxxxx[0] = "";

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events