Skip to content

Commit 5ec2275

Browse files
check problematic archived demandes
1 parent d446864 commit 5ec2275

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
demande_id,form,state,diagnostic
2+
41064,api-impot-particulier-sandbox,draft,BROUILLON JAMAIS SOUMIS
3+
48428,api-impot-particulier-sandbox,draft,BROUILLON JAMAIS SOUMIS
4+
49034,api-impot-particulier-sandbox,draft,BROUILLON JAMAIS SOUMIS
5+
49071,api-impot-particulier-sandbox,draft,BROUILLON JAMAIS SOUMIS
6+
51506,api-entreprise,validated,PAS DE LA DGFIP
7+
53071,hubee-cert-dc,validated,PAS DE LA DGFIP
8+
53782,api-impot-particulier-production,draft,PROBLEM REEL
9+
57086,api-pro-sante-connect,validated,PAS DE LA DGFIP
10+
57862,hubee-dila,validated,PAS DE LA DGFIP
11+
59839,hubee-cert-dc,validated,PAS DE LA DGFIP
12+
59988,france-connect,archived,PAS DE LA DGFIP
13+
60470,api-particulier-arpege-concerto,changes_requested,PAS DE LA DGFIP
14+
60471,api-entreprise-editeur,changes_requested,PAS DE LA DGFIP
15+
60581,api-captchetat,validated,PAS DE LA DGFIP
16+
60599,hubee-cert-dc,validated,PAS DE LA DGFIP
17+
63921,france-connect,validated,PAS DE LA DGFIP
18+
64142,api-r2p-production-editeur,draft,BROUILLON JAMAIS SOUMIS
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
problem_ids = [41064,48428,49034,49071,51506,53071,53782,57086,57862,59839,59988,60470,60471,60581,60599,63921,64142]
2+
3+
dgfip_authorizations_definitions = AuthorizationDefinition.all.select { |definition| definition.provider.id == 'dgfip' }
4+
dgfip_authorizations_types = dgfip_authorizations_definitions.map { |definition| definition.authorization_request_class.to_s }
5+
6+
7+
diagnostics = problem_ids.map do |problem_id|
8+
demande = AuthorizationRequest.find(problem_id)
9+
10+
diagnostic = ""
11+
12+
if dgfip_authorizations_types.include?(demande.type.to_s)
13+
if demande.events.where(name: 'submit').any?
14+
diagnostic = "PROBLEM REEL"
15+
else
16+
diagnostic = "BROUILLON JAMAIS SOUMIS"
17+
end
18+
else
19+
diagnostic = "PAS DE LA DGFIP"
20+
end
21+
22+
[demande.id, demande.form_uid, demande.state, diagnostic]
23+
end
24+
25+
puts diagnostics.map{|d| d.join(',')}.join("\n")

0 commit comments

Comments
 (0)