Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-5494

Adding a new component in Create or Edit issue screen cause error message when database picker field on the screen



    • Bug
    • Status: To Do
    • Low
    • Resolution: Unresolved
    • 6.23.0, 6.32.0
    • None
    • Script Fields
    • None
    • 1.5



      When user adding a new component in the Create/Edit issue screen, they are getting the following error message when database picker on the screen:

      A component with the name xxx already exists in this project.

      The new component is added but issue not created or edited successfully.

      Steps to Reproduce

      Provide a detailed step-by-step process to reproduce the problem.

      1. Create a new Database Picker by following the docs here
      2. Associate the DB picker to the project Create/Edit issue screen.
      3. Create a new issue.
      4. Adding a new component in the Create issue screen and hit "Create" button.
      5. First, we don't see any error and hit "Create" button again.
      6. You will get the "A component with the name xxx already exists in this project." error message on the screen and logs showing this:
        2021-08-16 15:55:58,374+0800 http-nio-8080-exec-16 ERROR      [c.a.j.web.servlet.InternalServerErrorServlet] {errorId=3e197333-920a-4760-b8d2-96097205eadd, interpretedMsg=, cause=java.lang.IllegalArgumentException: Component name = 'DD' is not unique, stacktrace=java.lang.IllegalArgumentException: Component name = 'DD' is not unique
            	at com.atlassian.jira.bc.project.component.CachingProjectComponentStore.createIllegalArgumentExceptionForName(CachingProjectComponentStore.java:355) [classes/:?]
            	at com.atlassian.jira.bc.project.component.CachingProjectComponentStore.insert(CachingProjectComponentStore.java:296) [classes/:?]
            	at com.atlassian.jira.bc.project.component.CachingProjectComponentStore.store(CachingProjectComponentStore.java:212) [classes/:?]
            	at com.atlassian.jira.bc.project.component.DefaultProjectComponentManager.create(DefaultProjectComponentManager.java:107) [classes/:?]
            	at com.atlassian.jira.issue.fields.ComponentsSystemField.updateIssue(ComponentsSystemField.java:516) [classes/:?]
            	at com.atlassian.jira.web.action.issue.IssueCreationHelperBeanImpl.updateIssueFromFieldValuesHolder(IssueCreationHelperBeanImpl.java:145) [classes/:?]
      7. If you check the project component, the new component is added.

      Expected Behaviour

      • No error message showing up after adding a new component and able to create or edit issue.
      • The database picker should not be the issue causing the error message when adding a new component. If it does, the error message should be more meaningful of why its happened.

      Actual Behaviour

      • There is an error message showing up after adding a new component via Create/Edit screen.
      • The problem is due to the database picker is associate to the project create or edit issue screen.


      • Unmapped any database picker field from the create or edit issue screen.
      • Retry again due to the component has been added after the first error message.

      Additional Note


        Issue Links



              Unassigned Unassigned
              jloong John Chin Loong [X] (Inactive)
              1 Vote for this issue
              6 Start watching this issue