Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-17745

Expression commit.author is undefined in notification email

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Low
    • None
    • 5.12.2.1
    • None

    Description

      Summary

      When a notification email is supposed contain the commit author name, Bamboo throws the following error:

      2016-07-13 21:56:42,335 ERROR [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-15] [runtime] Expression commit.author is undefined on line 35, column 3 in notification-templates/notificationCommonsText.ftl.
      
      Expression commit.author is undefined on line 35, column 3 in notification-templates/notificationCommonsText.ftl.
      The problematic instruction:
      ----------
      ==> ${commit.author.fullName} [on line 35, column 1 in notification-templates/notificationCommonsText.ftl]
       in user-directive showCommits [on line 7, column 1 in notification-templates/BuildMissingCapableAgentTextEmail.ftl]
      ----------
      
      Java backtrace for programmers:
      ----------
      freemarker.core.InvalidReferenceException: Expression commit.author is undefined on line 35, column 3 in notification-templates/notificationCommonsText.ftl.
      	at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
      	at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134)
      	at freemarker.core.Dot._getAsTemplateModel(Dot.java:78)
      	at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
      	at freemarker.core.Expression.getStringValue(Expression.java:93)
      	at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
      	at freemarker.core.Environment.visit(Environment.java:210)
      	at freemarker.core.MixedContent.accept(MixedContent.java:92)
      	at freemarker.core.Environment.visit(Environment.java:210)
      	at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167)
      	at freemarker.core.Environment.visit(Environment.java:417)
      	at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
      	at freemarker.core.Environment.visit(Environment.java:210)
      	at freemarker.core.MixedContent.accept(MixedContent.java:92)
      	at freemarker.core.Environment.visit(Environment.java:210)
      
      

      Steps to Reproduce

      1. Setup build plan to send notification for Jobs queued with no capable agents
      2. Trigger the build by pushing a commit

      Expected Results

      Email sent with triggering commit details

      Actual Results

      The error as per the description appears in the logs. Email is still sent, with missing commit author name.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dlee@atlassian.com Deric Lee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: