We have two date (custom) fields. Requirement is when one edits field A, field B needs to be refreshed with A's data (date). Is there some script we can try and use?
Thanks.
Try this code:
import com.atlassian.jira.component.ComponentAccessor
issue.setCustomFieldValue(
ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("dateTo")
, issue.getCustomFieldValue(ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("dateFrom"))
)
Thanks for the response. Should this be added in Behaviors, or Script Runner? Can you please provide a little more detail.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is for scriptRunner custom script postfunction.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We have already implemented a postfuntion . But we need the value to be copied from Field A to Field B incase of any changes to Field A's value and not to depend on Status Change.Can you suggest some method to implement this in detail?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Since you need a listener on issue Update event.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can you please explain me the steps that needs to be followed for creating a listener on issue Update event for Field A changes, so that Field B is updated?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.