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

Description field and Activity Tab is empty when using custom Project Key Pattern

    XMLWordPrintable

Details

    Description

      Steps to reproduce:

      1. install a new vanilla JIRA instance
      2. create a new project. Let's say with key "ADD"
      3. create a ticket with description "tea". Issue Key ADD-1
      4. create another ticket (ADD-2) with description contain:
        Try to find a point where there is some load (BT off, LEDs on, display on)
        

        Refer to screenshot Description-Edit.png

      5. change Project Key Pattern via Administration > General Configuration > Advanced > jira.projectkey.pattern to:
        ([A-Z][A-Z]+)|(PJ[0-9]{4})
        
      6. try to create a new Project with key "PJ0223". JIRA doesn't throw any error.
      7. go to both ADD-1 and ADD-2. ADD-1 is correct as shown in ADD-1.png. However, ADD-2 will have the description broken as shown in the screenshot Description-View.png
      8. JIRA also throw following error if :
        2012-03-26 21:33:07,110 http-8084-2 ERROR admin 1293x162x1 9tevgj 127.0.0.1 /browse/ADD-2 [atlassian.renderer.v2.V2Renderer] Unable to render content due to system error: String index out of range: -1
        java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        	at java.lang.String.substring(String.java:1931)
        	at java.lang.String.substring(String.java:1904)
        	at com.atlassian.jira.issue.fields.renderer.wiki.links.JiraIssueLinkRendererComponent.linkBugKeys(JiraIssueLinkRendererComponent.java:77)
        	at com.atlassian.jira.issue.fields.renderer.wiki.links.JiraIssueLinkRendererComponent.render(JiraIssueLinkRendererComponent.java:26)
        

        or

        2012-03-26 21:23:40,665 http-8084-2 ERROR admin 1283x107x1 9tevgj 127.0.0.1 /browse/ADD-2 [webwork.util.ValueStack] METHOD: "renderedContent", exception: 
        java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        	at java.lang.String.substring(String.java:1931)
        	at java.lang.String.substring(String.java:1904)
        	at com.atlassian.jira.util.JiraKeyUtils.linkBugKeys(JiraKeyUtils.java:372)
        	at com.atlassian.jira.issue.fields.renderer.text.DefaultTextRenderer.render(DefaultTextRenderer.java:20)
        

      This is tested in JIRA 4.4.3

      Attachments

        1. ADD-1.png
          ADD-1.png
          33 kB
        2. Description-Edit.png
          Description-Edit.png
          10 kB
        3. Description-View.png
          Description-View.png
          37 kB

        Activity

          People

            Unassigned Unassigned
            jalbion Janet Albion (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: