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

Jelly's removeProject is broken and probably never worked

    XMLWordPrintable

Details

    Description

      The Jelly docs at http://confluence.atlassian.com/display/JIRA/Jelly+Tags#JellyTags-BetaTags suggest that removeProject takes a pId parameter (notice the weird mixed caseness). However when you actually submit:

      <JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.JiraTagLib">
      <jira:RemoveProject pId="10000" />
      </JiraJelly>
      

      You get an error back from JIRA:

       <JiraJelly xmlns:jira='jelly:com.atlassian.jira.jelly.JiraTagLib'>
        <Error action='DeleteProject'>
          <TagContents>(RemoveProject(pId=10000))</TagContents>
          <ExecutedAs>user=admin</ExecutedAs>
          <ErrorMessage>Tag RemoveProject requires (jelly.username, jelly.project.id) variables to be set in the Context</ErrorMessage>
        </Error>
      </JiraJelly> 
      

      The problem is that RemoveProject extends ProjectAwareActionTagSupport. This means username and projectid are expected to be "in the context". The project is never being put in the context. I'm not positive but I think this normally happens via preContextValidation which RemoveProject doesn't override.

      This code was originally checked in in 2003 (with no tests) and I have doubts that it ever worked. No one has ever complained until now which gives an indication of how little use Jelly gets.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jpendleton Justus Pendleton (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: