Project

General

Profile

REDMINE study » History » Version 7

Marc Dexet, 18/01/2018 11:41

1 7 Marc Dexet
{{toc}}
2 7 Marc Dexet
3 1 Marc Dexet
h1. REDMINE study
4 1 Marc Dexet
5 1 Marc Dexet
Ensemble de requêtes SQL
6 1 Marc Dexet
7 1 Marc Dexet
h2. Compréhension de l'usage de REDMINE
8 1 Marc Dexet
9 3 Marc Dexet
Cherchons à comprendre les transitions par tracker
10 1 Marc Dexet
11 3 Marc Dexet
<pre><code class="sql">
12 3 Marc Dexet
select COUNT(*) AS total, trackers.name, old_st.name AS "from_status", new_st.name AS "to_status" 
13 3 Marc Dexet
FROM journals j, journal_details jd, issues, issue_statuses old_st, issue_statuses new_st, trackers
14 3 Marc Dexet
WHERE issues.id =  j.journalized_id
15 3 Marc Dexet
AND j.id = jd.journal_id
16 3 Marc Dexet
AND issues.tracker_id = trackers.id
17 3 Marc Dexet
AND prop_key = 'status_id'
18 3 Marc Dexet
AND old_st.id = old_value::integer AND new_st.id = value::integer
19 3 Marc Dexet
GROUP BY  trackers.name, from_status, to_status ORDER BY name, total DESC;
20 3 Marc Dexet
</code></pre>
21 3 Marc Dexet
22 3 Marc Dexet
h3. Cas Feedback et WaitForValidation
23 3 Marc Dexet
24 3 Marc Dexet
Le statut Feedback est peu utilisé. Il est l'est surtout pour le tracker PRODUCTION (cf. annexe ) 
25 3 Marc Dexet
Le statut WaitForProduction l'est beaucoup plus.
26 3 Marc Dexet
27 3 Marc Dexet
28 3 Marc Dexet
29 1 Marc Dexet
h3. Cas NewDev
30 1 Marc Dexet
31 1 Marc Dexet
<pre><code class="sql">
32 2 Marc Dexet
select COUNT(*) as total, t.name, u.login 
33 2 Marc Dexet
FROM issues i, trackers t, users u 
34 2 Marc Dexet
WHERE i.author_id = u.id AND t.id = i.tracker_id AND t.id = 4 
35 2 Marc Dexet
GROUP BY t.name, login  
36 2 Marc Dexet
ORDER BY total DESC, login;
37 1 Marc Dexet
</code></pre>
38 1 Marc Dexet
39 1 Marc Dexet
<pre>
40 1 Marc Dexet
 total |  name  |  login
41 1 Marc Dexet
-------+--------+----------
42 1 Marc Dexet
    74 | NewDev | kdassas
43 1 Marc Dexet
    60 | NewDev | scaminad
44 1 Marc Dexet
    53 | NewDev | palinger
45 1 Marc Dexet
    30 | NewDev | ccossou
46 1 Marc Dexet
    24 | NewDev | gwang
47 1 Marc Dexet
    20 | NewDev | hballans
48 1 Marc Dexet
    14 | NewDev |
49 1 Marc Dexet
     7 | NewDev | cpidanci
50 1 Marc Dexet
     6 | NewDev | svingata
51 1 Marc Dexet
     5 | NewDev | ebuchlin
52 1 Marc Dexet
     5 | NewDev | esoubrie
53 1 Marc Dexet
     5 | NewDev | mmebsout
54 1 Marc Dexet
     3 | NewDev | bhasnoun
55 1 Marc Dexet
     3 | NewDev | mdexet
56 1 Marc Dexet
     2 | NewDev | ilajili
57 1 Marc Dexet
     1 | NewDev | aarondel
58 1 Marc Dexet
     1 | NewDev | abeelen
59 1 Marc Dexet
     1 | NewDev | cruizdeg
60 1 Marc Dexet
     1 | NewDev | naghanim
