Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

working with labels #310

Closed
mihaelS opened this issue Feb 5, 2016 · 8 comments · Fixed by #315
Closed

working with labels #310

mihaelS opened this issue Feb 5, 2016 · 8 comments · Fixed by #315
Labels
bug Needs to be fixed next-release Enhancement/fixed will be released in the next release

Comments

@mihaelS
Copy link

mihaelS commented Feb 5, 2016

Hello!
Is there way to work with trello labels within org-mode?

current state:

  • In trello 2 gray labels was customized: gray - "sun" and gray - "rain". And one yellow - "Gold"
  • two gray labels and one yellow label was attached to the trello card
  • view the card in the org-mode:
    image
    Gray label's names are empty :(

problems:

  • Is there way to customize labels view? Make them to be shown like this:
    :Gold:sun:rain:
  • How use autocomlete for labels (tags, C-c C-q) names? labels color?
@ardumont ardumont added the to-investigate Did not have time to take a look at, so need to find time to label Feb 7, 2016
@ardumont
Copy link
Member

ardumont commented Feb 7, 2016

Hello,

Sorry for the late reply, was out of reliable connection.

Is there way to work with trello labels within org-mode?

org-trello?

Yes, it should partially (org-trello does not work with trello-user-customed labels -i discovered recently that now we could as user extend default labels)

To display the current board labels: M-x org-trello-show-board-labels
This will open another buffer with the available board labels (called tags in org) and their associated values.

2016-02-07_10-00-06

which match:

2016-02-07_10-02-50

Gray label's names are empty :(

...
Could it be that gray (american english) can also be spelled grey (english)?
...

I do reproduce that glitch. Thanks.
I don't know what's the trouble yet.

Is there way to customize labels view? Make them to be shown like this: :Gold:sun:rain:

No, you can only use the generic color names.

How use autocomlete for labels (tags, C-c C-q) names? labels color?

org-mode completes the list of global org tags with the buffer defined ones (In the first :PROPERTIES: drawer we do not see on your screen snapshot).

2016-02-07_10-06-35

2016-02-07_10-00-20

In this snapshot, not all local colors are seen. I don't know why either.
There may be conflicts with the toggle letter (first letter of the words) with other tag word in the global tags list... (not completely sold on this one since we can see (o)range and (o)rg-mode words show up in my snapshot...)

From your org buffer, you can see the current tags:

<kbd>M-:</kbd> RET org-tag-alist RET

returns:

(("orange" . 111) ("purple" . 112) ("blue" . 98) ("yellow" . 121) ("green" . 103) ("red" . 114) ("howto" . 104) ("tech" . 116) ("emacs" . 101) ("orgmode" . 111) ("faq" . 70) ("linux" . 108) ...)

(This gives you an overview of the current tags for the session from the current buffer's stand point.)

Cheers,

@ardumont
Copy link
Member

Gray label's names are empty :(

...
Could it be that gray (american english) can also be spelled grey (english)?
...

Nope, that's not it.
I forgot that the gray color has no label on trello's side...
That's why, there is something strange happening here.

ELISP> (let ((org-trello--user-logged-in "ardumont"))
         (orgtrello-controller-load-keys)
         (orgtrello-query-http-trello (orgtrello-api-get-card "card-id") 'sync))

#s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data
              (:comments nil :position 1114 :name "Joy of FUN(ctional) LANGUAGES" :labels
                         (#s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data
                                        (:color "yellow" :name "yello" :board-id "board-id" :id "color-id"))
                            #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data
                                          (:color "orange" :name "range" :board-id "board-id" :id "color-id"))
                            #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data
                                          (:color "purple" :name "violet" :board-id "board-id" :id "color-id"))
                            #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data
                                          (:color "blue" :name "blue" :board-id "board-id" :id "color-id"))
                            #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data
                                          (:color "black" :name "arf" :board-id "board-id" :id "color-id"))
                            #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data
                                          (:color nil :name "grey" :board-id "board-id" :id "color-id")))
                         :member-ids nil :list-id "list-id" :checklists
                         ("check-id0" "check-id1" "check-id2")
                         :due nil :desc "hello description\n- with many\n- lines\n\n- including\n\n- blanks lines\n- lists\n- with start or dash  are now possible\n  - indentation too\n" :closed nil :id "card-id" :level 1))

@ardumont ardumont added bug Needs to be fixed and removed to-investigate Did not have time to take a look at, so need to find time to labels Feb 13, 2016
@ardumont
Copy link
Member

I must have forgotten the case when sync' from trello.

Indeed, adding this test proves it:

(should (equal ":a:b:c::" (orgtrello-data--labels-to-tags '("a" "b" "c" nil))))

Thanks, fixing it...

ardumont added a commit to ardumont/org-trello that referenced this issue Feb 13, 2016
@ardumont ardumont added the next-release Enhancement/fixed will be released in the next release label Feb 13, 2016
@ardumont ardumont mentioned this issue Feb 13, 2016
12 tasks
@mihaelS
Copy link
Author

mihaelS commented Feb 15, 2016

Hello!
Sorry for the late reply.

You are right, it prefer to be "grey" color.

If I have several grey labels attached to a card:
labels:
#+PROPERTY: :grey module-1
#+PROPERTY: :grey module-3.2.1
#+PROPERTY: :grey module-5.7

card:

  • TODO make Report function ::::

Will I see "::::" in the tags(labels with no description)?

Thx

@ardumont
Copy link
Member

Will I see "::::" in the tags(labels with no description)?

A label with no description has still a color.
It's the color that corresponds in org-trello.
So here it's the color you should see.
So for instance, here it would be :grey🍊purple:

Now, the limitation i see is that trello now permits to define multiple colors with different values (module-1, module-3.2.1, module-5.7...).
That information is unfortunately lost when mapping to org tags since a tag is unique on its name and org-trello uses the color.

Cheers,

@mihaelS
Copy link
Author

mihaelS commented Feb 15, 2016

Thank you for the answer!

I organize tasks in Trello by the labels, and using them to filter trello-cards. I have a number of descriptions on the same color:

image

image

Is it possible to store labels description infomation in the org-trello items? Probably, in the PROPERTIES ?

@ardumont
Copy link
Member

I organize tasks in Trello by the labels, and using them to filter trello-cards. I have a number of descriptions on the same color:...

Ok.

Now i realize that the labels' description is more important than the actual color...
At first there were only 6 hard-coded values if i remember correctly...

Is it possible to store labels description infomation in the org-trello items? Probably, in the PROPERTIES ?

The code does not permit it.
What i understand of the need is that org-trello needs to map all the possible labels from trello.
Since, now we can create an infinite number of labels in trello. This makes sense.

Thus, the more probable implementation for org-trello is to use the labels's values (in your example, new, appp, person-32, module-1, module-3, etc...) as tags (instead of the actual color name).

(Note: This would also be the occasion to maybe improve org-trello's setup using http://orgmode.org/manual/Setting-tags.html#Setting-tags)

@mihaelS
Copy link
Author

mihaelS commented Feb 16, 2016

Thus, the more probable implementation for org-trello is to use the labels's values (in your example, new, appp, person-32, module-1, module-3, etc...) as tags (instead of the actual color name).

It would be great to implement this feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Needs to be fixed next-release Enhancement/fixed will be released in the next release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants