Live data from Hacker News

Atlassian tells employees they can work from home forever

cnbc.com

461–462 of 462 posts

Re: Atlassian tells employees they can work from home forever

#461
post #458

Earlier quoted context omitted.

If you don't have scripts that will fetch all your parameters and just have to fill in a couple of fields then you're doing it wrong.

Uh... I’m having trouble envisioning this, do you have any examples? I ended up forcing my slack bot to issue POSTs to Jiras API out of frustration.

Yes, exactly that. Basically wire up very simple commands with curl and jq that do the transitions you need, pulling data from other rest apis as necessary.

The two workhorses of my integration are two methods named jira_get and jira_post.

    function jira_get {
        ENDPOINT="$1"
        PAYLOAD="$2"

        URL="https://your-org.atlassian.net/rest/api/2/$ENDPOINT"
        QUERY_STRING="$(jq --null-input --raw-output --argjson x "$PAYLOAD" '$x|[to_entries[]|((.key|@uri)+"="+(.value|@uri))]|join("&")')"

        curl \
            --silent \
            --request "GET" \
            --header "Content-Type: application/json" \
            --user "$JIRA_USER:$JIRA_TOKEN" \
            "$URL?$QUERY_STRING";
    }

    function jira_post {
        ENDPOINT="$1"
        PAYLOAD="$2"

        URL="https://your-org.atlassian.net/rest/api/2/$ENDPOINT"
        QUERY_STRING="$(jq --null-input --raw-output --argjson x "$PAYLOAD" '$x|[to_entries[]|((.key|@uri)+"="+(.value|@uri))]|join("&")')"

        curl \
            --silent \
            --request "POST" \
            --user "$JIRA_USER:$JIRA_TOKEN" \
            --header "Content-Type: application/json" \
            "$URL" \
            --data "$PAYLOAD";
    }
Then if you want to get the available transitions, and required fields for those transitions, you can do

    ISSUE=PRJ-1234

    ISSUE_JSON="$(jira_get "issue/$ISSUE/transitions" '{"expand":"transitions.fields"}'
    TRANSITION_NAMES="$(echo "$ISSUE_JSON" | jq '.transitions[].name')"
and then given the transition in question, you can look at the fields required for the transition, and figure out where you get the data that goes in those fields normally. Any time the data that goes in those fields is obtained through a rote process, you automate that process, and then prompt for any fields you can't get in an automated fashion (e.g. "signed off by" you can fetch the reviewer names from the github api for the associated pull request).

But yeah, a slack bot that issues requests to the JIRA api is a perfectly workable solution, and I think you'd be surprised at how much of a quality of life improvement you'll get by continuing to add capabilities to it that reflect your specific workflow.

Re: Atlassian tells employees they can work from home forever

#462
post #148
post #141

Earlier quoted context omitted.

The open office “fad” is pretty much the only office arrangement for more than a decade now, so what you’re saying is this will be the de facto going forward?

De-facto, but actually counter to productivity, just like open-office. Companies that choose to not do this, will have a per employee efficiency advantage. Big companies may not care just like in open office because the per employee advantage is outweighed by the ability to reduce costs for the space

Not too long after this discussion, a similar thought from PG: https://twitter.com/paulg/status/1295788954353111040. "Possible scenario: It's 2025. The epidemic is over, but most big tech cos are still significantly remote, because powerful employees moved to Jackson Hole and don't want to move back. A startup emerges that's intensely not-remote, and beats one of the incumbents by moving faster."
Post reply on HN