<feed xmlns='http://www.w3.org/2005/Atom'>
<title>timetasker/timetask, branch master</title>
<subtitle>A CLI for submitting Time Task time sheets</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/timetasker/'/>
<entry>
<title>buildSubmissionParams(): Change time format to U.S.</title>
<updated>2018-01-22T21:04:50+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-01-22T21:04:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/timetasker/commit/?id=d72ad5c7264d3b31b8cbe67bd09feaec5c4f7eed'/>
<id>d72ad5c7264d3b31b8cbe67bd09feaec5c4f7eed</id>
<content type='text'>
The TimeTask form now requires U.S. localisation for the time. This
means that decimal values are no longer submitted as "4,5" for four and
a half hours. Instead, it must be written "4.5".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The TimeTask form now requires U.S. localisation for the time. This
means that decimal values are no longer submitted as "4,5" for four and
a half hours. Instead, it must be written "4.5".
</pre>
</div>
</content>
</entry>
<entry>
<title>buildSubmissionParams(): Change date format to U.S.</title>
<updated>2018-01-22T21:03:41+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-01-22T21:01:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/timetasker/commit/?id=97eccbcc6aa1fae18621f705729f6428ceee629a'/>
<id>97eccbcc6aa1fae18621f705729f6428ceee629a</id>
<content type='text'>
The TimeTask form now requires U.S. instead of European date
localisation. This swaps the date and month fields so that the month
appears first.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The TimeTask form now requires U.S. instead of European date
localisation. This swaps the date and month fields so that the month
appears first.
</pre>
</div>
</content>
</entry>
<entry>
<title>SubmitTimeEntry(): Log HTTP response</title>
<updated>2018-01-22T20:45:52+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-01-22T20:45:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/timetasker/commit/?id=45dde7e7dfc82cce180034533f89e931a42287e6'/>
<id>45dde7e7dfc82cce180034533f89e931a42287e6</id>
<content type='text'>
The previous error message wasn't useful for determining the cause of
the error. It just said there was a problem, but provided no additional
information.

Append the HTTP response body from TimeTask to the error message so
users can see what they had a problem with.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous error message wasn't useful for determining the cause of
the error. It just said there was a problem, but provided no additional
information.

Append the HTTP response body from TimeTask to the error message so
users can see what they had a problem with.
</pre>
</div>
</content>
</entry>
<entry>
<title>Move HTTP response body errors into http.go</title>
<updated>2017-06-03T22:38:28+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-06-03T22:38:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/timetasker/commit/?id=d4a9537b5671fafe04335b9f91c5d5869d4a2358'/>
<id>d4a9537b5671fafe04335b9f91c5d5869d4a2358</id>
<content type='text'>
Take the errors in `main()` that check the response body contents for
known error strings and put them in their respective functions in
"timetask/http.go".

Didn't really make sense to me that these functions were returning HTTP
responses that we weren't really using in a meaningful way. Instead they
should just do their thing and let us know if there was a problem.

That includes checking to see if there were any non-standard errors,
like the ones we had custom-built. Now all that handling and
error-making is self-contained, which feels much nicer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Take the errors in `main()` that check the response body contents for
known error strings and put them in their respective functions in
"timetask/http.go".

Didn't really make sense to me that these functions were returning HTTP
responses that we weren't really using in a meaningful way. Instead they
should just do their thing and let us know if there was a problem.

That includes checking to see if there were any non-standard errors,
like the ones we had custom-built. Now all that handling and
error-making is self-contained, which feels much nicer.
</pre>
</div>
</content>
</entry>
<entry>
<title>RequestModules(): Pretty print modules</title>
<updated>2017-06-03T22:19:35+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-06-03T22:19:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/timetasker/commit/?id=eb82e5e447dff67d5bcd1a2d5c9c52990a840e29'/>
<id>eb82e5e447dff67d5bcd1a2d5c9c52990a840e29</id>
<content type='text'>
Parse the module XML with `ModuleParseXML()`. Take the resulting
`[]Module` slice and use it to generate a string of the following
format:

    ID	Module
    55555	R&amp;amp;D
    77777	Sprint 1
    222222 Sprint 2

This string is what gets printed to the console, which makes it rather
easy to read the modules that are available for the given project and
grab the appropriate ID to put into your config file.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Parse the module XML with `ModuleParseXML()`. Take the resulting
`[]Module` slice and use it to generate a string of the following
format:

    ID	Module
    55555	R&amp;amp;D
    77777	Sprint 1
    222222 Sprint 2

This string is what gets printed to the console, which makes it rather
easy to read the modules that are available for the given project and
grab the appropriate ID to put into your config file.
</pre>
</div>
</content>
</entry>
<entry>
<title>Change `ParseXML()` name to `ModuleParseXML()`</title>
<updated>2017-06-03T22:10:14+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-06-03T22:10:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/timetasker/commit/?id=7e711772def7a5d711500c3c6c37ea41b57ac598'/>
<id>7e711772def7a5d711500c3c6c37ea41b57ac598</id>
<content type='text'>
Prefix the function name to make it more obvious what it relates to.
Since this function lives in the `timetask` module and will be used in
contexts that have nothing to do with Modules.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prefix the function name to make it more obvious what it relates to.
Since this function lives in the `timetask` module and will be used in
contexts that have nothing to do with Modules.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add module.go for parsing Module XML</title>
<updated>2017-06-03T22:05:39+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-06-03T22:05:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/timetasker/commit/?id=c113de965dea24c44023a9aabcff7f8ee1f0caa0'/>
<id>c113de965dea24c44023a9aabcff7f8ee1f0caa0</id>
<content type='text'>
A new function that parses the XML returned by the `RequestModules()`
function.

It provides a `Module` type that allows us to interact with modules more
easily in code.

The `ParseXML()` function will take an XML string and return a slice of
`Module`s.

Added a test just to facilitate development. Wasn't able to find an easy
way to compare slices in Go, so just printed the values and checked the
result visually. Not a useful test for future use, but it served its
purpose. Eventually it would be nice to find a way to compare structs
and have a real pass/fail condition.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A new function that parses the XML returned by the `RequestModules()`
function.

It provides a `Module` type that allows us to interact with modules more
easily in code.

The `ParseXML()` function will take an XML string and return a slice of
`Module`s.

Added a test just to facilitate development. Wasn't able to find an easy
way to compare slices in Go, so just printed the values and checked the
result visually. Not a useful test for future use, but it served its
purpose. Eventually it would be nice to find a way to compare structs
and have a real pass/fail condition.
</pre>
</div>
</content>
</entry>
<entry>
<title>TestLogin(): Fix `Login()` assignment mismatch</title>
<updated>2017-06-03T21:37:32+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-06-03T21:37:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/timetasker/commit/?id=aff9a869ffab0eeb8c644826b9250a500468ff1a'/>
<id>aff9a869ffab0eeb8c644826b9250a500468ff1a</id>
<content type='text'>
`Login()` now returns 3 values. Update the test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`Login()` now returns 3 values. Update the test.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add an option to list "Modules" (sprints &amp; their IDs)</title>
<updated>2017-06-03T21:08:08+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-06-03T21:08:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/timetasker/commit/?id=d833ffe6cd5efd97b00f907ed426a88275a8c8db'/>
<id>d833ffe6cd5efd97b00f907ed426a88275a8c8db</id>
<content type='text'>
Sprints will change with time while the other IDs of a project will stay
the same. Thus sprints, which live in the `Module` field, must be
updated regularly.

In order to facilitate that updating, instead of requiring users to get
those IDs directly from the TimeTask website every time, have them use
this command to get the names of sprints and their IDs. They can then
update the ID manually in their config file.

This code makes a request to the endpoint that returns module IDs for
the site (the site queries this via AJAX to update its interface).

The result of the request is some XML containing the modules and their
IDs. For now I'm just printing this out. We'll want to parse the XML and
display it in a nicer way.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sprints will change with time while the other IDs of a project will stay
the same. Thus sprints, which live in the `Module` field, must be
updated regularly.

In order to facilitate that updating, instead of requiring users to get
those IDs directly from the TimeTask website every time, have them use
this command to get the names of sprints and their IDs. They can then
update the ID manually in their config file.

This code makes a request to the endpoint that returns module IDs for
the site (the site queries this via AJAX to update its interface).

The result of the request is some XML containing the modules and their
IDs. For now I'm just printing this out. We'll want to parse the XML and
display it in a nicer way.
</pre>
</div>
</content>
</entry>
<entry>
<title>buildSubmissionParams(): Fix time string replacement bug</title>
<updated>2017-06-03T16:31:17+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2017-06-03T16:31:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/timetasker/commit/?id=6d138ee3c53913ef63565f66fed1b79d339b3230'/>
<id>6d138ee3c53913ef63565f66fed1b79d339b3230</id>
<content type='text'>
We ran into a bug where submitting "7" as the time spent would become
"700" on the site.

This was because our `n` value of 0 wasn't replacing the "." in the
string. Thus "7.00" became "7.00" after the replacement. Not right. I
misunderstood what that argument was doing and what the word "empty" in
the documentation meant.

Change the `n` value to replace all "."s in the string.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We ran into a bug where submitting "7" as the time spent would become
"700" on the site.

This was because our `n` value of 0 wasn't replacing the "." in the
string. Thus "7.00" became "7.00" after the replacement. Not right. I
misunderstood what that argument was doing and what the word "empty" in
the documentation meant.

Change the `n` value to replace all "."s in the string.
</pre>
</div>
</content>
</entry>
</feed>
