BananaSauce commited on
Commit
f556076
·
1 Parent(s): 7afb544
Files changed (3) hide show
  1. jira_integration.py +1 -1
  2. multiple.py +3 -5
  3. pre.py +0 -17
jira_integration.py CHANGED
@@ -1078,7 +1078,7 @@ def create_regression_task(project_key, summary, description, environment, filte
1078
  st.warning(f"⚠️ Could not add task to sprint. Error: {str(sprint_error)}")
1079
 
1080
  # Display success message
1081
- st.success(f"✅ Task created successfully: {new_issue.key}")
1082
  return new_issue
1083
 
1084
  except Exception as create_error:
 
1078
  st.warning(f"⚠️ Could not add task to sprint. Error: {str(sprint_error)}")
1079
 
1080
  # Display success message
1081
+
1082
  return new_issue
1083
 
1084
  except Exception as create_error:
multiple.py CHANGED
@@ -62,7 +62,7 @@ def handle_task_button_click(summary, description, formatted_env, filtered_df):
62
  logger.info(f"Environment: {formatted_env}")
63
  logger.info(f"DataFrame shape: {filtered_df.shape}")
64
 
65
- # Format environment for customer field
66
  if isinstance(formatted_env, str):
67
  if formatted_env.startswith('RI') and 'FIN' in formatted_env:
68
  # Extract the number between RI and FIN
@@ -71,7 +71,7 @@ def handle_task_button_click(summary, description, formatted_env, filtered_df):
71
  elif formatted_env.startswith('RI'):
72
  number = formatted_env[2:]
73
  formatted_env = f"R&I {number}"
74
-
75
  # Import here to avoid circular imports
76
  from jira_integration import create_regression_task
77
 
@@ -90,9 +90,7 @@ def handle_task_button_click(summary, description, formatted_env, filtered_df):
90
 
91
  logger.info(f"create_regression_task returned: {task}")
92
 
93
- if task:
94
- logger.info(f"Task created successfully: {task.key}")
95
- # Store task information in session state
96
  st.session_state.last_task_key = task.key
97
  st.session_state.last_task_url = f"{JIRA_SERVER}/browse/{task.key}"
98
  st.session_state.show_success = True
 
62
  logger.info(f"Environment: {formatted_env}")
63
  logger.info(f"DataFrame shape: {filtered_df.shape}")
64
 
65
+ # Format environment for customer field - simple conversion from RI to R&I
66
  if isinstance(formatted_env, str):
67
  if formatted_env.startswith('RI') and 'FIN' in formatted_env:
68
  # Extract the number between RI and FIN
 
71
  elif formatted_env.startswith('RI'):
72
  number = formatted_env[2:]
73
  formatted_env = f"R&I {number}"
74
+
75
  # Import here to avoid circular imports
76
  from jira_integration import create_regression_task
77
 
 
90
 
91
  logger.info(f"create_regression_task returned: {task}")
92
 
93
+ if task: # Store task information in session state
 
 
94
  st.session_state.last_task_key = task.key
95
  st.session_state.last_task_url = f"{JIRA_SERVER}/browse/{task.key}"
96
  st.session_state.show_success = True
pre.py CHANGED
@@ -121,9 +121,6 @@ def preprocess_xlsx(uploaded_file):
121
  else:
122
  environment = filename.split('.')[0]
123
 
124
- # Format environment for customer field
125
- environment = format_environment_for_customer_field(environment)
126
-
127
  # Create result dataframe
128
  result_df = pd.DataFrame({
129
  'Functional area': df['Feature Name'],
@@ -242,17 +239,3 @@ def add_app_description():
242
  # Add the new link here
243
  link_html = '<p style="font-size: 14px;"><a href="https://scenarioswitcher.negadan77.workers.dev/" target="_blank">Open Scenario Processor</a></p>'
244
  st.markdown(link_html, unsafe_allow_html=True)
245
-
246
- def format_environment_for_customer_field(env):
247
- """Format environment value for customer field (customfield_10427)"""
248
- if isinstance(env, str):
249
- # Handle RI1901FIN format
250
- if env.startswith('RI') and 'FIN' in env:
251
- # Extract the number between RI and FIN
252
- number = env[2:env.index('FIN')]
253
- return f"R&I {number} FIN"
254
- # Handle other formats
255
- elif env.startswith('RI'):
256
- number = env[2:]
257
- return f"R&I {number}"
258
- return env
 
121
  else:
122
  environment = filename.split('.')[0]
123
 
 
 
 
124
  # Create result dataframe
125
  result_df = pd.DataFrame({
126
  'Functional area': df['Feature Name'],
 
239
  # Add the new link here
240
  link_html = '<p style="font-size: 14px;"><a href="https://scenarioswitcher.negadan77.workers.dev/" target="_blank">Open Scenario Processor</a></p>'
241
  st.markdown(link_html, unsafe_allow_html=True)