Project

General

Profile

REDMINE study » History » Version 10

Marc Dexet, 18/01/2018 11:46

1 1 Marc Dexet
h1. REDMINE study
2 8 Marc Dexet
3 8 Marc Dexet
{{toc}}
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 10 Marc Dexet
h3. Cas du DocumentValidator
28 3 Marc Dexet
29 10 Marc Dexet
Très peu utilisé, 3 vraies occurences.
30 10 Marc Dexet
31 10 Marc Dexet
<pre>
32 10 Marc Dexet
       projet        |          role           | firstname |     lastname
33 10 Marc Dexet
---------------------+-------------------------+-----------+------------------
34 10 Marc Dexet
 Common à sable      | Documentation Validator | Herve     | Ballans (U-PSUD)
35 10 Marc Dexet
 Direction technique | Documentation Validator | Sandrine  | Couturier
36 10 Marc Dexet
 Helioviewer         | Documentation Validator | Eric      | Buchlin
37 10 Marc Dexet
 Pixie               | Documentation Validator | Anne      | Philippon
38 10 Marc Dexet
(4 rows)
39 10 Marc Dexet
40 10 Marc Dexet
</pre>
41 3 Marc Dexet
42 1 Marc Dexet
h3. Cas NewDev
43 1 Marc Dexet
44 1 Marc Dexet
<pre><code class="sql">
45 2 Marc Dexet
select COUNT(*) as total, t.name, u.login 
46 2 Marc Dexet
FROM issues i, trackers t, users u 
47 2 Marc Dexet
WHERE i.author_id = u.id AND t.id = i.tracker_id AND t.id = 4 
48 2 Marc Dexet
GROUP BY t.name, login  
49 2 Marc Dexet
ORDER BY total DESC, login;
50 1 Marc Dexet
</code></pre>
51 1 Marc Dexet
52 1 Marc Dexet
<pre>
53 1 Marc Dexet
 total |  name  |  login
54 1 Marc Dexet
-------+--------+----------
55 1 Marc Dexet
    74 | NewDev | kdassas
56 1 Marc Dexet
    60 | NewDev | scaminad
57 1 Marc Dexet
    53 | NewDev | palinger
58 1 Marc Dexet
    30 | NewDev | ccossou
59 1 Marc Dexet
    24 | NewDev | gwang
60 1 Marc Dexet
    20 | NewDev | hballans
61 1 Marc Dexet
    14 | NewDev |
62 1 Marc Dexet
     7 | NewDev | cpidanci
63 1 Marc Dexet
     6 | NewDev | svingata
64 1 Marc Dexet
     5 | NewDev | ebuchlin
65 1 Marc Dexet
     5 | NewDev | esoubrie
66 1 Marc Dexet
     5 | NewDev | mmebsout
67 1 Marc Dexet
     3 | NewDev | bhasnoun
68 1 Marc Dexet
     3 | NewDev | mdexet
69 1 Marc Dexet
     2 | NewDev | ilajili
70 1 Marc Dexet
     1 | NewDev | aarondel
71 1 Marc Dexet
     1 | NewDev | abeelen
72 1 Marc Dexet
     1 | NewDev | cruizdeg
73 1 Marc Dexet
     1 | NewDev | naghanim
74 1 Marc Dexet
75 3 Marc Dexet
</pre>
76 3 Marc Dexet
77 3 Marc Dexet
78 3 Marc Dexet
h2. Annexes
79 3 Marc Dexet
80 3 Marc Dexet
h3. Transitions de status par tracker
81 3 Marc Dexet
82 3 Marc Dexet
<pre>
83 3 Marc Dexet
 total |           name            |      from_status       |       to_status
84 3 Marc Dexet
-------+---------------------------+------------------------+------------------------
85 3 Marc Dexet
   260 | Action                    | New                    | Closed
86 3 Marc Dexet
    43 | Action                    | New                    | In Progress
87 3 Marc Dexet
    34 | Action                    | In Progress            | Closed
88 3 Marc Dexet
    30 | Action                    | New                    | Resolved
89 3 Marc Dexet
    18 | Action                    | Resolved               | Closed
90 3 Marc Dexet
    15 | Action                    | In Progress            | Waiting For Validation
91 3 Marc Dexet
     9 | Action                    | New                    | Waiting For Validation
92 3 Marc Dexet
     8 | Action                    | Waiting For Validation | Closed
93 3 Marc Dexet
     3 | Action                    | In Progress            | Resolved
94 3 Marc Dexet
     3 | Action                    | New                    | Rejected / Cancelled
95 3 Marc Dexet
     2 | Action                    | Waiting For Validation | Resolved
96 3 Marc Dexet
     2 | Action                    | Resolved               | In Progress
97 3 Marc Dexet
     1 | Action                    | Feedback               | Resolved
98 3 Marc Dexet
     1 | Action                    | Waiting For Validation | Rejected / Cancelled
99 3 Marc Dexet
     1 | Action                    | In Progress            | Feedback
100 3 Marc Dexet
     1 | Action                    | Closed                 | In Progress
101 3 Marc Dexet
     1 | Action                    | Rejected / Cancelled   | Closed
102 3 Marc Dexet
     1 | Action                    | Resolved               | Waiting For Validation
103 3 Marc Dexet
     1 | Action                    | New                    | Feedback
104 3 Marc Dexet
     1 | Action                    | Closed                 | Resolved
105 3 Marc Dexet
     1 | Action                    | In Progress            | Rejected / Cancelled
106 3 Marc Dexet
     1 | Action                    | In Progress            | New
107 3 Marc Dexet
    47 | Bug                       | New                    | Closed
108 3 Marc Dexet
    14 | Bug                       | New                    | Waiting For Validation
109 3 Marc Dexet
    13 | Bug                       | New                    | In Progress
110 3 Marc Dexet
    13 | Bug                       | Waiting For Validation | In Progress
111 3 Marc Dexet
     6 | Bug                       | New                    | Rejected / Cancelled
112 3 Marc Dexet
     6 | Bug                       | In Progress            | Waiting For Validation
113 3 Marc Dexet
     5 | Bug                       | Resolved               | Closed
114 3 Marc Dexet
     4 | Bug                       | New                    | Resolved
115 3 Marc Dexet
     3 | Bug                       | In Progress            | Closed
116 3 Marc Dexet
     3 | Bug                       | Waiting For Validation | Closed
117 3 Marc Dexet
     2 | Bug                       | Waiting For Validation | Resolved
118 3 Marc Dexet
     1 | Bug                       | Resolved               | In Progress
119 3 Marc Dexet
     1 | Change request CR         | New                    | In Progress
120 3 Marc Dexet
     1 | Change request CR         | New                    | Feedback
121 3 Marc Dexet
     3 | Configuration             | New                    | Waiting For Validation
122 3 Marc Dexet
     2 | Configuration             | Waiting For Validation | Closed
123 3 Marc Dexet
     1 | Design                    | New                    | Closed
124 3 Marc Dexet
    53 | Documentation             | New                    | In Progress
125 3 Marc Dexet
    47 | Documentation             | New                    | Closed
126 3 Marc Dexet
    46 | Documentation             | In Progress            | Closed
127 3 Marc Dexet
    11 | Documentation             | In Progress            | Waiting For Validation
128 3 Marc Dexet
     9 | Documentation             | Waiting For Validation | In Progress
129 3 Marc Dexet
     4 | Documentation             | New                    | Waiting For Validation
130 3 Marc Dexet
     3 | Documentation             | Waiting For Validation | Resolved
131 3 Marc Dexet
     3 | Documentation             | Waiting For Validation | Closed
132 3 Marc Dexet
     2 | Documentation             | Resolved               | In Progress
133 3 Marc Dexet
     2 | Documentation             | Closed                 | In Progress
134 3 Marc Dexet
     2 | Documentation             | Resolved               | Closed
135 3 Marc Dexet
     1 | Documentation             | In Progress            | Resolved
136 3 Marc Dexet
     1 | Documentation             | New                    | Rejected / Cancelled
137 3 Marc Dexet
    22 | Feature                   | New                    | Closed
138 3 Marc Dexet
    14 | Feature                   | New                    | In Progress
139 3 Marc Dexet
     9 | Feature                   | Resolved               | Closed
140 3 Marc Dexet
     5 | Feature                   | In Progress            | Waiting For Validation
141 3 Marc Dexet
     5 | Feature                   | Waiting For Validation | Resolved
142 3 Marc Dexet
     5 | Feature                   | In Progress            | Resolved
143 3 Marc Dexet
     5 | Feature                   | New                    | Waiting For Validation
144 3 Marc Dexet
     4 | Feature                   | New                    | Resolved
145 3 Marc Dexet
     4 | Feature                   | Waiting For Validation | In Progress
146 3 Marc Dexet
     3 | Feature                   | Resolved               | In Progress
147 3 Marc Dexet
     1 | Feature                   | In Progress            | Closed
148 3 Marc Dexet
     1 | Feature                   | Waiting For Validation | Closed
149 3 Marc Dexet
     1 | Feature                   | New                    | Feedback
150 3 Marc Dexet
    14 | Infrastructure            | New                    | Closed
151 3 Marc Dexet
     7 | Infrastructure            | Resolved               | Closed
152 3 Marc Dexet
     6 | Infrastructure            | New                    | In Progress
153 3 Marc Dexet
     4 | Infrastructure            | In Progress            | Resolved
154 3 Marc Dexet
     3 | Infrastructure            | New                    | Resolved
155 3 Marc Dexet
     2 | Infrastructure            | In Progress            | Closed
156 3 Marc Dexet
     1 | Infrastructure            | New                    | Rejected / Cancelled
157 3 Marc Dexet
     1 | Infrastructure            | In Progress            | Waiting For Validation
158 3 Marc Dexet
     1 | Infrastructure            | Waiting For Validation | Closed
159 3 Marc Dexet
     9 | Meeting                   | New                    | Closed
160 3 Marc Dexet
     4 | Meeting                   | New                    | In Progress
161 3 Marc Dexet
     3 | Meeting                   | In Progress            | Closed
162 3 Marc Dexet
    78 | NewDev                    | New                    | Closed
163 3 Marc Dexet
    54 | NewDev                    | New                    | In Progress
164 3 Marc Dexet
    27 | NewDev                    | Resolved               | Closed
165 3 Marc Dexet
    18 | NewDev                    | In Progress            | Closed
166 3 Marc Dexet
    15 | NewDev                    | In Progress            | Waiting For Validation
167 3 Marc Dexet
    14 | NewDev                    | New                    | Resolved
168 3 Marc Dexet
    13 | NewDev                    | Waiting For Validation | In Progress
169 3 Marc Dexet
    13 | NewDev                    | In Progress            | Resolved
170 3 Marc Dexet
    10 | NewDev                    | New                    | Waiting For Validation
171 3 Marc Dexet
     8 | NewDev                    | New                    | Rejected / Cancelled
172 3 Marc Dexet
     7 | NewDev                    | Waiting For Validation | Closed
173 3 Marc Dexet
     5 | NewDev                    | Waiting For Validation | Resolved
174 3 Marc Dexet
     2 | NewDev                    | Resolved               | Waiting For Validation
175 3 Marc Dexet
     2 | NewDev                    | Resolved               | In Progress
176 3 Marc Dexet
     1 | NewDev                    | Feedback               | Resolved
177 3 Marc Dexet
     1 | NewDev                    | In Progress            | Feedback
178 3 Marc Dexet
     1 | NewDev                    | Waiting For Validation | Rejected / Cancelled
179 3 Marc Dexet
     1 | NewDev                    | New                    | Feedback
180 3 Marc Dexet
     1 | NewDev                    | In Progress            | New
181 3 Marc Dexet
     2 | Non-conformance NC        | Resolved               | Closed
