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

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

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.

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.

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

179 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you