-
Bug
-
Resolution: Fixed
-
Medium
-
3.6.5, 3.7 Beta 2
-
3.06
-
I am currently preparing many import using CreateIssue tag with enterprise release, it appears that with as such script :
<JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.JiraTagLib" > <jira:CreateIssue project-key="AP00517" summary="My Summary ..." duplicateSummary="ignore" priority="Haute" issuetype="20100" assignee="182388" reporter="182614" description="My description ... " created="2004-07-23 00:00:00.0" timetracking="48000" > </jira:CreateIssue> </JiraJelly>
Executed with Admin account, the Reporter is never set to the specified value.
The excution Tag sequence is as follow :
- com.atlassian.jira.jelly.tag.issue.enterprise.CreateIssue.preContextValidation() is called
- com.atlassian.jira.jelly.tag.issue.AbstractCreateIssue.preContextValidation()
if (getProperties().containsKey(KEY_ISSUE_REPORTER)) { setPreviousUsername(getUsername()); getContext().setVariable(JellyTagConstants.USERNAME, getProperty(KEY_ISSUE_REPORTER.toLowerCase())); }
- delegation to Webwork Action CreateIssueDetails
- com.atlassian.jira.jelly.tag.issue.AbstractCreateIssue.endContextValidation()
if (hasPreviousUsername) getContext().setVariable(JellyTagConstants.USERNAME, getPreviousUsername());
- com.atlassian.jira.jelly.tag.issue.AbstractCreateIssue.preContextValidation()
But in com.atlassian.jira.issue.fields.ReporterSystemField, the following methods are called :
public void populateDefaults(Map fieldValuesHolder, Issue issue) { User remoteUser = (User) getDefaultValue(issue); if (remoteUser != null) fieldValuesHolder.put(getId(), remoteUser.getName()); }
public Object getDefaultValue(Issue issue) { // The default value that should be set if the user cannot modify this field is the remote user's name return getAuthenticationContext().getUser(); }
The JiraAuthenticationContext should be altered in the AbstractCreateIssue as it is has been already done for AddComment tag :
String reporterName = getProperty(KEY_ISSUE_REPORTER); try { User reporter = ((UserManager)ComponentManager.getInstance().getContainer().getComponentInstanceOfType(UserManager.class)).getUser(reporterName); ComponentManager.getInstance().getJiraAuthenticationContext().setUser(reporter); } catch (EntityNotFoundException e) { log.warn("Reporter named " + reporterName + " not found. Creating issue with currently logged in user instead"); }
- duplicates
-
JRASERVER-5620 CreateIssue with non-default reporter fails
- Closed
- is related to
-
JRASERVER-15710 Setting reporter silently fails if the input Screen is not configured to allow setting the field
- Closed