182 3 Marc Dexet
     2 | Non-conformance NC        | In Progress            | Closed
183 3 Marc Dexet
     2 | Non-conformance NC        | New                    | In Progress
184 3 Marc Dexet
     2 | Non-conformance NC        | In Progress            | Waiting For Validation
185 3 Marc Dexet
     1 | Non-conformance NC        | Closed                 | Resolved
186 3 Marc Dexet
     1 | Non-conformance NC        | In Progress            | Resolved
187 3 Marc Dexet
     1 | Non-conformance NC        | Waiting For Validation | Closed
188 3 Marc Dexet
     1 | Non-conformance NC        | New                    | Closed
189 3 Marc Dexet
    21 | Production                | New                    | Closed
190 3 Marc Dexet
     6 | Production                | New                    | Feedback
191 3 Marc Dexet
     5 | Production                | In Progress            | Closed
192 3 Marc Dexet
     4 | Production                | New                    | In Progress
193 3 Marc Dexet
     3 | Production                | Feedback               | Closed
194 3 Marc Dexet
     3 | Production                | Closed                 | In Progress
195 3 Marc Dexet
     2 | Production                | Resolved               | Closed
196 3 Marc Dexet
     2 | Production                | New                    | Resolved
197 3 Marc Dexet
     1 | Production                | New                    | Waiting For Validation
198 3 Marc Dexet
     2 | Request for Deviation RFD | New                    | In Progress
199 3 Marc Dexet
     1 | Request for Deviation RFD | In Progress            | Waiting For Validation
200 3 Marc Dexet
     1 | Request for Deviation RFD | Resolved               | Closed
201 3 Marc Dexet
     1 | Request for Deviation RFD | Waiting For Validation | Closed
202 3 Marc Dexet
     1 | Request for Deviation RFD | In Progress            | Closed
203 3 Marc Dexet
     3 | Support                   | New                    | Waiting For Validation
204 3 Marc Dexet
     3 | Support                   | New                    | Closed
205 3 Marc Dexet
     3 | Support                   | New                    | In Progress
206 3 Marc Dexet
     2 | Support                   | Waiting For Validation | In Progress
207 3 Marc Dexet
     1 | Support                   | Feedback               | Closed
208 3 Marc Dexet
     1 | Support                   | Resolved               | Closed
209 3 Marc Dexet
     1 | Support                   | Waiting For Validation | Closed
210 3 Marc Dexet
     1 | Support                   | In Progress            | Waiting For Validation
211 3 Marc Dexet
    19 | Test                      | New                    | Closed
212 3 Marc Dexet
    10 | Test                      | New                    | In Progress
213 3 Marc Dexet
     9 | Test                      | Resolved               | Closed
214 3 Marc Dexet
     6 | Test                      | In Progress            | Closed
215 3 Marc Dexet
     6 | Test                      | New                    | Resolved
216 3 Marc Dexet
     4 | Test                      | In Progress            | Resolved
217 3 Marc Dexet
     1 | Test                      | Resolved               | Waiting For Validation
218 3 Marc Dexet
     1 | Test                      | New                    | Rejected / Cancelled
219 3 Marc Dexet
     1 | Test                      | Closed                 | In Progress
220 3 Marc Dexet
     1 | Test                      | Waiting For Validation | Closed
221 4 Marc Dexet
</pre>
222 3 Marc Dexet
223 3 Marc Dexet
h3. Cas de Feedback
224 3 Marc Dexet
225 3 Marc Dexet
<pre>
226 3 Marc Dexet
 total |       name        | from_status | to_status
227 3 Marc Dexet
-------+-------------------+-------------+-----------
228 3 Marc Dexet
     1 | Action            | New         | Feedback
229 3 Marc Dexet
     1 | Action            | In Progress | Feedback
230 3 Marc Dexet
     1 | Action            | Feedback    | Resolved
231 3 Marc Dexet
     1 | Change request CR | New         | Feedback
232 3 Marc Dexet
     1 | Feature           | New         | Feedback
