Skip to content

Conversation

Copy link

Copilot AI commented Nov 17, 2025

The inactivity notification flows create duplicate approval records weekly when users don't respond. The flows checked for approved/rejected approvals but skipped pending ones before creating new records.

Changes

Both App and Flow workflows

  • Add List_pending_approvals action: Query admin_archiveapprovals where admin_approvalresponse eq null
  • Add Filter_to_this_one_pending: Filter pending approvals by admin_appname/admin_flowid
  • Add Check_if_pending_approval_exists condition: Gate approval creation on length(pending) == 0
  • Update dependencies: Create_Archival_Request_for_Each now runs after pending list is fetched

Flow logic

Before:
├─ If approved → handle
└─ Else if rejected → handle  
   └─ Else → create new (bug: always creates)

After:
├─ If approved → handle
└─ Else if rejected → handle
   └─ Else if pending exists → skip
      └─ Else → create new

Files modified

  • AdminInactivitynotificationsv2StartApprovalforApps-D740E841-7057-EB11-A812-000D3A9964A5.json
  • AdminInactivitynotificationsv2StartApprovalforFlow-7E68D839-0556-EB11-A812-000D3A996ADC.json
Original prompt

This section details on the original issue you should resolve

<issue_title>[CoE Starter Kit - BUG] ISSUE TITLE</issue_title>
<issue_description>### Does this bug already exist in our backlog?

  • I have checked and confirm this is a new bug.

Describe the issue

Issue Description:

The flow is adding records for stale apps that have not received user approval or rejection. This happens every week in the 'Archival Approval' table. If the user still does not respond, the flow continues to insert duplicate records for the same stale apps into the 'Archival Approval' table.

Image Image

Expected Behavior

No response

What solution are you experiencing the issue with?

Core

What solution version are you using?

3.27.3

What app or flow are you having the issue with?

Admin | Inactivity notifications v2 (Start Approval for Apps)

What method are you using to get inventory and telemetry?

None

Steps To Reproduce

No response

Anything else?

No response</issue_description>

<agent_instructions>Provide the answer of this issue</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix duplicate record insertion in Archival Approval table Prevent duplicate archival approval records for pending requests Nov 17, 2025
Copilot finished work on behalf of mohamrizwa November 17, 2025 05:00
Copilot AI requested a review from mohamrizwa November 17, 2025 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CoE Starter Kit - BUG] ISSUE TITLE

2 participants