• Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Low Low
    • None
    • 4.0.0, 4.0.2, 4.1.0
    • Automation
    • None

      Problem Definition

      1. JSDSERVER-3232 has been fixed on JSD version 3.1.2.
      2. On JSD 4 and above, we are seeing similar log messages in the log file:
        2019-04-04 03:53:06,880 SdOffThreadEventJobRunner:thread-3681 ERROR abc@abc.com xxx /rest/api/2/issue/ABC-100/transitions [c.a.s.p.a.modules.rulewhen.ServiceDeskCommentCreatedEventWhenHandler] isApplicableProject failed
        com.atlassian.servicedesk.api.BadRequestException: Error retrieving ProjectContext, project '12200' does not exist
        

      Suggested Solution

      The suggestion would be to delete the automation rules during the JSD project deletion; JSDSERVER-6324.

      Workaround

      The workaround consists in disabling directly in the database all the automation rules which are associated to projects which no longer exist. The steps are the following:

      • Stop JIRA
      • Backup the JIRA database
      • Run the following query in the JIRA database
        Note that this query was tested on a PostgreSQL database and that it might need to be slightly changed depending on the database type
         update "AO_9B2E3B_RULE" set "ENABLED"='false' where "ID" in ( select r."ID" 
         from "AO_9B2E3B_RSETREV_PROJ_CONTEXT" pc
         left join "AO_9B2E3B_RULESET_REVISION" rr on pc."RULESET_REVISION_ID" = rr."ID"
         left join "AO_9B2E3B_RULE" r on rr."ID" = r."RULESET_REVISION_ID"
         left join "AO_9B2E3B_WHEN_HANDLER_CONFIG" whc on r."ID" = whc."RULE_ID"
         where pc."PROJECT_ID" not in (select id from project)); 
        
      • Start JIRA

            [JSDSERVER-6341] This is a regression bug of JSDSERVER-3232

            Moga made changes -
            Remote Link Original: This issue links to "JSDS-3966 (Bulldog)" [ 421053 ] New: This issue links to "JSMDC-3966 (JIRA Server (Bulldog))" [ 421053 ]
            Lachlan G (Inactive) made changes -
            Link New: This issue duplicates JSDSERVER-6324 [ JSDSERVER-6324 ]
            Lachlan G (Inactive) made changes -
            Resolution New: Duplicate [ 3 ]
            Status Original: Needs Triage [ 10030 ] New: Closed [ 6 ]

            Lachlan G (Inactive) added a comment - Duplicate of https://jira.atlassian.com/browse/JSDSERVER-6324
            Elton Santos made changes -
            Remote Link New: This issue links to "JSDS-3966 (Bulldog)" [ 421053 ]
            Bugfix Automation Bot made changes -
            Support reference count New: 1
            Moga made changes -
            Affects Version/s New: 4.1.0 [ 85506 ]
            Affects Version/s New: 4.0.2 [ 85505 ]
            Moga made changes -
            Description Original: JSDSERVER-3232 has been fixed on JSD version 3.1.2.

            On JSD 4 and above, we are seeing similar log messages in the log file:
            {noformat}
            2019-04-04 03:53:06,880 SdOffThreadEventJobRunner:thread-3681 ERROR abc@abc.com xxx /rest/api/2/issue/ABC-100/transitions [c.a.s.p.a.modules.rulewhen.ServiceDeskCommentCreatedEventWhenHandler] isApplicableProject failed
            com.atlassian.servicedesk.api.BadRequestException: Error retrieving ProjectContext, project '12200' does not exist
            {noformat}
            New: h3. Problem Definition
            # JSDSERVER-3232 has been fixed on JSD version 3.1.2.
            # On JSD 4 and above, we are seeing similar log messages in the log file:
            {noformat}
            2019-04-04 03:53:06,880 SdOffThreadEventJobRunner:thread-3681 ERROR abc@abc.com xxx /rest/api/2/issue/ABC-100/transitions [c.a.s.p.a.modules.rulewhen.ServiceDeskCommentCreatedEventWhenHandler] isApplicableProject failed
            com.atlassian.servicedesk.api.BadRequestException: Error retrieving ProjectContext, project '12200' does not exist
            {noformat}

            h3. Suggested Solution
            The suggestion would be to delete the automation rules during the JSD project deletion; JSDSERVER-6324.
             
            h3. Workaround
            The workaround consists in disabling directly in the database all the automation rules which are associated to projects which no longer exist. The steps are the following:
            - Stop JIRA
            - Backup the JIRA database
            - Run the following query in the JIRA database
            (!) Note that this query was tested on a PostgreSQL database and that it might need to be slightly changed depending on the database type
            {code}
             update "AO_9B2E3B_RULE" set "ENABLED"='false' where "ID" in ( select r."ID"
             from "AO_9B2E3B_RSETREV_PROJ_CONTEXT" pc
             left join "AO_9B2E3B_RULESET_REVISION" rr on pc."RULESET_REVISION_ID" = rr."ID"
             left join "AO_9B2E3B_RULE" r on rr."ID" = r."RULESET_REVISION_ID"
             left join "AO_9B2E3B_WHEN_HANDLER_CONFIG" whc on r."ID" = whc."RULE_ID"
             where pc."PROJECT_ID" not in (select id from project));
            {code}
            - Start JIRA
            Moga made changes -
            Link New: This issue relates to JSDSERVER-6324 [ JSDSERVER-6324 ]
            Moga made changes -
            Link New: This issue is a regression of JSDSERVER-3232 [ JSDSERVER-3232 ]

              Unassigned Unassigned
              mmuthusamy Moga
              Affected customers:
              0 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: