Project

General

Profile

Feature_ #1560

Атрибуты узла в json хранятся в массиве, а не в объекте

Added by Alexey Demakov about 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Start date:
07/26/2011
Due date:
% Done:

100%

Estimated time:
Published in build:
0.12.103

Description

Атрибуты узла в json файле хранятся в массиве:

{
"attributes": [ {
"key": "_type",
"type": "STRING",
"value": "Requirement"
}, {
"key": "_name",
"type": "STRING",
"value": "Общие требования к приобретению зарезервированной услуги"
}, {
"key": "_locations",
"type": "LIST",
"value": ["/Documents/JV_FS_v1.4.xhtml/a9701f8f-db0a-458b-94a0-257380a43094"]
}
],
"uuid": "191c2439-4981-4130-902b-6b0a9a1ddb27"
}

Это приводит к тому, что при изменении (даже нулевом) массив перезаписывается с изменением порядка:

{
"attributes": [ {
"key": "_type",
"type": "STRING",
"value": "Requirement"
}, {
"key": "_locations",
"type": "LIST",
"value": ["/Documents/JV_FS_v1.4.xhtml/a9701f8f-db0a-458b-94a0-257380a43094"]
}, {
"key": "_name",
"type": "STRING",
"value": "Общие требования к приобретению зарезервированной услуги"
}
],
"uuid": "191c2439-4981-4130-902b-6b0a9a1ddb27"
}

В результате появляются ложные изменения, которые мешают работать с svn.
Чтобы такого не происходило, надо поменять формат json файла (с сохранением обратной совместимости)

{
"attributes": {
"_type": {
"key": "_type",
"type": "STRING",
"value": "Requirement"
},
"_name": {
"key": "_name",
"type": "STRING",
"value": "Общие требования к приобретению зарезервированной услуги"
},
"_locations": {
"key": "_locations",
"type": "LIST",
"value": ["/Documents/JV_FS_v1.4.xhtml/a9701f8f-db0a-458b-94a0-257380a43094"]
}
},
"uuid": "191c2439-4981-4130-902b-6b0a9a1ddb27"
}

Associated revisions

Revision d00ae458 (diff)
Added by Yuriy Shekochihin about 8 years ago

fixes #1560

git-svn-id: https://forge.ispras.ru/svn/reqdb/trunk/requality@2205 f558eac1-05b1-4da7-9ed5-5050e8a619d6

History

#1

Updated by Alexey Khoroshilov about 8 years ago

  • Target version set to 0.12
#2

Updated by Yuriy Shekochihin about 8 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset r2205.

#3

Updated by Yuriy Shekochihin about 8 years ago

  • Published in build set to 0.12.103
#4

Updated by Alexey Khoroshilov about 8 years ago

  • Assignee set to Alexey Demakov
#5

Updated by Alexey Demakov about 8 years ago

  • Tracker changed from Feature_ to Feature
#6

Updated by Alexey Demakov about 8 years ago

  • Status changed from Resolved to New
#7

Updated by Alexey Demakov about 8 years ago

  • Tracker changed from Feature to Feature_
#8

Updated by Alexey Demakov about 8 years ago

  • Status changed from New to Design
#9

Updated by Alexey Demakov about 8 years ago

  • Status changed from Design to Development
#10

Updated by Alexey Demakov about 8 years ago

  • Status changed from Development to Testing
#11

Updated by Alexey Demakov about 8 years ago

  • Status changed from Testing to Verified
#12

Updated by Alexey Khoroshilov almost 8 years ago

  • Status changed from Verified to Closed

Also available in: Atom PDF