Detailed Notes
We continue using the application as a way to track the tasks we have chosen for bug fixing and improving the user experience. This session is aimed at setting default task status and adjust todo vs. active tasks.
You can view source for today and all prior days by reviewing the tag Day 54 at this GitHub: https://github.com/robbroadhead/develpreneur-pythontutorial
Transcript Text
[Music] well hello and welcome back we're continuing working through our task list here from our uat testing and uh just usability and user experience stuff we're going to continue moving through this actually last episode we added this little filter to our active tasks and that actually is not the ticket we worked on a slightly different ticket so we're going to knock that one out oh mark that complete but we are going to go it was our task list and we can see that we sort of got that working so we're going to fix that up and this one's tasks we're going to take essentially the same code list tasks and we're going to be able to fix that so the first one we had was i think i'm sorry was active tasks so active tasks all we did is we added this options and a pid and so we want to do the same thing for list tasks right that's what we call that list tasks and so now what we need is we need two things we need the ops which is going to be ops and we need our pid it's going to be pid and we're going to have to pull that now so our pid equals zero and then we'll actually just there we go we can check it here and then if it's there then oh there we go that's all we need and then oh well actually i think well here becomes interesting thing is that now we were jumping and we were based on two things we're either based on because now what we're going to see is that here this all task is actually going to return us to to do so if i load that up and i pick one see it returns to to do so i need to either return to um i have to return to where i came from so either have to return to tasks or return to to do and so what i probably the easiest way to do this is i am just going to set that when i come in so i'm going to be i'm just going to call that a page and in this case this is going to be list well actually i can do it from here it's either going to be tasks or it's going to be to do so if i do what is it active tasks here the page is going to be to do and so i'm going to change just a little bit so i'm going to go into my task list and then select time frame it's going to need a page and when i do that where did i do that on my selector there we go select that that's going to be page and then the id uh let's do it we're gonna do it this way so we're gonna do that we're gonna change this a little bit so it's gonna be plus page and then the id so now we got to change our url when we did that so this is now going to be first thing is going to be a i believe we call it i think it's just a str yep and this is going to be page and then if i go to my views for set then instead it's going to be let's see so it needs to become a page and then here it just needs to be a redirect to the page and i think that will take care of it for us so now if i go back here and i go to immediate uh it is not doing things quite right so i'm probably breaking something in the oh console i'm going to see something's not right oh to do is not defined to do is not defined here uh let's go back and look at what am i doing here so if i come here redirect huh that should be working so it's not here so it must be in this uh if i go to uh where i go to my task list so let's just do this let's just make sure it's getting built right let's see if i'm getting that far oh that's the problem is it's not in a string uh let's see select time frame that should be like that and then if we do this and we go to immediate there we go if we go to march there's nothing if we go to our task list it's going to start off with everything but if we go to march it is not giving us what we want so something's not right there it's coming to the right place oh because this task is not actually it's not doing a filter my mistake so because remember we so tasks is all tasks so if we go to active tasks we do this little filter uh let's see which is basically right here and now we're gonna essentially do the same thing actually let's get our count too uh cancel complete blah blah blah blah so then if we go to uh list tasks then here see we do a clean session and then we jump in and grab it so here we're going to do stuff a little differently so when we do alt i think we're going to skip the clean session we're going to take that okay so we've got our process id so we don't need that now we're essentially doing the same thing here on our to do except i don't need complete and i think that will work so i get my count let me go ahead and send my count i can just call it count link the tasks title is all tasks okay so if i go home personal goals let's change it to immediate let's go to my task list this is going to be immediate but it's still not querying it that quite right so that's coming through so let's see so my filter is probably not quite right let's look here list tasks current current is time frame fp is in my request session so let's check that i may have cleared that out so now if i go to march it's doing that but it's not listing tasks right oh shoot because i turned around and did that okay so now let's see if i do march there's no tasks available i go immediate there's 20 and i'm gonna see uh there we go so i'm seeing new i'm seeing complete i'm seeing all of that so now and go back to my to-do i got those things knocked out so let's take a look at i had an error let's default the status on creating a task so if i do create task i don't have the status set i want it to be new by default so that should be easy enough when i do it's probably create task and then here uh it uses task edit so what i need to do is if it's a new task then i want to set that so let's do i don't want to do this because it's going to be edit or not and then i'm just going to set it here i'm going to actually set it within the task edit so i'm going to say here edit task and so actually i'm just going to set it there i'm going to say in my view so see this is create task i'm creating here so i've got a form instance equals data and then did i set the data anywhere date equals here so i've got the owner and i'm just going to be say data dot status equals new and new equals and i've got that somewhere where do i have that let's do a status complete there we go whoops here we go oh except for i used it there but i did it better here we go so i'm going to take that and here oh new equals whoop and then i just want it to be here and so now if i come in and create a new task uh status is new there we go but if i edit a task it's going to be oh that's not what i want i want a status let me look at something that's different march doesn't have any february doesn't have any professional gold nope oh because these are active my mistake let's go to task list and go to immediate and if i go here let's do something that's complete so status is complete and actually let's take a look at that uh so if i do the default status on create task let's set him to save record there immediate all tasks active tasks should be there we go so that's in progress and now one of the things we're going to do which i have not actually mentioned yet is let's change based on status so let's do uh so default status on that and this is what we're going to come to next time is i want to change this so these colors actually show us something so i'm going to create a task and this is going to be set task background color based on status just to make it a little easier new blah blah blah and we're going to save that so now if we go here should see somewhere background color based on that all right so we added a task and we completed one but that will wrap it up for this one and we will come back next time and continue digging through our list as always go out there have yourself a great day you
Transcript Segments
[Music]
well hello and welcome back
we're continuing working through our
task list here from our
uat testing and uh just usability and
user experience stuff
we're going to continue moving through
this actually last episode we added this
little filter
to our active tasks and that actually
is not the ticket we worked on a
slightly different ticket so we're going
to knock that one out
oh mark that complete but we are going
to go it was our task list
and we can see that we sort of got that
working so we're going to fix that up
and this one's tasks
we're going to take essentially the same
code list tasks
and we're going to be able to fix that
so the first one we had was i think
i'm sorry was active tasks
so active tasks all we did is we added
this options and a pid
and so we want to do the same thing for
list
tasks right that's what we call that
list tasks
and so now what we need is we need two
things we need
the ops
which is going to be ops
and we need our pid
it's going to be pid and we're going to
have to pull that now so our
pid
equals zero and then we'll actually just
there we go we can check it here
and then if it's there then
oh there we go that's all we need
and then oh well actually i think well
here becomes interesting thing is that
now we were jumping
and we were based on two things
we're either based on
because now what we're going to see is
that here this all task is actually
going to return
us to to do so if i load that up
and i pick one see it returns to to do
so i need to either return to
um i have to return to where i came from
so either have to return to tasks
or return to to do
and so what i probably the easiest way
to do this is i am just
going to set that when i come in
so i'm going to be i'm just going to
call that a page
and in this case this is going to be
list
well actually i can do it from here
it's either going to be tasks
or it's going to be to do so if i do
what is it active tasks
here the page is going to be to do
and so i'm going to change just a little
bit so i'm going to go into my
task list
and then select time frame it's going to
need
a page and when i do that
where did i do that on my selector
there we go select that that's going to
be
page
and then the id uh let's
do it we're gonna do it this way so
we're gonna do
that we're gonna change this a little
bit so it's gonna be plus page
and then the id
so now we got to change our url
when we did that so this is now going
to be
first thing is going to be a i believe
we call it i think it's just a
str yep and this is going to be page
and then if i go to my views for set
then instead it's going to be let's see
so it needs to become a page
and then here it just needs to be a
redirect to the
page and i think that will take care of
it for us
so now if i go back here and i go to
immediate
uh it is not doing things quite right
so i'm probably breaking something in
the
oh console i'm going to see something's
not right oh to do is not defined
to do is not defined here
uh let's go back and look at what am i
doing here so if i come here
redirect
huh that should be working so it's not
here so it must be
in this uh if i go to
uh where i go to my task list
so let's just do this let's just make
sure it's getting built right
let's see if i'm getting that far
oh that's the problem is it's not
in a string uh let's see select time
frame that should be
like that
and then if we do this and we go to
immediate
there we go if we go to march there's
nothing if we go to our task list
it's going to start off with everything
but if we go to march
it is not giving us what we want so
something's not right there
it's coming to the right place
oh because this task is not actually
it's not doing a filter
my mistake so because remember we
so tasks is all tasks
so if we go to active tasks we do this
little
filter uh let's see
which is basically right here
and now we're gonna essentially do the
same thing actually let's get our count
too
uh cancel complete blah blah blah blah
so then if we go to
uh list tasks
then here see we do a clean session
and then we jump in and grab it
so here we're going to do stuff a little
differently
so when we do alt i think we're going to
skip the clean session
we're going to take that
okay so we've got our process id so we
don't need that
now we're essentially doing the same
thing here on our to do
except i don't need complete
and i think that will work so i get my
count
let me go ahead and send my count
i can just call it count
link the tasks title is all tasks
okay
so if i go home personal goals let's
change it to immediate
let's go to my task list this is going
to be immediate
but it's still not querying it that
quite right
so that's coming through so let's see so
my filter is probably
not quite right let's look here list
tasks
current current is time frame
fp is in my request session so let's
check that i may have cleared that out
so now if i go to march
it's doing that but it's not listing
tasks right
oh shoot
because i turned around and did that
okay so now
let's see
if i do march there's no tasks available
i go immediate there's 20 and i'm gonna
see uh there we go so i'm seeing new i'm
seeing complete
i'm seeing all of that so now
and go back to my to-do i got those
things
knocked out so let's take a look at
i had an error
let's default the status on creating a
task
so if i do create task i don't have
the status set i want it to be new by
default
so that should be easy enough when i do
it's probably create task
and then here uh it uses task
edit so what i need to do is
if it's a new task
then i want to set that so let's do
i don't want to do this because it's
going to be edit or not
and then i'm just going to set it here
i'm going to actually set it within the
task edit so i'm going to say here
edit task
and so actually i'm just going to set it
there i'm going to say
in my view so see this is create task
i'm creating here
so i've got a form instance equals data
and then did i set the data anywhere
date equals here
so i've got the owner and i'm just going
to be say data dot
status equals
new and new equals
and i've got that somewhere where do i
have that let's do a status complete
there we go whoops
here we go oh except for i used it there
but i did it better here we go
so i'm going to take that
and here
oh new equals
whoop
and then i just want it to be here
and so now if i come in and create a new
task
uh status is new there we go but if i
edit a task
it's going to be oh that's not what i
want i want a status
let me look at something that's
different march doesn't have any
february doesn't have any
professional gold nope
oh because these are active my mistake
let's go to task list
and go to immediate and if i go here
let's do something that's complete
so status is complete
and actually let's take a look at that
uh so if i do the default status on
create task
let's set him to save record there
immediate all tasks active tasks
should be there we go so that's in
progress
and now one of the things we're going to
do
which i have not actually mentioned yet
is let's change
based on status so let's do uh so
default status on that
and this is what we're going to come to
next time is i want to change this so
these colors actually show us something
so i'm going to create a task and this
is going to be
set task background color
based on status just to make it a little
easier
new blah blah blah and
we're going to save that so now if we go
here
should see somewhere background color
based on that all right so we added a
task and we
completed one but that will wrap it up
for this one and we will come back next
time and continue
digging through our list as always go
out there have yourself
a great day
you