Access both last comment and transition comment on a post-function

Issue #245 resolved
Aggelos Paraskevopoulos [Cententia] created an issue

I'm trying to get both "Last comment" value and "Transition's Comment" on advanced parsed text, but these two values seem to be the same when the user adds something on the transition's comment.

Is there a way to achieve this?

Comments (9)

  1. Fidel Castro Armario repo owner

    Hi Aggelos,

    The following text to be parsed in advanced mode returns the last comment different from transition comment:

    count(allComments()) > 0 ? last(allComments()) : ""
    
  2. Aggelos Paraskevopoulos [Cententia] reporter

    Thanks for the suggestion Fidel I'll give it a try.

    Any way to filter this list of comments in order to pinpoint a specific comment, e.g. submitted by the Reporter? I which we could use "Last commenter" to verify if it's a comment coming from reporter.

  3. Fidel Castro Armario repo owner

    The following boolean expression returns true only if last comment different from transition comment fulfills any of the following two conditions:

    • was created by the reporter and later not edited later
    • was edited and its last editor is the reporter
    count(allCommenters()) > 0 IMPLIES last(allCommenters()) = %{00006}
    
  4. Aggelos Paraskevopoulos [Cententia] reporter

    So allCommenters() is returning an ordered list of users based on comment creation or update timestamp? Cool. Going to try it.

    Thanks Fidel.

  5. Fidel Castro Armario repo owner

    Aggelos, I close the issue. Please, reopen it if you need more support on the same subject.

  6. Aggelos Paraskevopoulos [Cententia] reporter
    • changed status to open

    Hi Fidel,

    I have trouble applying your last suggestion. I believe the allCommenters() method returns a distinct list of comment authors, so just getting the last item from list is not really retrieving the actual last commenter of the issue. So in my case the expression is always false.

    Any ideas?

    Thanks, AP

  7. Fidel Castro Armario repo owner

    Hi Aggelos,

    Sorry, you are right. You can use version 2.2.9_beta_3 which returns commenters and updaters by order of actuation. This version of the plugin only solves a pair of small bugs, so you can use it in production environment if you wish to.

  8. Log in to comment