233 3 Marc Dexet
     1 | NewDev            | New         | Feedback
234 3 Marc Dexet
     1 | NewDev            | Feedback    | Resolved
235 3 Marc Dexet
     1 | NewDev            | In Progress | Feedback
236 3 Marc Dexet
     6 | Production        | New         | Feedback
237 3 Marc Dexet
     3 | Production        | Feedback    | Closed
238 3 Marc Dexet
     1 | Support           | Feedback    | Closed
239 1 Marc Dexet
240 4 Marc Dexet
241 1 Marc Dexet
</pre>
242 5 Marc Dexet
243 5 Marc Dexet
h3. Répartition des trackers par usage (en pourcentage)
244 5 Marc Dexet
245 5 Marc Dexet
<pre>
246 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;
247 5 Marc Dexet
 total |           name
248 5 Marc Dexet
-------+---------------------------
249 5 Marc Dexet
    41 | Action
250 5 Marc Dexet
    20 | NewDev
251 5 Marc Dexet
    10 | Documentation
252 5 Marc Dexet
     7 | Bug
253 5 Marc Dexet
     4 | Production
254 5 Marc Dexet
     4 | Feature
255 5 Marc Dexet
     3 | Test
256 5 Marc Dexet
     2 | Infrastructure
257 5 Marc Dexet
     1 | Meeting
258 5 Marc Dexet
     1 | Support
259 5 Marc Dexet
     0 | Configuration
260 5 Marc Dexet
     0 | Change request CR
261 5 Marc Dexet
     0 | Request for Deviation RFD
262 5 Marc Dexet
     0 | Non-conformance NC
263 5 Marc Dexet
     0 | Design
264 5 Marc Dexet
265 5 Marc Dexet
</pre>
266 6 Marc Dexet
267 6 Marc Dexet
h3. Voir les permissions associées à un rôle.
268 6 Marc Dexet
269 6 Marc Dexet
Les permissions sont dénormalisées, elles sont stockées dans un champs texte selon un format de clefs ruby
270 6 Marc Dexet
271 6 Marc Dexet
<pre><code class="sql">
272 6 Marc Dexet
select roles.name, roles.permissions from roles where name = 'Admin' OR name = 'Manager';
273 6 Marc Dexet
</code></pre>
274 6 Marc Dexet
275 6 Marc Dexet
<pre>
276 6 Marc Dexet
  name   |             permissions
277 6 Marc Dexet
---------+-------------------------------------
278 6 Marc Dexet
 Admin   | ---                                +
279 6 Marc Dexet
         | - :add_project                     +
280 6 Marc Dexet
         | - :edit_project                    +
281 6 Marc Dexet
...
282 6 Marc Dexet
</pre>
283 9 Marc Dexet
284 9 Marc Dexet
h3. Liste des rôles, des utilisateurs par projet
285 9 Marc Dexet
286 9 Marc Dexet
<pre><code class="sql">
287 9 Marc Dexet
 SELECT projects.name as projet, roles.name as role, users.firstname, users.lastname
288 9 Marc Dexet
FROM users, members, projects, member_roles, roles
289 9 Marc Dexet
WHERE members.user_id = users.id
290 9 Marc Dexet
AND members.project_id = projects.id
291 9 Marc Dexet
AND members.id = member_roles.member_id
292 9 Marc Dexet
AND roles.id = member_roles.role_id
293 9 Marc Dexet
AND users.status=1
294 9 Marc Dexet
ORDER BY projects.name;
295 9 Marc Dexet
</code></pre>
296 9 Marc Dexet
297 9 Marc Dexet
<pre>
298 9 Marc Dexet
                            projet                            |          role           |    firstname    |         lastname
299 9 Marc Dexet
--------------------------------------------------------------+-------------------------+-----------------+--------------------------
300 9 Marc Dexet
 A2IMP                                                        | Developer               | David           | Delavennat
301 9 Marc Dexet
 A2IMP                                                        | Manager                 | Herve           | Ballans
302 9 Marc Dexet
...
303 9 Marc Dexet
</pre>