tag:blogger.com,1999:blog-35307631705946010612023-07-18T00:11:29.393-05:00CMMI en españolEste es un blog sobre CMMI y otras tecnologías de mejoraDavid Arteagahttp://www.blogger.com/profile/10902543905448315354noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-3530763170594601061.post-23122515177016315602021-10-03T10:52:00.004-05:002021-10-03T10:53:15.148-05:00Métricas<p><br /></p>David Arteagahttp://www.blogger.com/profile/10902543905448315354noreply@blogger.com1tag:blogger.com,1999:blog-3530763170594601061.post-12572526883907908032012-03-29T17:51:00.000-05:002021-02-20T11:23:12.485-05:00Requerimientos y CMMIEnvía tus consultas sobre Requerimientos y CMMI.
<!--
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.jql.parser.JqlQueryParser
import com.atlassian.jira.issue.search.SearchProvider
import com.atlassian.jira.web.bean.PagerFilter
import java.sql.Timestamp
import com.atlassian.jira.issue.customfields.option.Option
enableCache = {-> false}
String formatear_ddmmaaaa_timestamp (Timestamp p_fecha_timestamp) { // formatea la visualización de un timestamp
return String.format("%td", p_fecha_timestamp) + "/" + String.format("%tm", p_fecha_timestamp) + "/" + String.format("%tY", p_fecha_timestamp)
}
String html = ""
def appProperties = ComponentAccessor.getApplicationProperties()
def valores = appProperties.asMap()
String servidorURL = valores.get("jira.baseurl")
def usuario = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
// campos para filtrar
int swFiltrarSuper = 0
def super_uuoo_CF = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_15901") // 'Superintendencia nacional relacionada - UUOO Solicitante'='15901'
HashMap<String, Option> super_uuoo_CFValueFiltrar
if ( issue.getCustomFieldValue (super_uuoo_CF) == null ) {
swFiltrarSuper = 0
//mensaje = mensaje + "[01] Por favor, seleccionar ambos valores en el campo 'Superintendencia nacional relacionada - UUOO Solicitante'. No ha seleccionado valor alguno. "
} else {
super_uuoo_CFValueFiltrar = new HashMap( issue.getCustomFieldValue (super_uuoo_CF) )
if ( super_uuoo_CFValueFiltrar.size() == 1 ) {
swFiltrarSuper = 1
//mensaje = mensaje + "[02] Por favor, seleccionar ambos valores en el campo 'Superintendencia nacional relacionada - UUOO Solicitante'. Sólo ha seleccionado 'Superintendencia nacional relacionada'. "
}
if ( super_uuoo_CFValueFiltrar.size() == 2 ) {
swFiltrarSuper = 2
}
}
def lider_tecnico_CF = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_16007") // 'Líder Técnico'='16007'
def comentario_al_derivar_CF = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_16015") // 'Comentario al DERIVAR A GESTIÓN DE ADQUISICIONES'='16015'
String comentario_al_derivar_CFValue = (String) issue.getCustomFieldValue (comentario_al_derivar_CF)
boolean swHayComentarioAlDerivar = false
if ( ( issue.getCustomFieldValue (comentario_al_derivar_CF) != null ) && ( comentario_al_derivar_CFValue.trim() != "" ) ) {
swHayComentarioAlDerivar = true
}
// campos para mostrar
def codigo_de_la_necesidad_CF = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_15816") // 'Código de la necesidad'='15816'
def nombre_CF = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_15902") // 'Nombre='15902'
def fecha_derivacion_CF = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_16012") // 'Fecha Derivación='16012'
String sql_01 = 'project = DEM AND issuetype in (Necesidad, "Necesidad agrupada") AND status = "PARA ANÁLISIS" '
if ( swFiltrarSuper == 2 ) {
sql_01 = sql_01 + 'AND "Superintendencia nacional relacionada - UUOO Solicitante" in cascadeOption(' + super_uuoo_CFValueFiltrar.get(null).toString() + ' , ' + super_uuoo_CFValueFiltrar.get("1").toString() + ') '
}
sql_01 = sql_01 + ' ORDER BY key ASC '
def jqlQueryParser_01 = ComponentAccessor.getComponent(JqlQueryParser.class)
def searchProvider_01 = ComponentAccessor.getComponent(SearchProvider.class)
def query_01 = jqlQueryParser_01.parseQuery ( sql_01 )
def results_01 = searchProvider_01.search(query_01, usuario, PagerFilter.getUnlimitedFilter())
String seleccion = ""
if ( results_01.getIssues().size() > 0 ) {
html = '''
<div>
<table border="1" style="display: block;overflow-x: auto; border-collapse: collapse; width: 100%">
<caption><font color=blue>Necesidades en estado <b>PARA ANÁLISIS</b></font></caption>
<tr>
<th style="border: 1px solid #dddddd; text-align:center;"> # </th>
<th style="border: 1px solid #dddddd; text-align:center;"> Clave Jira </th>
<th style="border: 1px solid #dddddd; text-align:center;"> Código de la necesidad </th>
<th style="border: 1px solid #dddddd; text-align:center;"> Nombre </th>
<th style="border: 1px solid #dddddd; text-align:center;"> Superintendencia nacional - UUOO </th>
<th style="border: 1px solid #dddddd; text-align:center;"> Fecha Derivación </th>
<th style="border: 1px solid #dddddd; text-align:center;"> Selección </th>
</tr>
'''
int i = 0
def issueManager = ComponentAccessor.getIssueManager()
String codigo_de_la_necesidad_CFValue = ""
String nombre_CFValue = ""
String issue_key = ""
String super_uuoo = ""
results_01.getIssues().each {documentIssue ->
i = i + 1
def registro_issue_01 = issueManager.getIssueObject(documentIssue.id)
//def super_uuoo_CFValue = registro_issue_01.getCustomFieldValue (super_uuoo_CF)
HashMap<String, Option> super_uuoo_CFValue = new HashMap( registro_issue_01.getCustomFieldValue (super_uuoo_CF) )
super_uuoo = super_uuoo_CFValue.get(null).toString() + " - " + super_uuoo_CFValue.get("1").toString()
codigo_de_la_necesidad_CFValue = (String) registro_issue_01.getCustomFieldValue (codigo_de_la_necesidad_CF)
nombre_CFValue = (String) registro_issue_01.getCustomFieldValue (nombre_CF)
Timestamp fecha_derivacion_CFValue = (Timestamp) registro_issue_01.getCustomFieldValue (fecha_derivacion_CF)
issue_key = registro_issue_01.getKey()
seleccion = '<input id="checkbox-' + issue_key + '" type="checkbox" class="checkbox-issue" value="' + issue_key + '" /> <label for="checkbox-' + issue_key + '"> ' + codigo_de_la_necesidad_CFValue + '</label>'
html = html + "<tr>"
html = html + '<th style="min-width:30px; border: 1px solid #dddddd; text-align:center;"> ' + i +' </th>'
html = html + '<th style="min-width:80px; border: 1px solid #dddddd; text-align:center;"><a href="' + servidorURL + '/browse/' + issue_key + '"> ' + issue_key +' </a></th>'
html = html + '<th style="min-width:140px; border: 1px solid #dddddd; text-align:center;"> ' + codigo_de_la_necesidad_CFValue +' </th>'
html = html + '<th style="min-width:300px; border: 1px solid #dddddd; text-align:center;"> ' + nombre_CFValue +' </th>'
html = html + '<th style="min-width:150px; border: 1px solid #dddddd; text-align:center;"> ' + super_uuoo +' </th>'
html = html + '<th style="min-width:100px; border: 1px solid #dddddd; text-align:center;"> ' + formatear_ddmmaaaa_timestamp( fecha_derivacion_CFValue ) +' </th>'
html = html + '<th style="min-width:160px; border: 1px solid #dddddd; text-align:center;"> ' + seleccion +' </th>'
html = html + "</tr>"
}
html = html + "</table>"
html = html + '''
<br>
<button id="do-transition">ASIGNAR A LT</button>
<button id="do-observar">OBSERVAR</button>
<button id="do-derivar">DERIVAR A GESTIÓN DE ADQUISICIONES</button>
</div>
<script type="text/javascript">
function toArray(items) {
const array = []
for (let item of items) {
array.push(item)
}
return array
}
function doPost(url, body) {
return fetch(url, {
method: 'POST',
body: JSON.stringify(body),
headers: {
'Content-Type': 'application/json'
}
})
}
const button = document.getElementById("do-transition")
button.addEventListener('click', async e => {
const inputElements = toArray(document.querySelectorAll('.checkbox-issue'))
const checkedItems = inputElements
.filter(it => it.checked)
.map(it => ({ issueKey: it.value, isChecked: it.checked }))
function doPostForItem(item) {
const issueIdOrKey = item.issueKey;
const transitionId = '361'
return doPost(`/rest/api/2/issue/${issueIdOrKey}/transitions`, { transition: { id: transitionId }})
}
const result = await Promise.all(checkedItems.map(doPostForItem))
console.log(result)
location.reload()
})
const buttonobservar = document.getElementById("do-observar")
buttonobservar.addEventListener('click', async e => {
const inputElements = toArray(document.querySelectorAll('.checkbox-issue'))
const checkedItems = inputElements
.filter(it => it.checked)
.map(it => ({ issueKey: it.value, isChecked: it.checked }))
function doPostForItem(item) {
const issueIdOrKey = item.issueKey;
const transitionId = '341'
return doPost(`/rest/api/2/issue/${issueIdOrKey}/transitions`, { transition: { id: transitionId }})
}
const result = await Promise.all(checkedItems.map(doPostForItem))
console.log(result)
location.reload()
})
const buttonderivar = document.getElementById("do-derivar")
buttonderivar.addEventListener('click', async e => {
const inputElements = toArray(document.querySelectorAll('.checkbox-issue'))
const checkedItems = inputElements
.filter(it => it.checked)
.map(it => ({ issueKey: it.value, isChecked: it.checked }))
function doPostForItem(item) {
const issueIdOrKey = item.issueKey;
const transitionId = '351'
return doPost(`/rest/api/2/issue/${issueIdOrKey}/transitions`, { transition: { id: transitionId }})
}
const result = await Promise.all(checkedItems.map(doPostForItem))
console.log(result)
location.reload()
})
</script>
'''
} else {
html = "<font color=blue>No hay Necesidades en estado <b>PARA ANÁLISIS</b></font>"
}
return html
-->David Arteagahttp://www.blogger.com/profile/10902543905448315354noreply@blogger.com6tag:blogger.com,1999:blog-3530763170594601061.post-64538381630981828262012-03-29T16:08:00.000-05:002021-02-20T11:20:32.812-05:00Testing (Pruebas) en CMMIAquí hablaremos específicamente de las pruebas (testing) en un contexto de software y del modelo CMMI para Desarrollo (CMMI for Development, CMMI-DEV)
<!--
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.jql.parser.JqlQueryParser
import com.atlassian.jira.issue.search.SearchProvider
import com.atlassian.jira.web.bean.PagerFilter
import java.sql.Timestamp
import com.atlassian.jira.issue.customfields.option.Option
enableCache = {-> false}
String formatear_ddmmaaaa_timestamp (Timestamp p_fecha_timestamp) { // formatea la visualización de un timestamp
return String.format("%td", p_fecha_timestamp) + "/" + String.format("%tm", p_fecha_timestamp) + "/" + String.format("%tY", p_fecha_timestamp)
}
String html = ""
def appProperties = ComponentAccessor.getApplicationProperties()
def valores = appProperties.asMap()
String servidorURL = valores.get("jira.baseurl")
def usuario = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
// campos para filtrar
int swFiltrarSuper = 0
def super_uuoo_CF = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_15901") // 'Superintendencia nacional relacionada - UUOO Solicitante'='15901'
HashMap<String, Option> super_uuoo_CFValueFiltrar
if ( issue.getCustomFieldValue (super_uuoo_CF) == null ) {
swFiltrarSuper = 0
//mensaje = mensaje + "[01] Por favor, seleccionar ambos valores en el campo 'Superintendencia nacional relacionada - UUOO Solicitante'. No ha seleccionado valor alguno. "
} else {
super_uuoo_CFValueFiltrar = new HashMap( issue.getCustomFieldValue (super_uuoo_CF) )
if ( super_uuoo_CFValueFiltrar.size() == 1 ) {
swFiltrarSuper = 1
//mensaje = mensaje + "[02] Por favor, seleccionar ambos valores en el campo 'Superintendencia nacional relacionada - UUOO Solicitante'. Sólo ha seleccionado 'Superintendencia nacional relacionada'. "
}
if ( super_uuoo_CFValueFiltrar.size() == 2 ) {
swFiltrarSuper = 2
}
}
def lider_tecnico_CF = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_16007") // 'Líder Técnico'='16007'
def comentario_al_derivar_CF = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_16015") // 'Comentario al DERIVAR A GESTIÓN DE ADQUISICIONES'='16015'
String comentario_al_derivar_CFValue = (String) issue.getCustomFieldValue (comentario_al_derivar_CF)
boolean swHayComentarioAlDerivar = false
if ( ( issue.getCustomFieldValue (comentario_al_derivar_CF) != null ) && ( comentario_al_derivar_CFValue.trim() != "" ) ) {
swHayComentarioAlDerivar = true
}
// campos para mostrar
def codigo_de_la_necesidad_CF = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_15816") // 'Código de la necesidad'='15816'
def nombre_CF = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_15902") // 'Nombre='15902'
def fecha_derivacion_CF = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_16012") // 'Fecha Derivación='16012'
String sql_01 = 'project = DEM AND issuetype in (Necesidad, "Necesidad agrupada") AND status = "PARA ANÁLISIS" '
if ( swFiltrarSuper == 2 ) {
sql_01 = sql_01 + 'AND "Superintendencia nacional relacionada - UUOO Solicitante" in cascadeOption(' + super_uuoo_CFValueFiltrar.get(null).toString() + ' , ' + super_uuoo_CFValueFiltrar.get("1").toString() + ') '
}
sql_01 = sql_01 + ' ORDER BY key ASC '
def jqlQueryParser_01 = ComponentAccessor.getComponent(JqlQueryParser.class)
def searchProvider_01 = ComponentAccessor.getComponent(SearchProvider.class)
def query_01 = jqlQueryParser_01.parseQuery ( sql_01 )
def results_01 = searchProvider_01.search(query_01, usuario, PagerFilter.getUnlimitedFilter())
String seleccion = ""
if ( results_01.getIssues().size() > 0 ) {
html = '''
<div>
<table border="1" style="display: block;overflow-x: auto; border-collapse: collapse; width: 100%">
<caption><font color=blue>Necesidades en estado <b>PARA ANÁLISIS</b></font></caption>
<tr>
<th style="border: 1px solid #dddddd; text-align:center;"> # </th>
<th style="border: 1px solid #dddddd; text-align:center;"> Clave Jira </th>
<th style="border: 1px solid #dddddd; text-align:center;"> Código de la necesidad </th>
<th style="border: 1px solid #dddddd; text-align:center;"> Nombre </th>
<th style="border: 1px solid #dddddd; text-align:center;"> Superintendencia nacional - UUOO </th>
<th style="border: 1px solid #dddddd; text-align:center;"> Fecha Derivación </th>
<th style="border: 1px solid #dddddd; text-align:center;"> Selección </th>
</tr>
'''
int i = 0
def issueManager = ComponentAccessor.getIssueManager()
String codigo_de_la_necesidad_CFValue = ""
String nombre_CFValue = ""
String issue_key = ""
String super_uuoo = ""
results_01.getIssues().each {documentIssue ->
i = i + 1
def registro_issue_01 = issueManager.getIssueObject(documentIssue.id)
//def super_uuoo_CFValue = registro_issue_01.getCustomFieldValue (super_uuoo_CF)
HashMap<String, Option> super_uuoo_CFValue = new HashMap( registro_issue_01.getCustomFieldValue (super_uuoo_CF) )
super_uuoo = super_uuoo_CFValue.get(null).toString() + " - " + super_uuoo_CFValue.get("1").toString()
codigo_de_la_necesidad_CFValue = (String) registro_issue_01.getCustomFieldValue (codigo_de_la_necesidad_CF)
nombre_CFValue = (String) registro_issue_01.getCustomFieldValue (nombre_CF)
Timestamp fecha_derivacion_CFValue = (Timestamp) registro_issue_01.getCustomFieldValue (fecha_derivacion_CF)
issue_key = registro_issue_01.getKey()
seleccion = '<input id="checkbox-' + issue_key + '" type="checkbox" class="checkbox-issue" value="' + issue_key + '" /> <label for="checkbox-' + issue_key + '"> ' + codigo_de_la_necesidad_CFValue + '</label>'
html = html + "<tr>"
html = html + '<th style="min-width:30px; border: 1px solid #dddddd; text-align:center;"> ' + i +' </th>'
html = html + '<th style="min-width:80px; border: 1px solid #dddddd; text-align:center;"><a href="' + servidorURL + '/browse/' + issue_key + '"> ' + issue_key +' </a></th>'
html = html + '<th style="min-width:140px; border: 1px solid #dddddd; text-align:center;"> ' + codigo_de_la_necesidad_CFValue +' </th>'
html = html + '<th style="min-width:300px; border: 1px solid #dddddd; text-align:center;"> ' + nombre_CFValue +' </th>'
html = html + '<th style="min-width:150px; border: 1px solid #dddddd; text-align:center;"> ' + super_uuoo +' </th>'
html = html + '<th style="min-width:100px; border: 1px solid #dddddd; text-align:center;"> ' + formatear_ddmmaaaa_timestamp( fecha_derivacion_CFValue ) +' </th>'
html = html + '<th style="min-width:160px; border: 1px solid #dddddd; text-align:center;"> ' + seleccion +' </th>'
html = html + "</tr>"
}
html = html + "</table>"
html = html + '''
<br>
<button id="do-transition">ASIGNAR A LT</button>
<button id="do-observar">OBSERVAR</button>
<button id="do-derivar">DERIVAR A GESTIÓN DE ADQUISICIONES</button>
</div>
<script type="text/javascript">
function toArray(items) {
const array = []
for (let item of items) {
array.push(item)
}
return array
}
function doPost(url, body) {
return fetch(url, {
method: 'POST',
body: JSON.stringify(body),
headers: {
'Content-Type': 'application/json'
}
})
}
const button = document.getElementById("do-transition")
button.addEventListener('click', async e => {
const inputElements = toArray(document.querySelectorAll('.checkbox-issue'))
const checkedItems = inputElements
.filter(it => it.checked)
.map(it => ({ issueKey: it.value, isChecked: it.checked }))
function doPostForItem(item) {
const issueIdOrKey = item.issueKey;
const transitionId = '361'
return doPost(`/rest/api/2/issue/${issueIdOrKey}/transitions`, { transition: { id: transitionId }})
}
const result = await Promise.all(checkedItems.map(doPostForItem))
console.log(result)
location.reload()
})
const buttonobservar = document.getElementById("do-observar")
buttonobservar.addEventListener('click', async e => {
const inputElements = toArray(document.querySelectorAll('.checkbox-issue'))
const checkedItems = inputElements
.filter(it => it.checked)
.map(it => ({ issueKey: it.value, isChecked: it.checked }))
function doPostForItem(item) {
const issueIdOrKey = item.issueKey;
const transitionId = '341'
return doPost(`/rest/api/2/issue/${issueIdOrKey}/transitions`, { transition: { id: transitionId }})
}
const result = await Promise.all(checkedItems.map(doPostForItem))
console.log(result)
location.reload()
})
const buttonderivar = document.getElementById("do-derivar")
buttonderivar.addEventListener('click', async e => {
const inputElements = toArray(document.querySelectorAll('.checkbox-issue'))
const checkedItems = inputElements
.filter(it => it.checked)
.map(it => ({ issueKey: it.value, isChecked: it.checked }))
function doPostForItem(item) {
const issueIdOrKey = item.issueKey;
const transitionId = '351'
return doPost(`/rest/api/2/issue/${issueIdOrKey}/transitions`, { transition: { id: transitionId }})
}
const result = await Promise.all(checkedItems.map(doPostForItem))
console.log(result)
location.reload()
})
</script>
'''
} else {
html = "<font color=blue>No hay Necesidades en estado <b>PARA ANÁLISIS</b></font>"
}
return html
-->David Arteagahttp://www.blogger.com/profile/10902543905448315354noreply@blogger.com21tag:blogger.com,1999:blog-3530763170594601061.post-13847230595930764392012-03-29T12:12:00.000-05:002012-03-29T14:29:12.177-05:00EstimacionesConsultas sobre estimaciones y CMMIDavid Arteagahttp://www.blogger.com/profile/10902543905448315354noreply@blogger.com7tag:blogger.com,1999:blog-3530763170594601061.post-10102259604235735092012-03-29T11:51:00.000-05:002012-03-29T14:29:24.949-05:00CMMIEnvía tus consultas sobre CMMI !David Arteagahttp://www.blogger.com/profile/10902543905448315354noreply@blogger.com155tag:blogger.com,1999:blog-3530763170594601061.post-69581761077945276432012-03-29T08:51:00.000-05:002012-03-29T14:28:49.971-05:00Implementar CMMIDavid Arteagahttp://www.blogger.com/profile/10902543905448315354noreply@blogger.com86tag:blogger.com,1999:blog-3530763170594601061.post-58738016948411930292012-03-29T00:37:00.000-05:002012-03-29T14:29:33.856-05:00SCAMPIEnvía tus consultas sobre el SCAMPI !David Arteagahttp://www.blogger.com/profile/10902543905448315354noreply@blogger.com51