This application transfer hours from Tempo to Maconomy, providing instant relief for consultants tracking their hours in both systems.
Note that this solution is slightly hacky and may not work for other tempo/maconomy setups than the one it has been created for.
Create a .mactempo file in your home directory with the following structure:
{
"jira": {
"baseUrl": "https://jira.yourcompany.com",
"accountField": "customfield_2312"
},
"maconomy": {
"baseUrl": "https://touch.yourcompany.com"
},
"accountMap": {
"tempoAccount1": "maconomyAccount1/maconomyTask1",
"tempoAccount2": "maconomyAccount2/maconomyTask2",
...
}
}
The maconomy.baseUrl must be the base address for the maconomy touch API, not
the regular web client. The accountMap is used to map accounts in Tempo to
correct accounts in Maconomy. An error will be thrown whenever an account is
missing in the map, but present in the Tempo worklog. Finally, the
jira.accountField specifies which field in your issue describes the account.
Run mactempo and follow the instuctions. For more information on how the
application behaves, read the tests.
In addition to the fields in the example config above, one may also specify a
username property, both for Maconomy and Jira. This will be assumed to be the
username for Maconomy and Jira respectively, and may thus save some typing each
week.
Finally, one may specify automatic lunch by providing a lunch key with the
following structure in the configuration file:
{
"account": "myLunchAccount/myLunchTask",
"seconds": 1800,
"minWorkSeconds": 21600,
"description": "Lunch"
}
No lunch will be added on days where the total hours logged in jira totals less
than the minWorkSeconds value. When lunch is added, it will be a seconds
long entry on the given account, with the given description.
This application uses the global-tunnel-ng package for proxy support. Set the
http_proxy, https_proxy and no_proxy environment variables.
Example:
export http_proxy=http://user:password@proxy.mycompany.com:80/
export https_proxy=http://user:password@proxy.mycompany.com:80/
export no_proxy=jira.mycompany.com
In the above example, Jira resides on the local network and requires no proxying, while all other hosts are accessed through proxy.mycompany.com.
Some companies use their own certificate authorities. In these cases, set the
environment variable
NODE_EXTRA_CA_CERTS.
Pull requests are welcome, but do ensure * all tests are running and that new * tests are added for the new functionality and bug fixes, and * there are no lint errors.
A single run of the tests can be done by issuing the command
yarn build
yarn test
Running the test continuously (as when doing development) is significantly speedier when running the build in watch mode:
yarn build --watch
Use your favorite utility for watching the dist folder and running the tests
(yarn test) on change or with a given interval. The test ouput is in machine
readable format and can be piped to any software claiming to prettify the Test
Anything Protocol (TAP), such as
tap-spec.
Run
yarn lint
to get a list of lint errors (if any).
The Maconomy integration is based on the
maconomy npm package by Hanse and
would never be possible without his reverse engineering.