61 1 Marc Dexet
62 3 Marc Dexet
</pre>
63 3 Marc Dexet
64 3 Marc Dexet
65 3 Marc Dexet
h2. Annexes
66 3 Marc Dexet
67 3 Marc Dexet
h3. Transitions de status par tracker
68 3 Marc Dexet
69 3 Marc Dexet
<pre>
70 3 Marc Dexet
 total |           name            |      from_status       |       to_status
71 3 Marc Dexet
-------+---------------------------+------------------------+------------------------
72 3 Marc Dexet
   260 | Action                    | New                    | Closed
73 3 Marc Dexet
    43 | Action                    | New                    | In Progress
74 3 Marc Dexet
    34 | Action                    | In Progress            | Closed
75 3 Marc Dexet
    30 | Action                    | New                    | Resolved
76 3 Marc Dexet
    18 | Action                    | Resolved               | Closed
77 3 Marc Dexet
    15 | Action                    | In Progress            | Waiting For Validation
78 3 Marc Dexet
     9 | Action                    | New                    | Waiting For Validation
79 3 Marc Dexet
     8 | Action                    | Waiting For Validation | Closed
80 3 Marc Dexet
     3 | Action                    | In Progress            | Resolved
81 3 Marc Dexet
     3 | Action                    | New                    | Rejected / Cancelled
82 3 Marc Dexet
     2 | Action                    | Waiting For Validation | Resolved
83 3 Marc Dexet
     2 | Action                    | Resolved               | In Progress
84 3 Marc Dexet
     1 | Action                    | Feedback               | Resolved
85 3 Marc Dexet
     1 | Action                    | Waiting For Validation | Rejected / Cancelled
86 3 Marc Dexet
     1 | Action                    | In Progress            | Feedback
87 3 Marc Dexet
     1 | Action                    | Closed                 | In Progress
88 3 Marc Dexet
     1 | Action                    | Rejected / Cancelled   | Closed
89 3 Marc Dexet
     1 | Action                    | Resolved               | Waiting For Validation
90 3 Marc Dexet
     1 | Action                    | New                    | Feedback
91 3 Marc Dexet
     1 | Action                    | Closed                 | Resolved
92 3 Marc Dexet
     1 | Action                    | In Progress            | Rejected / Cancelled
93 3 Marc Dexet
     1 | Action                    | In Progress            | New
94 3 Marc Dexet
    47 | Bug                       | New                    | Closed
95 3 Marc Dexet
    14 | Bug                       | New                    | Waiting For Validation
96 3 Marc Dexet
    13 | Bug                       | New                    | In Progress
97 3 Marc Dexet
    13 | Bug                       | Waiting For Validation | In Progress
98 3 Marc Dexet
     6 | Bug                       | New                    | Rejected / Cancelled
99 3 Marc Dexet
     6 | Bug                       | In Progress            | Waiting For Validation
100 3 Marc Dexet
     5 | Bug                       | Resolved               | Closed
101 3 Marc Dexet
     4 | Bug                       | New                    | Resolved
102 3 Marc Dexet
     3 | Bug                       | In Progress            | Closed
103 3 Marc Dexet
     3 | Bug                       | Waiting For Validation | Closed
104 3 Marc Dexet
     2 | Bug                       | Waiting For Validation | Resolved
105 3 Marc Dexet
     1 | Bug                       | Resolved               | In Progress
106 3 Marc Dexet
     1 | Change request CR         | New                    | In Progress
107 3 Marc Dexet
     1 | Change request CR         | New                    | Feedback
108 3 Marc Dexet
     3 | Configuration             | New                    | Waiting For Validation
109 3 Marc Dexet
     2 | Configuration             | Waiting For Validation | Closed
110 3 Marc Dexet
     1 | Design                    | New                    | Closed
111 3 Marc Dexet
    53 | Documentation             | New                    | In Progress
112 3 Marc Dexet
    47 | Documentation             | New                    | Closed
113 3 Marc Dexet
    46 | Documentation             | In Progress            | Closed
114 3 Marc Dexet
    11 | Documentation             | In Progress            | Waiting For Validation
115 3 Marc Dexet
     9 | Documentation             | Waiting For Validation | In Progress
116 3 Marc Dexet
     4 | Documentation             | New                    | Waiting For Validation
117 3 Marc Dexet
     3 | Documentation             | Waiting For Validation | Resolved
118 3 Marc Dexet
     3 | Documentation             | Waiting For Validation | Closed
119 3 Marc Dexet
     2 | Documentation             | Resolved               | In Progress
120 3 Marc Dexet
     2 | Documentation             | Closed                 | In Progress
121 3 Marc Dexet
     2 | Documentation             | Resolved               | Closed
122 3 Marc Dexet
     1 | Documentation             | In Progress            | Resolved
123 3 Marc Dexet
     1 | Documentation             | New                    | Rejected / Cancelled
124 3 Marc Dexet
    22 | Feature                   | New                    | Closed
125 3 Marc Dexet
    14 | Feature                   | New                    | In Progress
126 3 Marc Dexet
     9 | Feature                   | Resolved               | Closed
127 3 Marc Dexet
     5 | Feature                   | In Progress            | Waiting For Validation
128 3 Marc Dexet
     5 | Feature                   | Waiting For Validation | Resolved
129 3 Marc Dexet
     5 | Feature                   | In Progress            | Resolved
130 3 Marc Dexet
     5 | Feature                   | New                    | Waiting For Validation
131 3 Marc Dexet
     4 | Feature                   | New                    | Resolved
132 3 Marc Dexet
     4 | Feature                   | Waiting For Validation | In Progress
133 3 Marc Dexet
     3 | Feature                   | Resolved               | In Progress
134 3 Marc Dexet
     1 | Feature                   | In Progress            | Closed
135 3 Marc Dexet
     1 | Feature                   | Waiting For Validation | Closed
136 3 Marc Dexet
     1 | Feature                   | New                    | Feedback
137 3 Marc Dexet
    14 | Infrastructure            | New                    | Closed
138 3 Marc Dexet
     7 | Infrastructure            | Resolved               | Closed
139 3 Marc Dexet
     6 | Infrastructure            | New                    | In Progress
140 3 Marc Dexet
     4 | Infrastructure            | In Progress            | Resolved
141 3 Marc Dexet
     3 | Infrastructure            | New                    | Resolved
142 3 Marc Dexet
     2 | Infrastructure            | In Progress            | Closed
143 3 Marc Dexet
     1 | Infrastructure            | New                    | Rejected / Cancelled
144 3 Marc Dexet
     1 | Infrastructure            | In Progress            | Waiting For Validation
145 3 Marc Dexet
     1 | Infrastructure            | Waiting For Validation | Closed
146 3 Marc Dexet
     9 | Meeting                   | New                    | Closed
147 3 Marc Dexet
     4 | Meeting                   | New                    | In Progress
148 3 Marc Dexet
     3 | Meeting                   | In Progress            | Closed
149 3 Marc Dexet
    78 | NewDev                    | New                    | Closed
150 3 Marc Dexet
    54 | NewDev                    | New                    | In Progress
151 3 Marc Dexet
    27 | NewDev                    | Resolved               | Closed
152 3 Marc Dexet
    18 | NewDev                    | In Progress            | Closed
153 3 Marc Dexet
    15 | NewDev                    | In Progress            | Waiting For Validation
154 3 Marc Dexet
    14 | NewDev                    | New                    | Resolved
155 3 Marc Dexet
    13 | NewDev                    | Waiting For Validation | In Progress
156 3 Marc Dexet
    13 | NewDev                    | In Progress            | Resolved
157 3 Marc Dexet
    10 | NewDev                    | New                    | Waiting For Validation
158 3 Marc Dexet
     8 | NewDev                    | New                    | Rejected / Cancelled
159 3 Marc Dexet
     7 | NewDev                    | Waiting For Validation | Closed
160 3 Marc Dexet
     5 | NewDev                    | Waiting For Validation | Resolved
161 3 Marc Dexet
     2 | NewDev                    | Resolved               | Waiting For Validation
162 3 Marc Dexet
     2 | NewDev                    | Resolved               | In Progress
163 3 Marc Dexet
     1 | NewDev                    | Feedback               | Resolved
164 3 Marc Dexet
     1 | NewDev                    | In Progress            | Feedback
165 3 Marc Dexet
     1 | NewDev                    | Waiting For Validation | Rejected / Cancelled
166 3 Marc Dexet
     1 | NewDev                    | New                    | Feedback
167 3 Marc Dexet
     1 | NewDev                    | In Progress            | New
168 3 Marc Dexet
     2 | Non-conformance NC        | Resolved               | Closed
169 3 Marc Dexet
     2 | Non-conformance NC        | In Progress            | Closed
170 3 Marc Dexet
     2 | Non-conformance NC        | New                    | In Progress
171 3 Marc Dexet
     2 | Non-conformance NC        | In Progress            | Waiting For Validation
172 3 Marc Dexet
     1 | Non-conformance NC        | Closed                 | Resolved
173 3 Marc Dexet
     1 | Non-conformance NC        | In Progress            | Resolved
174 3 Marc Dexet
     1 | Non-conformance NC        | Waiting For Validation | Closed
175 3 Marc Dexet
     1 | Non-conformance NC        | New                    | Closed
176 3 Marc Dexet
    21 | Production                | New                    | Closed
177 3 Marc Dexet
     6 | Production                | New                    | Feedback
178 3 Marc Dexet
     5 | Production                | In Progress            | Closed
179 3 Marc Dexet
     4 | Production                | New                    | In Progress
180 3 Marc Dexet
     3 | Production                | Feedback               | Closed
181 3 Marc Dexet
     3 | Production                | Closed                 | In Progress
182 3 Marc Dexet
     2 | Production                | Resolved               | Closed
183 3 Marc Dexet
     2 | Production                | New                    | Resolved
184 3 Marc Dexet
     1 | Production                | New                    | Waiting For Validation
185 3 Marc Dexet
     2 | Request for Deviation RFD | New                    | In Progress
186 3 Marc Dexet
     1 | Request for Deviation RFD | In Progress            | Waiting For Validation
187 3 Marc Dexet
     1 | Request for Deviation RFD | Resolved               | Closed
188 3 Marc Dexet
     1 | Request for Deviation RFD | Waiting For Validation | Closed
189 3 Marc Dexet
     1 | Request for Deviation RFD | In Progress            | Closed
190 3 Marc Dexet
     3 | Support                   | New                    | Waiting For Validation
191 3 Marc Dexet
     3 | Support                   | New                    | Closed
192 3 Marc Dexet
     3 | Support                   | New                    | In Progress
193 3 Marc Dexet
     2 | Support                   | Waiting For Validation | In Progress
194 3 Marc Dexet
     1 | Support                   | Feedback               | Closed
195 3 Marc Dexet
     1 | Support                   | Resolved               | Closed
196 3 Marc Dexet
     1 | Support                   | Waiting For Validation | Closed
197 3 Marc Dexet
     1 | Support                   | In Progress            | Waiting For Validation
198 3 Marc Dexet
    19 | Test                      | New                    | Closed
199 3 Marc Dexet
    10 | Test                      | New                    | In Progress
200 3 Marc Dexet
     9 | Test                      | Resolved               | Closed
201 3 Marc Dexet
     6 | Test                      | In Progress            | Closed
202 3 Marc Dexet
     6 | Test                      | New                    | Resolved
203 3 Marc Dexet
     4 | Test                      | In Progress            | Resolved
204 3 Marc Dexet
     1 | Test                      | Resolved               | Waiting For Validation
205 3 Marc Dexet
     1 | Test                      | New                    | Rejected / Cancelled
206 3 Marc Dexet
     1 | Test                      | Closed                 | In Progress
207 3 Marc Dexet
     1 | Test                      | Waiting For Validation | Closed
208 4 Marc Dexet
</pre>
209 3 Marc Dexet
210 3 Marc Dexet
h3. Cas de Feedback
211 3 Marc Dexet
212 3 Marc Dexet
<pre>
213 3 Marc Dexet
 total |       name        | from_status | to_status
214 3 Marc Dexet
-------+-------------------+-------------+-----------
215 3 Marc Dexet
     1 | Action            | New         | Feedback
216 3 Marc Dexet
     1 | Action            | In Progress | Feedback
217 3 Marc Dexet
     1 | Action            | Feedback    | Resolved
218 3 Marc Dexet
     1 | Change request CR | New         | Feedback
219 3 Marc Dexet
     1 | Feature           | New         | Feedback
220 3 Marc Dexet
     1 | NewDev            | New         | Feedback
221 3 Marc Dexet
     1 | NewDev            | Feedback    | Resolved
222 3 Marc Dexet
     1 | NewDev            | In Progress | Feedback
223 3 Marc Dexet
     6 | Production        | New         | Feedback
224 3 Marc Dexet
     3 | Production        | Feedback    | Closed
225 3 Marc Dexet
     1 | Support           | Feedback    | Closed
226 1 Marc Dexet
227 4 Marc Dexet
228 1 Marc Dexet
</pre>
229 5 Marc Dexet
230 5 Marc Dexet
h3. Répartition des trackers par usage (en pourcentage)
231 5 Marc Dexet
232 5 Marc Dexet
<pre>
233 5 Marc Dexet
redmine_default=# select count(t.name)*100 / ( SELECT count(*) from issues i ) AS total, t.name from issues i, trackers t where i.tracker_id = t.id GROUP BY name ORDER BY total DESC;
234 5 Marc Dexet
 total |           name
235 5 Marc Dexet
-------+---------------------------
236 5 Marc Dexet
    41 | Action
237 5 Marc Dexet
    20 | NewDev
238 5 Marc Dexet
    10 | Documentation
239 5 Marc Dexet
     7 | Bug
240 5 Marc Dexet
     4 | Production
241 5 Marc Dexet
     4 | Feature
242 5 Marc Dexet
     3 | Test
243 5 Marc Dexet
     2 | Infrastructure
244 5 Marc Dexet
     1 | Meeting
245 5 Marc Dexet
     1 | Support
246 5 Marc Dexet
     0 | Configuration
247 5 Marc Dexet
     0 | Change request CR
248 5 Marc Dexet
     0 | Request for Deviation RFD
249 5 Marc Dexet
     0 | Non-conformance NC
250 5 Marc Dexet
     0 | Design
251 5 Marc Dexet
252 5 Marc Dexet
</pre>
253 6 Marc Dexet
254 6 Marc Dexet
h3. Voir les permissions associées à un rôle.
255 6 Marc Dexet
256 6 Marc Dexet
Les permissions sont dénormalisées, elles sont stockées dans un champs texte selon un format de clefs ruby
257 6 Marc Dexet
258 6 Marc Dexet
<pre><code class="sql">
259 6 Marc Dexet
select roles.name, roles.permissions from roles where name = 'Admin' OR name = 'Manager';
260 6 Marc Dexet
</code></pre>
261 6 Marc Dexet
262 6 Marc Dexet
<pre>
263 6 Marc Dexet
  name   |             permissions
264 6 Marc Dexet
---------+-------------------------------------
265 6 Marc Dexet
 Admin   | ---                                +
266 6 Marc Dexet
         | - :add_project                     +
267 6 Marc Dexet
         | - :edit_project                    +
268 6 Marc Dexet
...
269 6 Marc Dexet
</pre>