Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-9744

jelly runner errors out that no user in context, but knows which user that executed it

    XMLWordPrintable

Details

    Description

      Input: (this used to work fine in previous versions)

      <JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.JiraTagLib">
      <jira:CreateIssue project-key="HSP" assignee="-1" summary="Issue summary"/>
      </JiraJelly>
      

      Output: (It knows the user that executed the script is admin - so username should be set in the context)

      <JiraJelly xmlns:jira='jelly:com.atlassian.jira.jelly.JiraTagLib'>
        <Error action='CreateIssueDetails'>
          <TagContents>((summary=Issue summary)(project-key=HSP)(assignee=-1))</TagContents>
          <ExecutedAs>user=admin</ExecutedAs>
          <ErrorMessage>Tag CreateIssue requires (jelly.username, jelly.project.id) variables to be set in the Context</ErrorMessage>
        </Error>
      </JiraJelly>
      

      Workaround Wrap the script within the Login tag.

      <jira:Login username="admin" password="admin">
      ...
      </jira:Login>
      

      The workaround fixes the error, however in this case, it doesnt seem to be needed...?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sam@atlassian.com Sam Chang [Atlassian]
              Votes:
              4 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: