Hi,
Jira version 7.2.6
Script runner version 5.3.1
I am having issue to select the few of the workflows in behavior. I am getting the error messages as below. Nothing writing in logs about this issue.
Error
There was a problem fetching the workflow, perhaps it was deleted. Check server logs.
There is no problem with workflow. No luck with copy the workflow and tried to use in behavior. Same error.
Can anyone know what could be the problem.
After going through the code you shared above, I have a question: i.e. can you confirm that the displayname column matches the Username instead of the User's Display Name?
If not, instead of using:-
def userinfousername = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser().getUsername()
it would be better if you used:-
def userinfousername = ComponentAccessor.jiraAuthenticationContext.loggedInUser.displayName
Also, I suggest upgrading your ScriptRunner plugin to the latest release so you can use the HAPI feature to simplify your code.
For the sample above, when using HAPI, all you need to do is:-
import com.adaptavist.hapi.jira.users.Users
....
....
....
Users.loggedInUser.displayName
I am looking forward to your feedback and clarification.
Thank you and Kind regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.