Can someone let me know how to update a issue picker value.
this is what am using which is not working.
def issuepicker= ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Issue Picker")
myIssue.setCustomFieldValue(issuepicker, value)
It kinda depends where you want to execute this script.
Is this a postfunction, listener or somewhere else?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
setCustomFieldValue(issuepicker, value) only sets the mutable issue object (in memory) to the specified value. That should normally be followed by updateIssue()
In a listener, to update a custom field, there are 3 general methods that I'm aware of
#1 is preferable because it ensures all validation & permissions are respected. It takes care of logging the change in the issue history and re-indexing the issue. This is closest to replicating the user's action in the UI.
#2 will create the issue history but you must add your own code to update the index
#3 will only update the custom field and leave no trace in the history or index
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@PD Sheehan I have achieved it by giving issue object as value
def filterissue = issueManager.getIssueObject(key)
myIssue.setCustomFieldValue(parentICR , filterissue)
Thank you.
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.