Detailed Notes
Part III of the creation of reports. We move to result sets based on the report and parameters form a single URL.
You can view source for today and all prior days by reviewing the tag Day 47 at this GitHub: https://github.com/robbroadhead/develpreneur-pythontutorial
Transcript Text
[Music] well hello and welcome back we are hopefully wrapping up our reports today that's our goal uh the first thing i want to do is let's fix the look of the task by status i've been playing around with a little bit so this is a little different from the last time you saw it essentially if you look at tasks or general task lists we've got some stuff here uh we're full line we're got a button and this stuff doesn't really make as much sense when we're not when this is a report so what we're going to do here is we're not going to from a report be able to jump in so this go page on click we're not going to worry about that anymore which means because this isn't an interactive report we don't need to worry about the ids at all and actually what we want to do for here is we're going to turn this into a table because it's going to be a little easier for us to deal with it that way so what we're going to do is we're going to come swing through here blah blah blah there we go so there's our table first thing we'll do is we're going to create some headers so we're going to have a header row that's going to be let's call it uh it's gonna be the time frame we're also gonna have and this is gonna make stuff just a little bit easier for us to deal with so we're gonna do a time frame a name a due date ah let's do status let's do status and then due date status we'll go ahead and do time spent and then due date so now we can take all of these and we're going to shrink these down a little bit so then all we need to do is for each one we're going to create a row get rid of our divs and this is going to be a detail so td now we could do some more interesting things with these but we're not going to at this point we may come back and sort of like some advanced stuff and look at some ways to play around with tables and why this may make a lot of sense for us particularly from reports and just sort of a spoiler alert what we can do is we're going to be able to do things like use a jquery table pager that basically makes it real easy to for stuff to look good and have paging built into our reports without us having to do much work at all but that works with a whoops that works with a table as opposed to divs so we're gonna keep that in mind it also requires us to have like a table head or a table body or t-head t-body section with which we're not gonna do right now but we will talk about that at some point just something if you want to jump ahead at some point and clean this up uh so okay so let's see so we've got uh due date but no so we have time frame name status spent and due date so that's our here we'll just clean it up a little bit do it like that so there's our rows and let's make our table uh we're going to make it not a hundred percent and let's just look at that right now we may do some more cleanup but for now oops that's task i want to go to report if i wanted to test by status complete and what we're going to see here is something that's a lot you know a lot more report like then we can add some more stuff we can do some borders and some spacing but for right now we're just going to keep it like this now before we had by status we had by timeline so we could look at our first quarter we've got some stuff there then roadmap is basically the same thing but roadmap what we want to do is pick a roadmap so let's go back and do that handle that one in which case so here where actually the perimeter is actually a roadmap so what we need to do is we need to find all the tasks where the rope for a certain roadmap now we actually have that query let's see where do we put that i believe this is it ah that's not it do we have edit roadmap i think we had tasks within that we may not have oh no because within that we had the time frames so well let's play with this a little bit so this is going to be a bit of a challenge where did we put that it's going to be up here so what we want is we want all of the tasks oops that's not it we want all of the tasks where we have a specific roadmap and so this is going to be a bit of a challenge and what we want to do is let's start by this is what we want to do is get our see we'll do it in it we'll do it a single let's do it in a single query so this is just going to be tasks and it's going to be a raw and we do want our id we know we're going to pass that in and what we want to do here is we're going to task we want to do t.star so we know we want that from dp project tasks i believe it's what we call it it's just task and let's actually oh that's running let's go over here let's just do it this way i'm gonna cheat oops oh it won't let me do that okay so i gotta go back and actually have to remember what my password was and that's in my settings wherever i put my settings so let's see my user is root and that's my password so that's you dash p so now let's show databases because i forget what it's called it is dp project and now show tables so we can do a select star from dp project underscore task oh so now we've got that so we've got all of our tasks now but so let's start with that so if we do that but now what we need to do and that's we're going to call it t but now we're going to have to join so we can do an inner join on dp project time frame so we're going to call him tf and we're going to do it on the time frame on the task dot time frame id and if we look back here we can see where we're going to do it with this time frame id so where so we want to get all the time frames where the time frame id the id for that equals our time frame id so this is going to pull in all of our project all of our time frames and now here and then we wanted where the time frame dot parent id which i think is what we call the road map so we've got our time for oh road map and so now we have to jump up to where the road map id equals our task and so here let's look at this and let's give ourselves a road map id of one and see if that brings us something back let's do that so if we do it where roadmap id equals one then we do get tasks back based on that and so this is going to be and this is uh where do we go back to our view so walking through this real quick we get everything from our task but now what we're going to do is we're going to with each task we're going to look into the time frame and look at its roadmap id that's where we get this tf that id and then we want the roadmap id equal to the value that we send across and so in doing now if we go to roadmap and we look at all that in our personal goals annual goals 2022 we're gonna see we don't have any but if we look at 2021 we see that we do have some so if we go to roadmap 2022 it doesn't have any children it doesn't have any tasks so we can see that one actually pretty quickly now here annual goals we've got uh professional goals doesn't have any children and personal goals does and has some tasks here if we look down here now this is because uh if you look the time frames do not roll up so we just looked at the top level so we do have to make a change here so what we want to do is we want to change this around a little bit is we need to look where the road map is that but if we look at our road maps we're gonna see if we can remember uh let's see from time frames i'm sorry we are going to be able to come in here and we see that some okay so those all have a road map of oh well they should be good so they should have tasks uh so we probably are okay so if we look at and we need to figure out what we're missing here oh probably because some let's go back and look at our tasks if we look at our tasks and we have our time frame id sum did not have we have some of these that we did not tie actually to a time frame which is interesting enough so if we look at these so if we look at like test one two three four five six we're not actually going to see those anywhere i don't think so we look in here we've got a whole bunch of tasks but because we didn't tie them to a time frame then we're not going to see them so even though we had a bunch we don't have anything listed out so that's why we're seeing a little bit different but if we look to all tasks whoop sorry if we go back here and look at our task list so we see here see time frame no no no no no no those should not technically should not exist but even if they do they're not tied to a roadmap so we are good now let's go back to our report and uh if we look at my status let's see here's all of our new uh i think what i'm going to do we could we could do a couple different things here but i think right now what i want to do is wrap this episode up because what we've got next is basically some cleanup kinds of things and i think the next one i want to do is actually do more of a walk through because what we're going to do is we're going to talk about uat basically user acceptance testing and since we we're going to say this is quote done sort of we've got our all of our basics in we're going to do a walk through and we're actually going to talk about some of the things that we need to fix now some of these have been done along the way but also they've done been done without a thought towards um other we haven't gone through and done like a you know a sweeping test to see if we broke stuff or not and so we're gonna do that next time around and we're gonna we're getting pretty close we're gonna actually get to the point where we can wrap this thing up in the next couple episodes but until then go out there and have yourself a great day a great week and we will talk to you next time you
Transcript Segments
[Music]
well hello and welcome back
we are hopefully wrapping up our reports
today that's our goal
uh the first thing i want to do is let's
fix the look
of the task by status i've been playing
around with a little bit so this is
a little different from the last time
you saw it
essentially if you look at tasks
or general task lists we've got some
stuff here
uh we're full line we're got a button
and this stuff doesn't really
make as much sense when we're not when
this is a report
so what we're going to do here is we're
not going to
from a report be able to jump in so this
go page on click we're not going to
worry about that anymore
which means because this isn't an
interactive report we don't need to
worry about the ids at all
and actually what we want to do for here
is we're going to turn this
into a table because it's going to be a
little easier for us to deal with it
that way
so what we're going to do is we're going
to come swing through here blah blah
blah
there we go so there's our table
first thing we'll do is we're going to
create some headers so we're going to
have a header row
that's going to be let's call
it uh it's gonna be the time frame
we're also gonna have
and this is gonna make stuff just a
little bit easier for us to deal with so
we're gonna do a time frame
a name
a due date
ah let's do status let's do status and
then due date
status
we'll go ahead and do time spent
and then due date
so now we can take all of these and
we're going to shrink these down a
little bit
so then all we need to do is for each
one we're going to create a row
get rid of our divs
and this is going to be a detail so td
now we could do some more interesting
things with these but we're not going to
at this point
we may come back and sort of like some
advanced stuff
and look at some ways to play around
with tables and why this may make a lot
of sense for us
particularly from reports and just
sort of a spoiler alert what we can do
is we're going to be able to do things
like use a jquery
table pager that basically makes it real
easy to
for stuff to look good and have paging
built into our reports without us having
to do much work at all
but that works with a
whoops that works with a table as
opposed to
divs so we're gonna keep that in mind it
also requires us to have like a
table head or a table body or t-head
t-body section with
which we're not gonna do right now but
we will talk about that at some point
just something if you want to jump ahead
at some point and clean this up
uh so okay so let's see so we've got uh
due date but no
so we have time frame name status
spent and due date so that's our here
we'll just
clean it up a little bit
do it like that so there's our rows and
let's make our table
uh we're going to make it not a hundred
percent
and let's just look at that right now we
may do some more cleanup but for now
oops that's task i want to go to report
if i wanted to test by status complete
and what we're going to see here
is something that's a lot you know a lot
more report
like then we can add some more stuff we
can do some borders and some spacing but
for right now
we're just going to keep it like this
now
before we had by status we had by
timeline
so we could look at our first quarter
we've got some stuff there
then roadmap is basically the same thing
but roadmap what we want to do
is pick a roadmap so let's go back and
do that
handle that one
in which case so here where actually the
perimeter is actually a roadmap
so what we need to do is we need to find
all the tasks
where the rope for a certain roadmap
now we actually have that query
let's see where do we put that i believe
this is
it
ah that's not it do we have
edit roadmap i think we had tasks
within that we may not have oh no
because within that
we had the time frames
so well let's play with this
a little bit
so this is going to be a bit of a
challenge where did we put that it's
going to be up here
so what we want is we want all of the
tasks
oops that's not it we want all of the
tasks
where we have a specific roadmap
and so this is going to be
a bit of a challenge and what we want to
do is
let's start by this is what we want to
do is get our
see we'll do it in it we'll do it a
single let's do it in a single query
so this is just going to be tasks
and it's going to be a raw
and we do want our id we know we're
going to pass that
in and what we want to do here
is we're going to task we want to do
t.star
so we know we want that from
dp project tasks i believe it's what we
call it
it's just task
and let's actually oh that's running
let's go over here
let's just do it this way i'm gonna
cheat
oops
oh it won't let me do that okay so i
gotta go back and actually have to
remember what my password was
and that's in my settings wherever i put
my settings
so let's see my user is root
and that's my password so
that's you dash p
so now let's show databases because i
forget what it's called
it is dp project
and now show tables so
we can do a select star from dp project
underscore task
oh
so now we've got that so we've got all
of our tasks
now but so let's start with
that so if we do that
but now what we need to do and that's
we're going to call it t
but now we're going to have to join so
we can do
an inner join on
dp project time frame
so we're going to call him tf
and we're going to do it on the time
frame
on the task dot time frame
id
and if we look back here
we can see where we're going to do it
with this time frame
id
so where so we want to get all the time
frames where the time frame
id the id for that equals our time frame
id so this is going to pull in all of
our project
all of our time frames and now here
and then we wanted where the time frame
dot parent id
which i think is what we call the road
map so we've got our time for oh road
map
and so now we have to jump up to where
the road map
id equals
our task
and so here let's look at this
and let's give ourselves a road map id
of one
and see if that brings us something back
let's do that so if we do it where
roadmap id equals one
then we do get tasks back based on that
and so this is going to be and this is
uh
where do we go back to our view so
walking through this real quick
we get everything from our task but now
what we're going to do
is we're going to with each task we're
going to look into the time frame
and look at its roadmap id that's where
we get this tf
that id and then we want the roadmap id
equal to the value that we send across
and so in doing now if we go to roadmap
and we look at all that in our personal
goals annual goals 2022
we're gonna see we don't have any but if
we look at 2021
we see that we do have some so if we go
to roadmap 2022
it doesn't have any children it doesn't
have any tasks
so we can see that one actually pretty
quickly now here annual goals
we've got
uh professional goals doesn't have any
children and personal goals does
and has some tasks here
if we look down here now this is because
uh if you look
the time frames do not roll up so we
just looked at the top level
so we do have to make a change here so
what we want to do
is we want to
change this around a little bit is we
need to look where the road map is that
but if we look
at our road maps
we're gonna see if we can remember
uh let's see from time frames i'm sorry
we are going to be able to come in here
and we see that some
okay so those all have a road map of oh
well they should be good so they should
have tasks
uh so we probably are okay so if we look
at
and we need to figure out what we're
missing here
oh probably because some
let's go back and look at our tasks if
we look at our
tasks
and we have our time frame id sum
did not have we have some of these that
we did not tie
actually to a time frame which is
interesting enough
so if we look at these
so if we look at like test one two three
four five six
we're not actually going to see those
anywhere
i don't think
so we look in here we've got a whole
bunch of tasks but because we didn't tie
them to a time frame
then we're not going to see them so even
though we had a bunch we don't have
anything
listed out so that's why we're seeing a
little bit different but if we look to
all tasks whoop sorry if we go back here
and look at our task list so we see here
see time frame no no no no no no
those should not technically should not
exist
but even if they do they're not tied to
a roadmap so we are
good now let's go back to our report
and uh if we look at my status let's see
here's all of our new
uh i think what i'm going to do we could
we could do a couple different things
here but i think right now what i want
to do
is wrap this episode up
because what we've got next is basically
some cleanup kinds of things
and i think the next one i want to do is
actually do more of a walk through
because what we're going to do is we're
going to talk about uat basically
user acceptance testing and since we
we're going to say this is quote done
sort of
we've got our all of our basics in we're
going to do a walk through and we're
actually going to talk about some of the
things that we need to fix now some of
these have been done along the way
but also they've done been done without
a thought towards
um other we haven't gone through and
done like a
you know a sweeping test to see if we
broke stuff or not
and so we're gonna do that next time
around and we're gonna we're getting
pretty close we're gonna
actually get to the point where we can
wrap this thing up in the next couple
episodes
but until then go out there and have
yourself a great day a great week
and we will talk to you next time
you