I have a custom field that I use for reporting called "Original Project" that my users are populating when they create a JIRA issue. They populate it with the Project they are creating the issue in.
However, I'm able to derive this field based on the Project the user creates the issue in, so why have the user fill it out? I'm wondering how I can just silently update this field in the background based on the Project.
I looked at using a Post Function, but none of them seemed to be "Update a custom field based on the Project".
I could add an event, then add a listener to the event... is that the best way to silently set a custom field based on other info?
Thanks!
--
Nathan
As you've already worked out, you'll need to find or write a plugin to do this. You'll need to choose between post-function and listener as well.
Post-functions run only on transitions, are relatively easy to write, and can be placed in a way such that they only ever run when they are needed. Listeners are more flexible as they can catch any event. (Your comment about "adding an event" needs a bit more info - events are already fired, and it's one event per thing-that-happens, so you probably don't need to worry about adding another one - you've already got "create issue" events happening and you can't add a second event)
On the back of all of that, I'd seriously recommend a look at the script runner plugin. It can bypass the need for another plugin in both cases above and can be a lot more flexible than hard-coding a plugin...
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.