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

Cannot add comment in transition screen if destination status has jira.permission.comment.user set to false

      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      This seems to be caused by the bugfix for: https://jira.atlassian.com/browse/JRA-40310

      In 6.3.9 and later, you can no longer add a comment in a transition screen if the destination status has jira.permission.comment.user set to false or denied. The message below is displayed in a red banner when you try to transition the issue:
      <username>, you do not have the permission to comment on this issue.

      This should not be the case because the comment permission property should be based on the CURRENT status of the issue. To put it in simply, the transition was not yet executed so adding a comment should be allowed.

            [JRASERVER-40997] Cannot add comment in transition screen if destination status has jira.permission.comment.user set to false

            I'm on 6.3.14 in Live and it doesnt work whereas my test environment is 6.4.13 and it does!

            Sean Bennett added a comment - I'm on 6.3.14 in Live and it doesnt work whereas my test environment is 6.4.13 and it does!

            Hrant added a comment - - edited

            Thanks Oswaldo,

            Hrant added a comment - - edited Thanks Oswaldo,

            Hi hrant933786460,

            Please see my reply at JRA-44123. The scope of this fix was the jira.permission.comment.user property.

            Regards,

            Oswaldo Hernández.
            JIRA Bugmaster.
            [Atlassian].

            Oswaldo Hernandez (Inactive) added a comment - Hi hrant933786460 , Please see my reply at JRA-44123 . The scope of this fix was the jira.permission.comment.user property. Regards, Oswaldo Hernández. JIRA Bugmaster. [Atlassian] .

            Hrant added a comment -

            Is this truly fixed? and if so it is only fixed for
            jira.permission.comment ?
            Why not fix it for jira.permission.*
            We have the same problem with jira.permission.work
            We set the step to allow or not allow "Work Logging"
            The transition steps include "Work Log"
            It appears that the transition is executed before work log is committed hence causing the failures

            Can you please confirm if this is fixed?
            We are running cloud Jira version 7.2.0-OD-03-014

            Thanks

            Hrant added a comment - Is this truly fixed? and if so it is only fixed for jira.permission.comment ? Why not fix it for jira.permission.* We have the same problem with jira.permission.work We set the step to allow or not allow "Work Logging" The transition steps include "Work Log" It appears that the transition is executed before work log is committed hence causing the failures Can you please confirm if this is fixed? We are running cloud Jira version 7.2.0-OD-03-014 Thanks

            Hi jochen.kypke@emmos.de,

            Unfortunately no, the JIRA Bugfix team only works on the current stable maintenance line for JIRA which at the moment is the JIRA 7.0.x series.

            Consequently, you will need to upgrade to JIRA 7.0.3 (as soon as it is available) or later to obtain this fix. If you need help with your upgrade, you can raise a support request with us at https://support.atlassian.com and we will be happy to assist you with this process.

            Regards,

            Oswaldo Hernández.
            JIRA Bugmaster.
            [Atlassian].

            Oswaldo Hernandez (Inactive) added a comment - Hi jochen.kypke@emmos.de , Unfortunately no, the JIRA Bugfix team only works on the current stable maintenance line for JIRA which at the moment is the JIRA 7.0.x series. Consequently, you will need to upgrade to JIRA 7.0.3 (as soon as it is available) or later to obtain this fix. If you need help with your upgrade, you can raise a support request with us at https://support.atlassian.com and we will be happy to assist you with this process. Regards, Oswaldo Hernández. JIRA Bugmaster. [Atlassian] .

            JK added a comment -

            Could you please provide a fix for Jira 6, too? There may be only a few projects affected, but within these this parameters are fully unusable.

            JK added a comment - Could you please provide a fix for Jira 6, too? There may be only a few projects affected, but within these this parameters are fully unusable.

            Hi obiettivolavoro,

            We will release this fix as part of JIRA Server 7.0.3.

            The fix implemented will allow the user to add the comment during the transition if either the original or or the destination status allow for the comment to be added.

            Regards,

            Oswaldo Hernández.
            JIRA Bugmaster.
            [Atlassian].

            Oswaldo Hernandez (Inactive) added a comment - Hi obiettivolavoro , We will release this fix as part of JIRA Server 7.0.3. The fix implemented will allow the user to add the comment during the transition if either the original or or the destination status allow for the comment to be added. Regards, Oswaldo Hernández. JIRA Bugmaster. [Atlassian] .

            i will suggest developers to think about the possibility to build a parameter in jira to decide how to process the permission check ( at the beginnig for some customers or in the enc for others). This could fix the problem for everyone.

            ITCS Obiettivo Lavoro added a comment - i will suggest developers to think about the possibility to build a parameter in jira to decide how to process the permission check ( at the beginnig for some customers or in the enc for others). This could fix the problem for everyone.

            Should be fixed together with JRA-44123

            Oswaldo Hernandez (Inactive) added a comment - Should be fixed together with JRA-44123

            Even if Add a comment to an issue if one is entered during a transition. is the first post function, I am getting the same error message
            Patrice Förster, you do not have the permission to comment on this issue.

            1. Add a comment to an issue if one is entered during a transition.
            2. Set issue status to the linked status of the destination workflow step.
            3. Assign the issue to the reporter.
            4. Update change history for an issue and store the issue in the database.
            5. Re-index an issue to keep indexes in sync with the database.
            6. Fire a Issue Closed event that can be processed by the listeners.

            Patrice Foerster added a comment - Even if Add a comment to an issue if one is entered during a transition. is the first post function, I am getting the same error message Patrice Förster, you do not have the permission to comment on this issue. Add a comment to an issue if one is entered during a transition. Set issue status to the linked status of the destination workflow step. Assign the issue to the reporter. Update change history for an issue and store the issue in the database. Re-index an issue to keep indexes in sync with the database. Fire a Issue Closed event that can be processed by the listeners.

            Every JIRA transition has the following essential post functions, which are performed in this order:
            Set issue status to the linked status of the destination workflow status.
            Add a comment to an issue if one is entered during a transition.
            Update change history for an issue and store the issue in the database.
            Reindex an issue to keep indices in sync with the database.
            Fire an event that can be processed by the listeners.
            These essential post functions cannot be deleted from a transition or reordered. However, you can insert other (optional) post functions between them.

            These can be reordered by exporting the workflow as XML and uploading it again as an XML with a different name. I am trying some workaround and will post it here if it works.

            Regards,
            Rahul Savaikar

            Rahul Savaikar added a comment - Every JIRA transition has the following essential post functions, which are performed in this order: Set issue status to the linked status of the destination workflow status. Add a comment to an issue if one is entered during a transition. Update change history for an issue and store the issue in the database. Reindex an issue to keep indices in sync with the database. Fire an event that can be processed by the listeners. These essential post functions cannot be deleted from a transition or reordered. However, you can insert other (optional) post functions between them. These can be reordered by exporting the workflow as XML and uploading it again as an XML with a different name. I am trying some workaround and will post it here if it works. Regards, Rahul Savaikar

            If we have the hand on sorting Essential post functions by switching the first item with the second, the comment problem would be solved.

            https://confluence.atlassian.com/display/JIRACLOUD/Advanced+workflow+configuration#Advancedworkflowconfiguration-postfunctions says :

            Every JIRA transition has the following essential post functions, which are performed in this order:

            1. Set issue status to the linked status of the destination workflow status.
            2. Add a comment to an issue if one is entered during a transition.
            3. Update change history for an issue and store the issue in the database.
            4. Reindex an issue to keep indices in sync with the database.
            5. Fire an event that can be processed by the listeners.

            These essential post functions cannot be deleted from a transition or reordered. However, you can insert other (optional) post functions between them.

            It's such a pain we can't reorder theses essential post functions nomore ! please reconsider

            Geoffrey Laparra added a comment - If we have the hand on sorting Essential post functions by switching the first item with the second, the comment problem would be solved. https://confluence.atlassian.com/display/JIRACLOUD/Advanced+workflow+configuration#Advancedworkflowconfiguration-postfunctions says : Every JIRA transition has the following essential post functions, which are performed in this order: Set issue status to the linked status of the destination workflow status. Add a comment to an issue if one is entered during a transition. Update change history for an issue and store the issue in the database. Reindex an issue to keep indices in sync with the database. Fire an event that can be processed by the listeners. These essential post functions cannot be deleted from a transition or reordered . However, you can insert other (optional) post functions between them. It's such a pain we can't reorder theses essential post functions nomore ! please reconsider

            Martin Lindenlaub added a comment - - edited

            Hi there,
            This is critical for us because we planned upgrading to JIRA 6.3.15 next week.
            Background: We are using this workflow property in conjunction with a jelly script to automatically close support issues. In this transaction we provide a comment for the customer.

            @sbrenize, @jsanchez@atlassian.com
            I have already tried moving the comment post function as first in the order but that did not help either.

            We have set jira.permission.comment.denied = true in status Closed.

            1. Add a comment to an issue if one is entered during a transition.
            2. Assign the issue to the reporter.
            3. Set issue status to the linked status of the destination workflow step
            4. ...

            I am still getting

            <username>, you do not have the permission to comment on this issue.

            What things do I have to do if I want to use the Script Runner Plugin to workaround this problem until a final decision has been made including a solution?
            When can you provide an update for this issue?

            Regards

            Martin Lindenlaub added a comment - - edited Hi there, This is critical for us because we planned upgrading to JIRA 6.3.15 next week. Background: We are using this workflow property in conjunction with a jelly script to automatically close support issues. In this transaction we provide a comment for the customer. @ sbrenize , @ jsanchez@atlassian.com I have already tried moving the comment post function as first in the order but that did not help either. We have set jira.permission.comment.denied = true in status Closed . Add a comment to an issue if one is entered during a transition. Assign the issue to the reporter. Set issue status to the linked status of the destination workflow step ... I am still getting <username>, you do not have the permission to comment on this issue. What things do I have to do if I want to use the Script Runner Plugin to workaround this problem until a final decision has been made including a solution? When can you provide an update for this issue? Regards

            Hi guys,
            As a quick workaround you can hide the "Comment" text area using the Behaviours plugin by Jamie Echelin (https://marketplace.atlassian.com/plugins/com.onresolve.jira.plugin.Behaviours)
            which is free. Although you can also get the same functionality by using Script Runner, also by the same author (https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner)
            I'd suggest using the second, since script runner includes behaviours and both plugins don't play well together.

            Regards

            Fernando Ducloux added a comment - Hi guys, As a quick workaround you can hide the "Comment" text area using the Behaviours plugin by Jamie Echelin ( https://marketplace.atlassian.com/plugins/com.onresolve.jira.plugin.Behaviours ) which is free. Although you can also get the same functionality by using Script Runner, also by the same author ( https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner ) I'd suggest using the second, since script runner includes behaviours and both plugins don't play well together. Regards

            brenizes added a comment -

            Jaime,
            Can you simply switch "essential post-functions" 1 and 2 around? That is to say, add the comment to the issue prior to setting the new issue status when processing the transition.

            brenizes added a comment - Jaime, Can you simply switch "essential post-functions" 1 and 2 around? That is to say, add the comment to the issue prior to setting the new issue status when processing the transition.

            Just to throw some light into this issue, this is happening due to our changes on JRA-40310.

            On that issue, we changed the way the validation is done when transitioning an issue. All permission checks are done taking into account the next status for the issue (and not the current one). This is needed for things like assigning the issue on a transition (you want to check that the new assignee can be an assignee for the issue on the final status after the transition).

            This issue will most likely be closed as Won't Fix. Right now, the permission checks are done against the final status of the issue after the transition and that seems to be not ideal for some customers. If we change it back to check the permissions against the initial status in the transition, that would not be ideal for other customers.

            We are having discussions to see if we are willing to change this but, as I said, the current behaviour for this will probably not be changed.

            Regards,

            Jaime.

            Jose Jaime Sanchez (Inactive) added a comment - Just to throw some light into this issue, this is happening due to our changes on JRA-40310 . On that issue, we changed the way the validation is done when transitioning an issue. All permission checks are done taking into account the next status for the issue (and not the current one). This is needed for things like assigning the issue on a transition (you want to check that the new assignee can be an assignee for the issue on the final status after the transition). This issue will most likely be closed as Won't Fix. Right now, the permission checks are done against the final status of the issue after the transition and that seems to be not ideal for some customers. If we change it back to check the permissions against the initial status in the transition, that would not be ideal for other customers. We are having discussions to see if we are willing to change this but, as I said, the current behaviour for this will probably not be changed. Regards, Jaime.

            Just curious if there is any estimate on a date for when the fix for this might be released?

            Scott Crawford added a comment - Just curious if there is any estimate on a date for when the fix for this might be released?

            +1 have any solution here?
            I want hide "comment" field from screen transition.

            Ivan Petrovich added a comment - +1 have any solution here? I want hide "comment" field from screen transition.

            Is there anyway to remove the comment box on a particular close screen?
            this would be a simple workaround..
            thanks

            Fernando Ducloux added a comment - Is there anyway to remove the comment box on a particular close screen? this would be a simple workaround.. thanks

              ohernandez@atlassian.com Oswaldo Hernandez (Inactive)
              dleng Daniel Leng (Inactive)
              Affected customers:
              30 This affects my team
              Watchers:
              46 Start watching this issue

                Created:
                Updated:
                Resolved: