navitia icon indicating copy to clipboard operation
navitia copied to clipboard

Add field to manage comment label

Open cboxL opened this issue 9 years ago • 8 comments

In order to manage cross-reference to note, we want to add a new field to the "Comment" object : comment_label

This text field contains the letter(s) or symbol used in the cross-reference, for instance to comment a trip in Timetable. This allows the data provider to choose the label reffering to a certain kind of note.

This issue concerns the NTFS file : comment.txt and the note API object.

E.g. {

  • id:114
  • type:note
  • label:'e'
  • value:'Except wednesday'

}

cboxL avatar Nov 18 '15 15:11 cboxL

ok for me with the comment_label field in the comments.txt file. I'll add it soon.

prhod avatar Nov 23 '15 15:11 prhod

PR https://github.com/CanalTP/navitia/pull/1250 is now including comment_label in the ntfs 0.6.

prhod avatar Nov 24 '15 13:11 prhod

Ok, now I have a technical question about comments :

The comment is not a struct but a map containing id and comment text. If I change this and now declare a struct Comment in ed and navitia, containing id and comment_name, comment_label, I have to redeclare many things and I don't know if you want to handle it this way.

vpassama avatar Nov 30 '15 16:11 vpassama

yes you can wrap this in a struct with a comment label and the comment (why do you need a name ?)

the comments are stored in kraken in a specific container: https://github.com/CanalTP/navitia/blob/dev/source/type/comment_container.h#L71

antoine-de avatar Dec 01 '15 10:12 antoine-de

Okay great, I speak about comment_name because the NTFS documentation declares such names for the data columns : https://github.com/prhod/navitia/blob/ntfs_doc_0.6/documentation/ntfs/ntfs_0.6.md#commentstxt-optionnel.

I think it could be good to make the data columns correspond to the object attributes names.

vpassama avatar Dec 01 '15 11:12 vpassama

i'm not fan of the 'name' for the value of the comment :wink:

since the api outputs a 'value' field maybe you can name the field value ?

On Tue, Dec 1, 2015 at 12:00 PM, Vincent Passama [email protected] wrote:

Okay great, I speak about comment_name because the NTFS documentation declares such names for the data columns : https://github.com/prhod/navitia/blob/ntfs_doc_0.6/documentation/ntfs/ntfs_0.6.md#commentstxt-optionnel .

I think it could be good to make the data columns correspond to the object attributes names.

— Reply to this email directly or view it on GitHub https://github.com/CanalTP/navitia/issues/1278#issuecomment-160935103.

antoine-de avatar Dec 01 '15 11:12 antoine-de

i'm not fan of the 'name' for the value of the comment

Me neither :smile:

If we don't use the column title from data, maybe we don't have to rename the attribute. Or maybe we could ask @prhod ?

Maybe comment_content or comment_value as suggested by @antoine-de would be better.

vpassama avatar Dec 01 '15 12:12 vpassama

Ok with me for the comment_value field. I'll change it in the NTFS 0.6.

prhod avatar Dec 02 '15 08:12 prhod