Coder Social home page Coder Social logo

c2's Introduction

C2

Circle CI Code Climate Test Coverage Dependency Status security

C2 is part of GSA's suite of Common Acquisition Platform (CAP) tools.

Interested in using C2?

C2's code is open source, which means you can clone the code in this repository, adapt it for your needs, and deploy it yourself.

If you would prefer to use C2 as as hosted software solution for your organization, we would be happy to give you a demo.

Please submit a support ticket to learn more.

Links

Documentation

General

18F-specific

Extras

c2's People

Contributors

24thcentury avatar adam-at-mobomo avatar adelevie avatar afeld avatar amberwreed avatar amoose avatar annalee avatar anthonygarvan avatar arrra avatar ccostino avatar cmc333333 avatar ctro avatar dlapiduz avatar dogweather avatar eddietejeda avatar jameshupp avatar jessieay avatar konklone avatar l3iodeez avatar makeartfromwar avatar mbland avatar mkathrync avatar nickbristow avatar phirefly avatar pkarman avatar rememberlenny avatar robertlread avatar sashax avatar stvnrlly avatar yozlet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

c2's Issues

Add additional logging for ATO

To qualify for an ATO we need to add extra logging around many actions.

TOLOG:

  • Log successful and unsuccessful logon events
  • log account management events : update username, etc
  • object access : via SQL logs
  • privilege functions : should fall under "all admin actions"
  • system events : aka "show me a deployment"
  • all administrator activity : "elevate, demote users and show logs"
  • authentication checks
  • authorization checks
  • data deletions
  • data access
  • data changes
  • permission changes

Refactoring specs

The good news is: this app has a lot of great tests!

The bad news is: it is hard to figure out if there is test coverage for a feature or not.

Part of the reason for this is that we are using various spec types in unusual ways.

Examples:

Controller specs

What they should check for: rendered templates
redirects
database changes
instance variables assigned in the controller to be shared with the view

What we are using them to check for: flash messages
database changes
emails sent
redirects

Request specs:

What they should check for: everything controller specs check for + response body

What we are using them to check for: same stuff we are using controller specs for

Feature specs:

What they should check for: Feature specs are high-level tests meant to exercise slices of functionality
through an application. They should drive the application only via its external
interface, usually web pages.

What we use them to check for: database changes
emails sent
redirects
content on page

As might be obvious, now that you read the above lists, we are using controller, request, and feature specs in almost the same way.

I vote for the following refactor:

Update feature specs from the perspective of a user clicking around the application and filling in forms. This means the spec expectations would also be for items on the page rather than looking at the database in an expectation (eg: "Proposal.find(1)`)
Consolidate controller and request specs. I would vote to move controller specs to be request specs because they test at the same level but have the added benefit of allowing to check for the response body.
This is just a suggestion and I am definitely open to others' ideas. I do think this refactor is warranted in some form, though, because right now it is very difficult to determine whether a feature is covered by specs due to all of the overlap.

Web Experience

The web experience for Communicart is a place where users can see all of their pending purchase requests, and all past purchase requests. There are two main user groups: Requesters and Approvers.

Home screen / Portal Page

For the approver:

  • They can see both pending requests they need to respond to, and all past requests they have approved.

c2-web-01-approver1

For the requester:

  • Same as the approver except that they see who they sent their requests to.

c2-web-01-requester1

Pending request page

For the approver:

  • Similar to the email (may have gotten to this page from the email)
  • Allows the user to comment or ask questions (or reject the request). The comments will be sent back and forth to the users through email and also be collected on this page.

c2-web-01-approver2

For the requester:

  • Same as approver except they see who they are waiting for approval from.

c2-web-01-requester2

Archived request

So far this page is the same for Approvers and Requesters except for the header on the page.

The only thing I haven't designed yet, is the ability to upload receipts and other documents that can help confirm that the purchase has been made.

c2-web-01-approved

The main thing that isn't working right now, is the pending and approved status bugs. I need to keep playing with the styling of those.

Incorrect Purchase Type Displayed

Just submitted an order for business cards (Request #6474), and after submitting noticed that the purchase type displayed is not correct.

screen shot 2016-12-02 at 11 47 25 am

When I edit the order, it appears that the correct purchase type is displayed.

screen shot 2016-12-02 at 11 47 34 am

However, when I close out of editing, the incorrect type shows again.

Consider cleaning up the .git folder to reduce the large repo size

Hi. I just cloned this repo and it ended up being 83MB. The biggest file is a 77MB pack in .git/objects/pack.

To see the 10 biggest files, run this from the root directory:

git verify-pack -v .git/objects/pack/pack-7b03cc896f31b2441f3a791ef760bd28495697e6.idx \
| sort -k 3 -n \
| tail -10

To see what each file is, run this:

git rev-list --objects --all | grep [first few chars of the sha1 from previous output]

Most of the files are .png, and the last one in the list is a .mov, which I would guess takes up most of the space. There are also .csv and .pdf files. The next step would be to clean up your git by removing all of those unnecessary files.

One option is to use the bfg-repo-cleaner tool, which worked great for me on other repos I've tried it on.

Alternatively, you could do it manually following this git article, as outlined below:

git filter-branch --index-filter 'git rm --cached --ignore-unmatch *.mov' -- --all
rm -Rf .git/refs/original
rm -Rf .git/logs/
git gc --aggressive --prune=now

Then repeat with other types of files.

Then verify:

git count-objects -v

Your size-pack should be a lot smaller now.

[bug] Validations show on landing page

Validations from forms show up on the main page (and possibly other pages).

Steps to reproduce:

  1. Create a new request. Do not fill out fields.
  2. Submit the request so that validation errors show up
  3. Navigate back to the home page

rethinking the architecture

For those not familiar with the CAP project, we are managing approval workflows for different groups in the executive branch, at the moment focusing on purchase card holders getting approvals from supervisors.

We have multiple clients needing approval workflows, but all are sending different information through different templates. One group, for example, is "forwarding" GSA Advantage carts (which copies the order information into the email), whereas another is (in the near term) going to be sending a work order as a spreadsheet. With the current architecture, the size of this codebase will grow linearly with the number of different groups (specifically, the number of types of workflows) we need to support, in terms of parsers, templates, etc.

We need to start splitting the generalized approval functionality from the client-specific functionality. More specifically, let's separate the email templates from the approval logic, so that C2 (or whatever we rename this central piece to) knows nothing about Navigator, carts, etc). The central piece would essentially be a state machine that

  • Knows about approval groups/flows
  • Sends notification emails
  • Handles approvals/rejections
  • Keeps an audit trail of activity

Options:

API

Many of 18F's other projects are service/API-oriented, having a central server which our clients can communicate with through REST.

Pros

  • Improvements effective for everyone immediately
  • Theoretically minimal setup burden for new clients
  • Centralized place for reporting

Cons

  • We have to be more careful about breaking changes
  • Single point of failure
  • Handling of attachments more difficult

Open questions

  • How are the templates specified? We could:
    • Have an admin UI where they provide Liquid/Mustache templates, then have them POST the values to be filled in for each thing to be approved
    • Have them send the HTML to be included in the email in the POST

Gem/Engine

In this setup, each client would create a new Rails/Rack app that includes the common functionality as a gem.

Pros

  • They have full control over their app
  • The information is stored in their database, meaning they can debug/query the data more easily
  • The shared component only upgrades when they explicitly tell it to

Cons

  • Additional setup per client
  • They have to manage their own infrastructure, including
    • Database
    • Email sending/handling
  • The have to use Ruby
  • They have to upgrade the shared component manually
  • Engines/Railties aren't widely used...there may be a good reason

Questions? Thoughts? Alternative ideas?

Supervisor select box is extremely difficult to use

When creating a new event, a Supervisor must be selected from a select box. The options are not sorted and are formatted in various ways. There are also people on there who are not still employees in TTS. It is extremely difficult to find and select the correct person from this box.

My workaround was to inspect the page's HTML with DevTools, where I could search for the option corresponding to my supervisor and then manually add the selected attribute.

screen shot 2018-02-22 at 11 07 35 am

Incorrect recurring interval value

I selected "monthly" but it shows up as "daily." when I try to modify it it's still on "monthly" but when I cancel it shows "daily."

Selected

screen shot 2016-11-29 at 3 55 19 pm

Displayed

screen shot 2016-11-29 at 3 55 32 pm

Discuss how to render/organize templates rendered in JavaScript

  1. If there is a form that is processing the submit, then make remote: true

    ie. https://github.com/18F/C2/blob/design/new-details/app/views/proposals/details/_observer.html.haml#L13

  2. Then set up a js response on the controller and create a .js.erb that responds according to the form_for endpoint

    ie. js response: https://github.com/18F/C2/blob/design/new-details/app/controllers/observations_controller.rb#L11-L18

    ie. .js.erb file: https://github.com/18F/C2/blob/design/new-details/app/views/proposals/js/observations.js.erb

  3. Use the .js.erb file to render the content/template that needs to be rendered in the page. Try to use as much of the existing JS files functions. Keep as much logic out of these .js.erb files and try not to pollute the global namespace with variables.

    ie. https://github.com/18F/C2/blob/design/new-details/app/views/proposals/js/observations.js.erb#L9

onboarding for @pkarman

Tasks for @pkarman

Later

Tasks for @afeld

  • Add to Slack channels
  • Add to Pivotal Tracker
  • Add to @18F/cap team on GitHub
  • Add to calendar items: standups, IPM, and story grooming sessions
  • Schedule a code walkthrough
  • Set up pairing session
  • Give intro to current stories
  • Give intro to weekly ceremonies and team workflow

Later

Onboarding for @jessieay

Tasks for @jessieay

Later

  • Set up the Cloud Foundry CLI (which you will need to deploy)
  • Learn more about Cloud Foundry
  • Deploy C2 to c2-dev (or c2-staging)
  • Get added to the MailChimp account
  • Access support emails [email protected], [email protected], and gatewaycommunicator
    1. Make sure someone has requested/completed access for you (See tasks below)
    2. Go to Gmail and click 'Add Account'. Enter in each of these email addresses. If you are asked for a password, leave it blank. As long as you are already logged into your GSA email, the email addresses should be loaded.
    3. One would expect the newly added email to load automatically, but it doesn't. To load the new email, simply click on your email address at the top right of the page to show all of your loaded email accounts. Click on the newly added email address (capdevs or communicart.sender) to load it.

Tasks for @afeld

  • Add to Slack channels
  • Add to Pivotal Tracker
  • Add to @18F/cap team on GitHub
  • Add to support emails: capdevs, communicart.sender, and gatewaycommunicator through IT Service Desk
  • Add to calendar items: standups, IPM, and story grooming sessions
  • Schedule a code walkthrough
  • Set up pairing session
  • Give intro to current stories
  • Give intro to weekly ceremonies and team workflow

Later

Onboarding Micah

Onboarding for @newMember

Tasks for @newMember

Later

Tasks for @oldmember

  • Add to Slack channels
  • Add to Trello
  • Add to @18F/cap team on GitHub
  • Add to support emails: capdevs, communicart.sender, and gatewaycommunicator through IT Service Desk
  • Send access information for developer test email: [email protected]
  • Add to New Relic
  • Add to calendar items: standups, IPM, and story grooming sessions
  • Schedule a code walkthrough
  • Set up pairing session
  • Give intro to current stories
  • Give intro to weekly ceremonies and team workflow

Later

Consolidate project documentation

We currently have documentation about the project scattered around:

which seems like too many. At the very least, I think we can make the messaging more consistent. There are a handful of audiences that we want to speak to:

  • Program officers or other potential users / new use cases
  • Current users looking to get more information
  • New 18F teammates
  • Potential outside contributors
  • Curious passerby

Questions:

  • What can we consolidate?
  • Where should different pieces of information live?
  • How should it be organized?

Would love some content (and content design) help!

/cc https://www.pivotaltracker.com/story/show/83786688

Onboarding for @anthonygarvan

Tasks for @anthonygarvan

Later

  • Set up the Cloud Foundry CLI (which you will need to deploy)
  • Learn more about Cloud Foundry
  • Deploy C2 to c2-dev (or c2-staging)
  • Get added to the MailChimp account
  • Access support emails [email protected], [email protected], and gatewaycommunicator
    1. Make sure someone has requested/completed access for you (See tasks below)
    2. Go to Gmail and click 'Add Account'. Enter in each of these email addresses. If you are asked for a password, leave it blank. As long as you are already logged into your GSA email, the email addresses should be loaded.
    3. One would expect the newly added email to load automatically, but it doesn't. To load the new email, simply click on your email address at the top right of the page to show all of your loaded email accounts. Click on the newly added email address (capdevs or communicart.sender) to load it.

Tasks for @afeld

  • Add to Slack channels
  • Add to Pivotal Tracker
  • Add to @18F/cap team on GitHub
  • Add to support emails: capdevs, communicart.sender, and gatewaycommunicator through IT Service Desk
  • Add to calendar items: standups, IPM, and story grooming sessions
  • Schedule a code walkthrough
  • Set up pairing session
  • Give intro to current stories
  • Give intro to weekly ceremonies and team workflow

Later

No authentication required to access attachments

All attachments that users upload are public, at least in the public facing version of the app.

Steps to reproduce:

  1. Sign in and create a new request
  2. Upload an attachment
  3. View the proposal and scroll down to "attachments to this proposal" section.
  4. Click on the attachment link
  5. Copy / Paste the URL into an incognito window. The file is still successfully loaded, despite the lack of authentication.

search enhancements

Background

We have several stories open related to improving the experience of proposals search:

These stories boil down to: make search faster, give users more fields to search within and advanced options, support pagination (and presumably, though not yet mentioned, sorting by any field).

There are a few aspects of our data model and code architecture that make improving search a non-trivial problem:

  • data is heavily normalized in the db, across proposals, client_data, comments, versions, and attachments.
  • authorization is similarly normalized across users and roles.
  • each new client use cases means new custom column names.

The current implementation uses a big block of hard-coded SQL plus some ActiveRecord associations in order to create a very large, multiple-JOIN query, which includes manual calls to Postgres full-text search functions for every column against which the user wants to search. The current implementation does zero pagination or user-controlled sorting, and does not distinguish between client slugs (all proposals are searched, regardless of the user's client_slug value).

Current search usage indicates that 80-90% of searches are simply for the public_id of a known proposal. That use case could be solved far more simply and with better performance than the current implementation supports. However, it may be that the high percentage of public_id searches is because the existing user base has figured out that the current search feature doesn't really support much more than that. Only a small minority of client_data fields are searched, comments are ignored, multiple search query terms do not behave as expected, and performance is slow. I.e., our data might indicate a narrow need because users have self-selected a cow path that fits the existing feature constraints, not their actual business needs.

Options

I see three distinct ways forward.

Continue with the current, hand-rolled SQL

  • Refactoring code to limit to the current user client_slug and interrogating the relevant client_data model class to autogenerate the Postgres full-text search syntax. This allows us to add new client models and write very little custom search SQL.
  • Column weighting for ranking could be defined as a class-based hash lookup.
  • Mangle the incoming search query terms in order to correctly implement AND/OR/NOT boolean logic.
  • Postgres term highlighting is very slow, so use it sparingly if ever.

Pros

  • Gives us total control over the features
  • No added dependencies

Cons

  • Re-inventing wheels already solved by other solutions (see other 2 potential paths)
  • Performance will degrade (even further) as we add columns to the search
  • Code maintenance
  • Hard to debug errors since data remains normalized

pg_search

Rewrite the search features to use the industry standard pg_search gem. The multisearch feature should support our normalized data.

NOTE I looked at textacular as an alternative gem but it does not have a multisearch-like feature and so our normalized data structure would prove a challenge to its simpler feature set.

Pros

  • Uses a standard gem
  • Search stays within Postgres (no external system dependencies)
  • Compared to option (1) above, our code should be configuration and declaration, instead of generating custom SQL

Cons

  • Hard to debug errors since data remains normalized
  • Performance will degrade (even further) as we add columns to the search

Elasticsearch

Offload search entirely to an external service. Query parsing, ranking, sorting, pagination, highlighting, would all be performed by ES.

Pros

  • Industry standard
  • Best performance available
  • Standard service offering from cloud.gov
  • Minimal code to write, mostly around serializing/de-normalizing at index time, and query munging at search time
  • Data is de-normalized, which makes debugging easier

Cons

  • External service increases app complexity
  • Small latency in search availability while data is indexed (usually measured in seconds)

Recommendation

Elasticsearch. Best performance, least amount of code.

API isn't working

We've been getting some C2 API-related errors on Micro-purchase and some digging has revealed that the first step of the OAuth handshake fails:

Request:

MY_OAUTH_KEY=[redacted]
MY_OAUTH_SECRET=[redacted]
MY_CREDS=`echo "$MY_OAUTH_KEY:$MY_OAUTH_SECRET" | base64`
curl -i -X POST -H "Authorization: Basic $MY_CREDS" \
  -d 'grant_type=client_credentials' \
  https://c2-staging.18f.gov/oauth/token

Response:

HTTP/1.1 401 Unauthorized
Cache-Control: no-store
Content-Type: application/json; charset=utf-8
Date: Mon, 17 Oct 2016 15:16:21 GMT
Pragma: no-cache
Server: nginx
Vary: Origin
Www-Authenticate: Bearer realm="Doorkeeper", error="invalid_client", error_description="Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method."
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Request-Id: a8d01689-5020-4840-beba-b4b51261d56d
X-Runtime: 0.012835
X-Vcap-Request-Id: cad626f8-f8eb-4bd7-5965-aee2d898abc7
X-Xss-Protection: 1; mode=block
Content-Length: 173
Connection: keep-alive

{"error":"invalid_client","error_description":"Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method."}%   

We had this same error inside the Micro-purchase app (using the C2::Client class--from https://github.com/18F/c2-api-client-ruby).

Blanket branding question

As we start to dogfood this more inside 18F, it would be good to settle on a single name -- cap.18f.gov (CAP), CommuniCart, C2... C2 is of course easy internally, but will probably lead to confusion as we onboard more people.

$0.02

Date submitted bug

Date being rendered is not accurate. Example:

screen shot 2016-10-27 at 11 09 42 am

The date at the top, 10/24, is accurate. The one in-line from April is not.

Understanding email rendering

Continuing this conversation via #1011 @jessieay

So this is the part that makes emails complicated.

Most web pages are written with the assumption that all the content is loaded, then the CSS determines the priority for styling. In emails, you have to design your CSS/class/markup base on the assumption that you can have some parts of your code NOT run.

When it comes to responsive layouts, you have to design for the care where desktop is default (without the media queries) and any media queries are added, only if its possible to run inline styles. In the case where you have things like Gmail, where the style tags are stripped out, you need to account for this.

The problem with Roadie was that it was inlining the media query styles that would run on mobile, which broke the default desktop layout. By having roadie ignore certain styles, we control the designed layout to render the desktop mode in all cases, and then serve the inline style tag with media queries to be run where possible.

To make things more complicated, Outlook is very outdated. Specifically, there are a lot of CSS3 properties and even CSS2 properties it doesnt render. As a result, outlook has some legacy hacks where you can use comment flags to tell Outlook NOT to render certain content.

For what its worth, we are putting these things into consideration in our templates : )

onboarding for Leonard

Onboarding for @rememberlenny

Tasks for @rememberlenny

Later

  • Set up the Cloud Foundry CLI (which you will need to deploy)
  • Learn more about Cloud Foundry
  • Deploy C2 to c2-dev (or c2-staging)
  • Get added to the MailChimp account (and thus Mandrill)
  • Access support emails [email protected], [email protected], and gatewaycommunicator
    1. Make sure someone has requested/completed access for you (See tasks for @phirefly)
    2. Go to Gmail and click 'Add Account'. Enter in each of these email addresses. If you are asked for a password, leave it blank. As long as you are already logged into your GSA email, the email addresses should be loaded.
    3. One would expect the newly added email to load automatically, but it doesn't. To load the new email, simply click on your email address at the top right of the page to show all of your loaded email accounts. Click on the newly added email address (capdevs or communicart.sender) to load it.

Tasks for @phirefly

  • Add to Slack channels
  • Add to the kanban board
  • Add to Trello
  • Add to @18F/cap team on GitHub
  • Add to support emails: capdevs, communicart.sender, and gatewaycommunicator through IT Service Desk
  • Send access information for developer test emails: gsa.approver, communicart.budget.approver, and communicart.ofm.approver)
  • Add to New Relic
  • Add to calendar items: standups, IPM, and story grooming sessions
  • Schedule a code walkthrough
  • Set up pairing session
  • Give intro to current stories
  • Give intro to weekly ceremonies and team workflow

Later

Updated Email

Current email

screen shot 2014-09-02 at 2 39 46 pm

New email design

Biggest updates:

  • Reorganization into 3 columns - Product, Price, Vendor
  • Associating the tags with either the product or the vendor
  • "Branding" in process. We may or may not keep the Communicart wordmark. For now it is a placeholder.
  • Colors are also still in process (as you will see in issue # )

c2-email-approver

Current approval notification emails

screen shot 2014-09-02 at 2 40 39 pm

screen shot 2014-09-02 at 2 41 24 pm

New approval notification emails

Biggest updates:

  • Pulled the approval notifications into the context of the purchase request
  • 2 columns for the list of users who's approval is pending vs approved - Helps the user follow the process and clearly identify which approvers they are waiting for.

c2-email-pending

c2-email-approved

Visual bug: new purch req form selector missing chevron

Minor issue, but the "purchase type" pulldown selector on the new purchase request form is missing the chevron icon.

I'd fix myself, but it would take me a while to find the file :/

This is the fix, i believe โ€ฆ
image

Instructions for formatting new submissions

This is a potentially huge help topic, but I think it's both easier to describe/write and easier for the user if it exists within the submission form. Instructions provided with the form itself are more likely to be noticed and followed.

As an example, the current dollar amount (actual or estimated) requires submissions to be formatted without commas, as in 9999.99 or 9999 rather than 9,999.99 or 9,999. Under "Amount" but above the actual form, a micro-instruction like Do not use commas. (Example: 1050.25).

If there are other submission fields that might have similar points of confusion, put the instruction briefly with that field. If the instruction is too long (more than, say 50 characters) insert a link to a help topic elsewhere.

Attachment data limits

There does not seem to be limits on the attachment data volume. I uploaded >50 MB worth of attachments and could submit the request just fine. There should also be a validation around the data size per attachment - a 10MB attachment went through fine, but 30 MB came back with a 502.

There should be limits on the size of the attachment and the total number of attachments per request.

Tests fail in the Auckland timezone

If Zonebie chooses Auckland as its random timezone, two tests will fail. Any other time zone will not (to my knowledge) cause these tests to fail.

In particular:
rspec ./spec/mailers/communicart_mailer_spec.rb:78 # CommunicartMailer actions_for_approver creates a new token
rspec ./spec/models/api_token_spec.rb:16 # ApiToken.create sets the expiry

This bug can be reproduced by running the tests in the Auckland timezone manually:
ZONEBIE_TZ="Auckland" rspec

Suggested feature: status tracking of orders

The story behind this one: our only 18F P-Card holder has been on leave and people have been wondering about the status of their already approved Communicart requests. Is there a way to easily integrate an order status tracker so we can see if approved purchases have been ordered? Maybe it would include a link to a shipping number that users can verify?

Text Fields should have character limits in DB and UI

If you enter in a long title, the server comes back with a 500. There does not seem to be a limit in the description field. For the title, a limit should be set so that it display properly on the UI. For the description, some large but reasonable limit should be set to guarantee limits on the data storage in the DB. When submitting a large (eg., 10 MB) description, the server comes back with 502: bad gateway. 1 MB descriptions go through just fine.

I realize this is mostly an internal tool and ideally you should not have malicious users, but it is good practice to always put limits on fields that the user provides.

Migrate email service off Mandrill

C2 currently uses Mandrill for email delivery. We need to move off before the end of March. For more details: https://github.com/18F/Infrastructure/issues/880

As well as provisioning an account on a new email service, this will require a minor code change in https://github.com/18F/C2/blob/master/config/environments/production.rb#L6 . It's probably best to move this config out to the c2-prod-ups-email CF service, in which case it should go in https://github.com/18F/C2/blob/master/app/credentials/email_credentials.rb .

Canceling a request doesn't cancel a request

In the new interface, requests don't seem to be canceled by clicking the cancel button, entering a reason, and confirming. This behavior still works properly in the old interface.

Cartmaker Design

Current cartmaker

screen shot 2014-09-02 at 2 45 58 pm

screen shot 2014-09-02 at 2 46 09 pm

1st round designs

Biggest updates:

  • Bringing in some color (which is still in process)
  • Updating it to 18F styles/fonts
  • Adding a success screen so the user gets feedback that they completed the process.

c2-bookmarklet-01

Things I still need to work on:

  • Show store/vendor
  • Maybe think about grouping by vendor
  • Subtotal by item

Larger questions:

  • How do I make a new cart?
  • How do I go to my cart without adding a new item?
  • Does the bookmarklet know who I am, as a user? (I'm assuming yes.)
  • How do I work on 2 carts at one time?

Observing request data

Hello again C2 team!

18F TeamOps has found Communicart really helpful and is thinking a little more about "what's next". We are thinking of ways to easily explore the data generated by the many requests made by an organization. Here are a few of our needs:

  • Tracking purchases by office, so we know what has and hasn't been requested (avoiding duplication).
  • Tracking purchases by spending, so we can make sure that we aren't exceeding any limits.
  • Having a record of purchases that other requestors and P-card holders can reference, so we can ensure that we're ultimately requesting and ordering the same quality of products.
  • Being able to reference requests across multiple users that have been modified and/or denied, so we can maybe come up with some guidelines.
  • Tracking order status from pending approval to delivered and recorded in inventory.

A few of these ideas have been mentioned in other issues, but consider this as a more "global" issue of considering how to assess what data an organization will need to pull from Communicart. Here is my idea:

For all 18F requests from the general staff, we can use this Google form which will populate this sheet.

TeamOps staff can then use Communicart to get Ric's approval, and we use the additional fields provided in the sheet to track order status, approvals, and arrival confirmation in inventory. Would it be helpful for you all if we switched to this system so that you could easily observe how we interact with the data that we need?

Onboarding for Robb

Tasks for @dogweather

Later

Tasks for @pkarman

  • Add to Slack channels
  • Add to Trello
  • Add to @18F/cap team on GitHub
  • Add to support emails: capdevs, communicart.sender, and gatewaycommunicator through IT Service Desk
  • Send access information for developer test email: [email protected]
  • Add to New Relic
  • Add to calendar items: standups, IPM, and story grooming sessions
  • Schedule a code walkthrough
  • Set up pairing session
  • Give intro to current stories
  • Give intro to weekly ceremonies and team workflow

Later

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.