trophy files use date-accomplished, API uses date-completed

Bug #1024085 reported by Matt Fischer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Accomplishments Daemon
Fix Released
Undecided
Matt Fischer

Bug Description

When the trophy file is created, it sets date-accomplished:

        # Create .trophy file
        cp = ConfigParser.RawConfigParser()
        cp.add_section("trophy")
        cp.set("trophy", "version", "0.2")
        cp.set("trophy", "id", accomID)
        now = datetime.datetime.now()
        cp.set("trophy", "date-accomplished", now.strftime("%Y-%m-%d %H:%M"))

Everywhere else uses date-completed.

This is okay because of the wrapper function, but is unnecessarily confusing.

Tags: bitesize
Jono Bacon (jonobacon)
Changed in ubuntu-accomplishments-daemon:
milestone: none → 0.3
status: New → Confirmed
Jono Bacon (jonobacon)
tags: added: bitesize
Matt Fischer (mfisch)
Changed in ubuntu-accomplishments-daemon:
assignee: nobody → Matt Fischer (mfisch)
status: Confirmed → In Progress
Revision history for this message
Matt Fischer (mfisch) wrote :

I looked at this more and I don't think it's fixable without breaking the API, since the databases and trophies are already "in the wild". We could support both choices, but then the code is too complex. I think we're stuck with this.

Revision history for this message
Jono Bacon (jonobacon) wrote :

I would really prefer we don't change the trophy schema API, but I am open to the idea of changing the daemon API function name as we need to fix some other API bits anyway (such as one method which has a typo in it).

My recommendation is to change get_acc_date_completed() to get_acc_date_accomplished().

Thoughts?

Revision history for this message
Matt Fischer (mfisch) wrote :

Okay, I think that's fair. I agree on not changing the trophy files.

Matt Fischer (mfisch)
Changed in ubuntu-accomplishments-daemon:
assignee: Matt Fischer (mfisch) → nobody
status: In Progress → Confirmed
Revision history for this message
Brian Mastell (bmastell) wrote :

Just checking if we want to also change all the instances of "completed" to "accomplished" in apy.py to make it more consistent, such as the keys in build_viewer_database() and all the other method names ( e.g. get_acc_is_completed() --> get_acc_is_accomplished() )? Or will that result in too much of an overhaul?

Revision history for this message
Brian Mastell (bmastell) wrote :

I notice that the issue my question raises is already being discussed in bug #1024015 so I'll wait for the issue to be resolved there first.

Revision history for this message
Jono Bacon (jonobacon) wrote :

Thanks for the note, Brian, yes that is accounted for in the other bug. If you are interested in working on some of these bugs, feel free to pick one and hack on it. More details about hacking on Ubuntu Accomplishments can be found at https://wiki.ubuntu.com/Accomplishments/GetInvolved/Hacking

Jono Bacon (jonobacon)
Changed in ubuntu-accomplishments-daemon:
assignee: nobody → Matt Fischer (mfisch)
Revision history for this message
Matt Fischer (mfisch) wrote :

Switched all calls related to accomplishments to use _accomplished() .

Changed in ubuntu-accomplishments-daemon:
status: Confirmed → Fix Committed
Changed in ubuntu-accomplishments-daemon:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.