File tree Expand file tree Collapse file tree 5 files changed +48
-2
lines changed Expand file tree Collapse file tree 5 files changed +48
-2
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,11 @@ v34.5.0 (unreleased)
2525
2626- Fix `inspect_packages ` pipeline to properly link discovered packages and dependencies to
2727 codebase resources of package manifests where they were found. Also correctly assign
28- the datasource_ids atrribute for packages and dependencies.
29- https://github.com/nexB/scancode.io/pull/1180/
28+ the datasource_ids attribute for packages and dependencies.
29+ https://github.com/nexB/scancode.io/pull/1180
30+
31+ - Add "Product name" and "Product version" as new project settings.
32+ https://github.com/nexB/scancode.io/issues/1197
3033
3134v34.4.0 (2024-04-22)
3235--------------------
Original file line number Diff line number Diff line change @@ -281,6 +281,8 @@ class ProjectSettingsForm(forms.ModelForm):
281281 "ignored_patterns" ,
282282 "scancode_license_score" ,
283283 "attribution_template" ,
284+ "product_name" ,
285+ "product_version" ,
284286 ]
285287 extract_recursively = forms .BooleanField (
286288 label = "Extract recursively" ,
@@ -318,6 +320,16 @@ class ProjectSettingsForm(forms.ModelForm):
318320 help_text = "Custom attribution template." ,
319321 widget = forms .Textarea (attrs = {"class" : "textarea is-dynamic" , "rows" : 3 }),
320322 )
323+ product_name = forms .CharField (
324+ label = "Product name" ,
325+ required = False ,
326+ widget = forms .TextInput (attrs = {"class" : "input" }),
327+ )
328+ product_version = forms .CharField (
329+ label = "Product version" ,
330+ required = False ,
331+ widget = forms .TextInput (attrs = {"class" : "input" }),
332+ )
321333
322334 class Meta :
323335 model = Project
Original file line number Diff line number Diff line change 2020 < i class ="fa-solid fa-barcode mr-2 "> </ i > ScanCode
2121 </ a >
2222 </ li >
23+ < li >
24+ < a href ="#dejacode ">
25+ < i class ="fa-solid fa-laptop-code mr-2 "> </ i > DejaCode
26+ </ a >
27+ </ li >
2328 < li >
2429 < a href ="#attribution ">
2530 < i class ="fa-solid fa-file-lines mr-2 "> </ i > Attribution
Original file line number Diff line number Diff line change 9393 </ div >
9494 </ div >
9595
96+ < div class ="panel ">
97+ < p id ="dejacode " class ="panel-heading py-2 is-size-6 "> DejaCode</ p >
98+ < div class ="panel-block is-block px-4 ">
99+ < div class ="field ">
100+ < label class ="label " for ="{{ form.product_name.id_for_label }} ">
101+ Product name
102+ </ label >
103+ < div class ="control ">
104+ {{ form.product_name }}
105+ </ div >
106+ < p class ="help "> {{ form.product_name.help_text }}</ p >
107+ </ div >
108+ < div class ="field ">
109+ < label class ="label " for ="{{ form.product_version.id_for_label }} ">
110+ Product version
111+ </ label >
112+ < div class ="control ">
113+ {{ form.product_version }}
114+ </ div >
115+ < p class ="help "> {{ form.product_version.help_text }}</ p >
116+ </ div >
117+ </ div >
118+ </ div >
119+
96120 < div class ="panel ">
97121 < p id ="attribution " class ="panel-heading py-2 is-size-6 "> Attribution</ p >
98122 < div class ="panel-block is-block px-4 ">
Original file line number Diff line number Diff line change @@ -136,6 +136,8 @@ def test_scanpipe_forms_project_settings_form_update_project_settings(self):
136136 expected = {
137137 "extract_recursively" : False ,
138138 "ignored_patterns" : ["*.ext" , "dir/*" ],
139+ "product_name" : "" ,
140+ "product_version" : "" ,
139141 "attribution_template" : "" ,
140142 "scancode_license_score" : 10 ,
141143 }
You can’t perform that action at this time.
0 commit comments