#189 Added feature to show number of newcomers per interest
Merged 4 years ago by hhlp. Opened 4 years ago by sash713.
fedora-join/ sash713/Fedora-Join master  into  master

@@ -41,5 +41,6 @@ 

      * Number of new comers in queue  

      * Number of successfully joined newcomers  

      * Number of unsuccessful joined newcomers  

-     * User ID, Progress Check, Interests (for each ticket where newcomer has declared his/her interests)  

+     * User ID, Progress Check, Interests (for each ticket where newcomer has declared his/her interests) 

+     * A list of all claimed interests and the number of newcomers per interest  

    

\ No newline at end of file

file modified
+13 -1
@@ -146,6 +146,7 @@ 

  

          f.write("\n"+"-x-"*50+"\n\n")

  

+         interest_counter = {}

          for i in range(len(self.issues)):

  

              try:
@@ -154,7 +155,12 @@ 

                  interest_dict[newcomer] = [[],["None"]]

                  for x in tag_lst:

                      if "I:" in x:

-                         interest_dict[newcomer][0].append(x.replace('I: ', ''))

+                         interest = x.replace('I: ', '')

+                         interest_dict[newcomer][0].append(interest)

+                         if interest in interest_counter:

+                             interest_counter[interest] += 1

+                         else :

+                             interest_counter[interest] = 1

                      if "C: Progress check" in x:

                          interest_dict[newcomer][1] = [(x.replace('C: ', ''))]

  
@@ -171,6 +177,12 @@ 

              for j in interest_dict[i][0]:

                  line += j+"  "

              f.write(line+"\n\n")

+ 

+         f.write("\n\nA summary of number of tickets by the interest tags:\n\n")

+ 

+         for i in interest_counter:

+             f.write(i+" : "+str(interest_counter[i])+"\n")

+ 

          f.close()

  

  

I have added a new feature to display all the interests that newcomers have claimed as well as the number of newcomers per interest. This will be displayed in the generated report file.

example :-

A summary of number of tickets by the interest tags:

Infrastructure : 4
Web sites : 2
Packaging : 3
Documentation-Writing : 2
Development : 4
QA : 4
Science : 1
App development : 2
Android : 1
Translation : 1

as shown in this issue : https://pagure.io/fedora-join/Fedora-Join/issue/184

What do you think ?

Pull-Request has been merged by hhlp

4 years ago