Uploaded image for project: 'JIRA (including JIRA Core)'
  1. JIRA (including JIRA Core)
  2. JRA-3382

Custom fields cannot be included in the project release notes

    Details

    • Type: Suggestion
    • Status: Closed (View Workflow)
    • Resolution: Won't Do
    • Affects Version/s: 2.6 Pro
    • Fix Version/s: None
    • Component/s: Custom Fields
    • Labels:
      None
    • Feedback Policy:

      JIRA feedback is collected from a number of different sources and is evaluated when planning the product roadmap. If you would like to know more about how JIRA Product Management uses customer input during the planning process, please see our post on Atlassian Answers.

      Description

      I want to enhance the release notes report, so I tried to add a custom defined field in the velocity template releasenotes-text.vm

      Using
      $issue.getString("<custom field>")
      in releasenotes-text.vm I get an exception.

      Aren't the custom fields available via $issue ?
      It doesn't seem to be, because they are not listed via
      $issue.getAllFields().

        Attachments

          Issue Links

            Activity

            Hide
            owen@atlassian.com Owen Fellows added a comment -

            I Believe it is currently not possible to do this as you don't have access to the custom fields within velocity.

            Would be good to add the ManagerFactory into the default velocity context so user customisation is easier. (Not sure how this would effect performance.)

            Show
            owen@atlassian.com Owen Fellows added a comment - I Believe it is currently not possible to do this as you don't have access to the custom fields within velocity. Would be good to add the ManagerFactory into the default velocity context so user customisation is easier. (Not sure how this would effect performance.)
            Hide
            inteco veenion added a comment -

            This is a short except for the Releasenote velocity html template which shows an issue only if the custom field "inReleaseNotes" is true and shows in addition a custom field "externalNotes".

            What is missing?
            1.) How do I get the components of the issues? (We coded our customers as components.)
            2.) And how do I find the user who resolved the issue?

            #foreach ($issue in $issueType.issues)
            #foreach ($cfvalue in $issue.getRelated("ChildCustomFieldValue"))
            #if ($cfvalue.getRelated("ParentCustomField").get(0).getString("name") == "inReleaseNotes")
            #if ($cfvalue.getString("stringvalue") == "Yes")
            <li>[<a href='$!appProps.getString("jira.baseurl")/browse/$issue.getString("key")'>$issue.getString("key")</a>] - $issue.getString("summary")</li>
            #foreach ($cfvalue in $issue.getRelated("ChildCustomFieldValue"))
            #if ($cfvalue.getRelated("ParentCustomField").get(0).getString("name") == "externalNotes")
            $

            {cfvalue.getString("textvalue")}

            <br>
            <br>
            #end
            #end
            #end
            #end
            #end

            #end

            Show
            inteco veenion added a comment - This is a short except for the Releasenote velocity html template which shows an issue only if the custom field "inReleaseNotes" is true and shows in addition a custom field "externalNotes". What is missing? 1.) How do I get the components of the issues? (We coded our customers as components.) 2.) And how do I find the user who resolved the issue? #foreach ($issue in $issueType.issues) #foreach ($cfvalue in $issue.getRelated("ChildCustomFieldValue")) #if ($cfvalue.getRelated("ParentCustomField").get(0).getString("name") == "inReleaseNotes") #if ($cfvalue.getString("stringvalue") == "Yes") <li> [<a href='$!appProps.getString("jira.baseurl")/browse/$issue.getString("key")'>$issue.getString("key")</a>] - $issue.getString("summary")</li> #foreach ($cfvalue in $issue.getRelated("ChildCustomFieldValue")) #if ($cfvalue.getRelated("ParentCustomField").get(0).getString("name") == "externalNotes") $ {cfvalue.getString("textvalue")} <br> <br> #end #end #end #end #end #end
            Hide
            owen@atlassian.com Owen Fellows added a comment -

            In the above code you have used the $cfvalue variable twice. Velocity might get confused by this. If it isn't working as expected i would print out all values as you look and i might give you a hint as to what is going wrong.

            Show
            owen@atlassian.com Owen Fellows added a comment - In the above code you have used the $cfvalue variable twice. Velocity might get confused by this. If it isn't working as expected i would print out all values as you look and i might give you a hint as to what is going wrong.
            Hide
            owen@atlassian.com Owen Fellows added a comment -

            It is not possible to get Issue Components as there are not relations and they are joined through a many to many table.
            The assignee relation is more complicated as we use the OSUser object and not a generic value so with out the UserManager you can not retrieve the assignee or reporter.

            Show
            owen@atlassian.com Owen Fellows added a comment - It is not possible to get Issue Components as there are not relations and they are joined through a many to many table. The assignee relation is more complicated as we use the OSUser object and not a generic value so with out the UserManager you can not retrieve the assignee or reporter.
            Hide
            kewilliams Kerrod Williams added a comment -

            Thanks for taking the time to raise this issue.

            Due to the large volume of JIRA feature suggestions, we have to prioritise our development efforts. In part, that means concentrating on those issues that resonate the most with our users.

            I am writing this note to advise you, that we have decided to close your Suggestion as it has not gained traction on jira.atlassian.com. We believe being upfront and direct with you will assist you in your decision making rather than believing Atlassian will eventually address this issue.

            Thank you again for your suggestion and if you have any concerns or question, please don’t hesitate to email me.
            Kind Regards,
            Kerrod Williams
            JIRA Product Management
            kerrod.williams at atlassian dot com

            Show
            kewilliams Kerrod Williams added a comment - Thanks for taking the time to raise this issue. Due to the large volume of JIRA feature suggestions, we have to prioritise our development efforts . In part, that means concentrating on those issues that resonate the most with our users. I am writing this note to advise you, that we have decided to close your Suggestion as it has not gained traction on jira.atlassian.com. We believe being upfront and direct with you will assist you in your decision making rather than believing Atlassian will eventually address this issue. Thank you again for your suggestion and if you have any concerns or question, please don’t hesitate to email me. Kind Regards, Kerrod Williams JIRA Product Management kerrod.williams at atlassian dot com

              People

              • Assignee:
                Unassigned
                Reporter:
                holger Holger Martini
              • Votes:
                8 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: