Commit 129a0544 authored by Abuhujair Javed's avatar Abuhujair Javed

Jira Fetch Tickets

parent 26404a14
...@@ -10,22 +10,10 @@ import { FetcherService } from '../fetcher.service'; ...@@ -10,22 +10,10 @@ import { FetcherService } from '../fetcher.service';
export class JiraComponent implements OnInit { export class JiraComponent implements OnInit {
id: number; id: number;
name: string; name: string;
/*
to_do: { tid: number; name: string; content: string; }[];
in_prog: { tid: number; name: string; content: string; }[];
done: { tid: number; name: string; content: string; }[];
backlog: { tid: number; name: string; content: string; }[];
*/
constructor(private fetcherService: FetcherService) { constructor(private fetcherService: FetcherService) {
console.log(window.history.state); console.log(window.history.state);
this.id = window.history.state.id; this.id = window.history.state.id;
this.name = window.history.state.name; this.name = window.history.state.name;
/*
this.to_do = TO_DO;
this.in_prog = IN_PROGRESS;
this.done = DONE;
this.backlog = BACKLOG;
*/
} }
calColCount(){ calColCount(){
console.log(window.innerWidth); console.log(window.innerWidth);
...@@ -42,10 +30,6 @@ export class JiraComponent implements OnInit { ...@@ -42,10 +30,6 @@ export class JiraComponent implements OnInit {
let max_issue = Math.max(this.to_do.length,this.in_prog.length,this.done.length,this.backlog.length) let max_issue = Math.max(this.to_do.length,this.in_prog.length,this.done.length,this.backlog.length)
let str = ''; let str = '';
str = '1:'+(max_issue/3); str = '1:'+(max_issue/3);
/*
console.log(max_issue);
console.log(str);
*/
return str; return str;
} }
......
...@@ -16,5 +16,6 @@ urlpatterns = [ ...@@ -16,5 +16,6 @@ urlpatterns = [
path('register/',registerViewSet.as_view()), path('register/',registerViewSet.as_view()),
path('getRepos/',getReposViewSet.as_view()), path('getRepos/',getReposViewSet.as_view()),
path('getGitFiles/',getGitFilesViewSet.as_view()), path('getGitFiles/',getGitFilesViewSet.as_view()),
path('getJiraTickets/',getJiraTicketsViewSet.as_view()),
path('api-auth/',include('rest_framework.urls')) path('api-auth/',include('rest_framework.urls'))
] ]
...@@ -52,6 +52,18 @@ class registerViewSet(views.APIView): ...@@ -52,6 +52,18 @@ class registerViewSet(views.APIView):
except: except:
return Response({'status':False}) return Response({'status':False})
class getJiraTicketsViewSet(views.APIView):
def get(self,request):
pid = request.GET.get('pid')
try:
project = Projects.objects.filter(pid=pid)
if project is None:
return Response({'status':False})
return Response({'files':project.values('jira_id'),'status':True})
except Exception as e:
print(e)
return Response({'status':False})
class getReposViewSet(views.APIView): class getReposViewSet(views.APIView):
def get(self,request): def get(self,request):
uid = request.GET.get('uid') uid = request.GET.get('uid')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment