Hi Team
I have a custom field with Date and Time picker but now realized fields should be only "Date" and do not need time also to be captured.
Thanks in advance.
Hello,
It is impossible to change a custom field type through the UI interface. The safest way is to create a new field and copy all values from the old field to the new field using an add-on like Power Scripts or ScriptRunner.
HI @Raju Anumula
You can do this from backend but there is no way from UI.
Here is the documentation for the changing custom field type but making changes from backend are not recommended by Atlassian itself.
The ticket also has been created from this but the resolution will be Wont fix.
Hi Alexey,
we are using script runner plugin, I am not expertized in a script, please guide me how to use a script in this case.
Your script would look like this. You can run it in the ScriptConsole of the ScriptRunner plugin. Kindly check the script first in a test environment.
import com.atlassian.jira.issue.fields.CustomFieldimport com.atlassian.jira.issue.fields.config.FieldConfigimport com.atlassian.jira.issue.context.IssueContextImplimport com.atlassian.jira.issue.customfields.manager.OptionsManagerimport com.atlassian.jira.issue.customfields.option.Optionsimport com.atlassian.jira.issue.customfields.option.Optionimport com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.issue.ModifiedValueimport com.atlassian.jira.issue.util.DefaultIssueChangeHolderdef findIssues(String jqlQuery) { def issueManager = ComponentAccessor.issueManager def user = ComponentAccessor.jiraAuthenticationContext.user def jqlQueryParser = ComponentAccessor.getComponent(JqlQueryParser.class) def searchProvider = ComponentAccessor.getComponent(SearchProvider.class) def query = jqlQueryParser.parseQuery(jqlQuery)def results = searchProvider.search(query, user, PagerFilter.unlimitedFilter) results.issues.collect { issue -> issueManager.getIssueObject(issue.id) }}def user = ComponentAccessor.jiraAuthenticationContext.userCustomField cf = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("source field name")CustomField cf1 = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("destination field name")def jqlQuery = "Your JQL query to choose all required issues here"def issues = findIssues(jqlQuery)issues.each{it -> log.error it.getCustomFieldValue(cf); cf1.updateValue(null, it, it.getCustomFieldValue(cf), new DefaultIssueChangeHolder());}
Thanks a lot Alexey.
It looks like you're new here. Sign in or register to get started.