getting error for existing behavior

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.fields.CustomField
import java.text.SimpleDateFormat
import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.ComponentManager
import com.atlassian.crowd.embedded.api.User
import com.atlassian.core.user.preferences.Preferences

FormField formComponent = getFieldById("customfield_XXXXXXX")
User user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
Preferences pres = ComponentAccessor.getUserPreferencesManager().getPreferences(user)
formComponent.setHelpText("<div class=\"description\"> Time in <font color=\"green\"><b>$timezone</b> </font> Timezone</div>")




JIRA Version : 6.4.9 



Error :


unable to resolve class com.atlassian.core.user.preferences.Preferences
@ line 10, column 1.
import com.atlassian.core.user.preferences.Preferences



1 answer

1 accepted

0 votes

Hrm, I can reproduce that. Must be a classloader issue. When you say "existing behaviour", did this used to work? If so, in which version, of the plugin or JIRA?

I raised to track this.

Hi Jamie, Yes , yesterday I have upgraded from Jira 6.1.7 to Jira 6.4.9. This behavior was working as expected and was used to display the timezone of the use in the custom date time fields. Below is the information for earlier version Jira version : 6.1.7 Behavior plugin : 0.5.10 now we have upgraded to script runner : 3.1.x Thanks for your response. Best Regards, Sumit

OK, thanks Sumit, we will look at this soon.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,864 views 12 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot